Skip to content

Commit 5a9d0a3

Browse files
Waldemar RymarkiewiczGustavo F. Padovan
authored andcommitted
Bluetooth: Clean up some code style issues
Fix lines longer than 80 chars in length. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
1 parent d29d04c commit 5a9d0a3

3 files changed

Lines changed: 35 additions & 19 deletions

File tree

‎include/net/bluetooth/bluetooth.h‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ int bt_sock_register(int proto, const struct net_proto_family *ops);
137137
int bt_sock_unregister(int proto);
138138
void bt_sock_link(struct bt_sock_list *l, struct sock *s);
139139
void bt_sock_unlink(struct bt_sock_list *l, struct sock *s);
140-
int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t len, int flags);
140+
int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
141+
struct msghdr *msg, size_t len, int flags);
141142
int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock,
142143
struct msghdr *msg, size_t len, int flags);
143144
uint bt_sock_poll(struct file * file, struct socket *sock, poll_table *wait);
@@ -172,8 +173,8 @@ static inline struct sk_buff *bt_skb_alloc(unsigned int len, gfp_t how)
172173
return skb;
173174
}
174175

175-
static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk, unsigned long len,
176-
int nb, int *err)
176+
static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk,
177+
unsigned long len, int nb, int *err)
177178
{
178179
struct sk_buff *skb;
179180

‎include/net/bluetooth/hci_core.h‎

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ struct hci_conn {
224224
spinlock_t lock;
225225

226226
bdaddr_t dst;
227-
__u8 dst_type;
227+
__u8 dst_type;
228228
__u16 handle;
229229
__u16 state;
230230
__u8 mode;
@@ -317,7 +317,8 @@ static inline long inquiry_entry_age(struct inquiry_entry *e)
317317
return jiffies - e->timestamp;
318318
}
319319

320-
struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr);
320+
struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev,
321+
bdaddr_t *bdaddr);
321322
void hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data);
322323

323324
/* ----- HCI Connections ----- */
@@ -431,7 +432,8 @@ int hci_conn_del(struct hci_conn *conn);
431432
void hci_conn_hash_flush(struct hci_dev *hdev);
432433
void hci_conn_check_pending(struct hci_dev *hdev);
433434

434-
struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8 sec_level, __u8 auth_type);
435+
struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst,
436+
__u8 sec_level, __u8 auth_type);
435437
int hci_conn_check_link_mode(struct hci_conn *conn);
436438
int hci_conn_check_secure(struct hci_conn *conn, __u8 sec_level);
437439
int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type);
@@ -460,10 +462,12 @@ static inline void hci_conn_put(struct hci_conn *conn)
460462
timeo = msecs_to_jiffies(conn->disc_timeout);
461463
if (!conn->out)
462464
timeo *= 2;
463-
} else
465+
} else {
464466
timeo = msecs_to_jiffies(10);
465-
} else
467+
}
468+
} else {
466469
timeo = msecs_to_jiffies(10);
470+
}
467471
mod_timer(&conn->disc_timer, jiffies + timeo);
468472
}
469473
}
@@ -578,16 +582,20 @@ struct hci_proto {
578582

579583
void *priv;
580584

581-
int (*connect_ind) (struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type);
585+
int (*connect_ind) (struct hci_dev *hdev, bdaddr_t *bdaddr,
586+
__u8 type);
582587
int (*connect_cfm) (struct hci_conn *conn, __u8 status);
583588
int (*disconn_ind) (struct hci_conn *conn);
584589
int (*disconn_cfm) (struct hci_conn *conn, __u8 reason);
585-
int (*recv_acldata) (struct hci_conn *conn, struct sk_buff *skb, __u16 flags);
590+
int (*recv_acldata) (struct hci_conn *conn, struct sk_buff *skb,
591+
__u16 flags);
586592
int (*recv_scodata) (struct hci_conn *conn, struct sk_buff *skb);
587-
int (*security_cfm) (struct hci_conn *conn, __u8 status, __u8 encrypt);
593+
int (*security_cfm) (struct hci_conn *conn, __u8 status,
594+
__u8 encrypt);
588595
};
589596

