Skip to content

Commit e74e58f

Browse files
JoePerchesdavem330
authored andcommitted
bluetooth: Remove extern from function prototypes
There are a mix of function prototypes with and without extern in the kernel sources. Standardize on not using extern for function prototypes. Function prototypes don't need to be written with extern. extern is assumed by the compiler. Its use is as unnecessary as using auto to declare automatic/local variables in a block. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d511337 commit e74e58f

3 files changed

Lines changed: 21 additions & 22 deletions

File tree

‎include/net/bluetooth/bluetooth.h‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -331,16 +331,16 @@ static inline struct sk_buff *bt_skb_send_alloc(struct sock *sk,
331331

332332
int bt_to_errno(__u16 code);
333333

334-
extern int hci_sock_init(void);
335-
extern void hci_sock_cleanup(void);
334+
int hci_sock_init(void);
335+
void hci_sock_cleanup(void);
336336

337-
extern int bt_sysfs_init(void);
338-
extern void bt_sysfs_cleanup(void);
337+
int bt_sysfs_init(void);
338+
void bt_sysfs_cleanup(void);
339339

340-
extern int bt_procfs_init(struct net *net, const char *name,
341-
struct bt_sock_list* sk_list,
342-
int (* seq_show)(struct seq_file *, void *));
343-
extern void bt_procfs_cleanup(struct net *net, const char *name);
340+
int bt_procfs_init(struct net *net, const char *name,
341+
struct bt_sock_list *sk_list,
342+
int (*seq_show)(struct seq_file *, void *));
343+
void bt_procfs_cleanup(struct net *net, const char *name);
344344

345345
extern struct dentry *bt_debugfs;
346346

‎include/net/bluetooth/hci_core.h‎

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -367,18 +367,17 @@ extern rwlock_t hci_dev_list_lock;
367367
extern rwlock_t hci_cb_list_lock;
368368

369369
/* ----- HCI interface to upper protocols ----- */
370-
extern int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr);
371-
extern void l2cap_connect_cfm(struct hci_conn *hcon, u8 status);
372-
extern int l2cap_disconn_ind(struct hci_conn *hcon);
373-
extern void l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason);
374-
extern int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt);
375-
extern int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb,
376-
u16 flags);
377-
378-
extern int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags);
379-
extern void sco_connect_cfm(struct hci_conn *hcon, __u8 status);
380-
extern void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason);
381-
extern int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb);
370+
int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr);
371+
void l2cap_connect_cfm(struct hci_conn *hcon, u8 status);
372+
int l2cap_disconn_ind(struct hci_conn *hcon);
373+
void l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason);
374+
int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt);
375+
int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags);
376+
377+
int sco_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr, __u8 *flags);
378+
void sco_connect_cfm(struct hci_conn *hcon, __u8 status);
379+
void sco_disconn_cfm(struct hci_conn *hcon, __u8 reason);
380+
int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb);
382381

383382
/* ----- Inquiry cache ----- */
384383
#define INQUIRY_CACHE_AGE_MAX (HZ*30) /* 30 seconds */

‎include/net/bluetooth/rfcomm.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ static inline void rfcomm_dlc_put(struct rfcomm_dlc *d)
256256
rfcomm_dlc_free(d);
257257
}
258258

259-
extern void __rfcomm_dlc_throttle(struct rfcomm_dlc *d);
260-
extern void __rfcomm_dlc_unthrottle(struct rfcomm_dlc *d);
259+
void __rfcomm_dlc_throttle(struct rfcomm_dlc *d);
260+
void __rfcomm_dlc_unthrottle(struct rfcomm_dlc *d);
261261

262262
static inline void rfcomm_dlc_throttle(struct rfcomm_dlc *d)
263263
{

0 commit comments

Comments
 (0)