590-
static inline int hci_proto_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 type)
597+
static inline int hci_proto_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr,
598+
__u8 type)
591599
{
592600
register struct hci_proto *hp;
593601
int mask = 0;
@@ -673,7 +681,8 @@ static inline void hci_proto_auth_cfm(struct hci_conn *conn, __u8 status)
673681
conn->security_cfm_cb(conn, status);
674682
}
675683

676-
static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt)
684+
static inline void hci_proto_encrypt_cfm(struct hci_conn *conn, __u8 status,
685+
__u8 encrypt)
677686
{
678687
register struct hci_proto *hp;
679688

@@ -698,7 +707,8 @@ struct hci_cb {
698707

699708
char *name;
700709

701-
void (*security_cfm) (struct hci_conn *conn, __u8 status, __u8 encrypt);
710+
void (*security_cfm) (struct hci_conn *conn, __u8 status,
711+
__u8 encrypt);
702712
void (*key_change_cfm) (struct hci_conn *conn, __u8 status);
703713
void (*role_switch_cfm) (struct hci_conn *conn, __u8 status, __u8 role);
704714
};
@@ -724,7 +734,8 @@ static inline void hci_auth_cfm(struct hci_conn *conn, __u8 status)
724734
read_unlock_bh(&hci_cb_list_lock);
725735
}
726736

727-
static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status, __u8 encrypt)
737+
static inline void hci_encrypt_cfm(struct hci_conn *conn, __u8 status,
738+
__u8 encrypt)
728739
{
729740
struct list_head *p;
730741

@@ -755,7 +766,8 @@ static inline void hci_key_change_cfm(struct hci_conn *conn, __u8 status)
755766
read_unlock_bh(&hci_cb_list_lock);
756767
}
757768

758-
static inline void hci_role_switch_cfm(struct hci_conn *conn, __u8 status, __u8 role)
769+
static inline void hci_role_switch_cfm(struct hci_conn *conn, __u8 status,
770+
__u8 role)
759771
{
760772
struct list_head *p;
761773

‎include/net/bluetooth/rfcomm.h‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ int rfcomm_send_rpn(struct rfcomm_session *s, int cr, u8 dlci,
234234
/* ---- RFCOMM DLCs (channels) ---- */
235235
struct rfcomm_dlc *rfcomm_dlc_alloc(gfp_t prio);
236236
void rfcomm_dlc_free(struct rfcomm_dlc *d);
237-
int rfcomm_dlc_open(struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst, u8 channel);
237+
int rfcomm_dlc_open(struct rfcomm_dlc *d, bdaddr_t *src, bdaddr_t *dst,
238+
u8 channel);
238239
int rfcomm_dlc_close(struct rfcomm_dlc *d, int reason);
239240
int rfcomm_dlc_send(struct rfcomm_dlc *d, struct sk_buff *skb);
240241
int rfcomm_dlc_set_modem_status(struct rfcomm_dlc *d, u8 v24_sig);
@@ -271,7 +272,8 @@ static inline void rfcomm_dlc_unthrottle(struct rfcomm_dlc *d)
271272
}
272273

273274
/* ---- RFCOMM sessions ---- */
274-
void rfcomm_session_getaddr(struct rfcomm_session *s, bdaddr_t *src, bdaddr_t *dst);
275+
void rfcomm_session_getaddr(struct rfcomm_session *s, bdaddr_t *src,
276+
bdaddr_t *dst);
275277

276278
static inline void rfcomm_session_hold(struct rfcomm_session *s)
277279
{
@@ -312,7 +314,8 @@ struct rfcomm_pinfo {
312314
int rfcomm_init_sockets(void);
313315
void rfcomm_cleanup_sockets(void);
314316

315-
int rfcomm_connect_ind(struct rfcomm_session *s, u8 channel, struct rfcomm_dlc **d);
317+
int rfcomm_connect_ind(struct rfcomm_session *s, u8 channel,
318+
struct rfcomm_dlc **d);
316319

317320
/* ---- RFCOMM TTY ---- */
318321
#define RFCOMM_MAX_DEV 256

0 commit comments

Comments
 (0)