net/bluetooth/: misc possible cleanups
Subsystems (4)
PATCH 1/1 net/bluetooth/: misc possible cleanups
The patch below contains the following possible cleanups:
- make needlessly global code static
- remove the following EXPORT_SYMBOL'ed but unused functions in hci_core.c:
- hci_suspend_dev
- hci_resume_dev
- hci_register_cb
- hci_unregister_cb
Please comment on which of these changes are correct and which conflict with pending patches.
diffstat output:
include/net/bluetooth/hci_core.h | 7 ---- include/net/bluetooth/rfcomm.h | 27 ------------------- net/bluetooth/cmtp/capi.c | 4 ++ net/bluetooth/cmtp/cmtp.h | 1 net/bluetooth/hci_conn.c | 2 - net/bluetooth/hci_core.c | 44 +------------------------------ net/bluetooth/hci_sock.c | 10 +++---- net/bluetooth/l2cap.c | 2 - net/bluetooth/rfcomm/core.c | 37 +++++++++++++++++++++----- net/bluetooth/rfcomm/sock.c | 4 +- 10 files changed, 44 insertions(+), 94 deletions(-)
net/bluetooth/cmtp/cmtp.h renamed from net/bluetooth/cmtp/cmtp.h.old +0 -1
@@ -120,7 +120,6 @@void cmtp_detach_device (struct cmtp_session *session);void cmtp_recv_capimsg (struct cmtp_session *session,struct sk_buff *skb); -void cmtp_send_capimsg (struct cmtp_session *session,struct sk_buff *skb);static inline void cmtp_schedule (struct cmtp_session *session) {
net/bluetooth/cmtp/capi.c renamed from net/bluetooth/cmtp/capi.c.old +3 -1
@@ -74,6 +74,8 @@#define CMTP_APPLID 2#define CMTP_MAPPING 3 +static void cmtp_send_capimsg (struct cmtp_session *session,struct sk_buff *skb); +static struct cmtp_application *cmtp_application_add (struct cmtp_session *session,__u16 appl) {struct cmtp_application *app =kmalloc (sizeof (*app),GFP_KERNEL );
@@ -337,7 +339,7 @@capi_ctr_handle_message (ctrl, appl, skb); } -void cmtp_send_capimsg (struct cmtp_session *session,struct sk_buff *skb) +static void cmtp_send_capimsg (struct cmtp_session *session,struct sk_buff *skb) {struct cmtp_scb *scb = (void *) skb->cb;
include/net/bluetooth/hci_core.h renamed from include/net/bluetooth/hci_core.h.old +0 -7
@@ -277,7 +277,6 @@return NULL ; } -void hci_acl_connect (struct hci_conn *conn);void hci_acl_disconn (struct hci_conn *conn,__u8 reason);void hci_add_sco (struct hci_conn *conn,__u16 handle);
@@ -372,8 +371,6 @@void hci_free_dev (struct hci_dev *hdev);int hci_register_dev (struct hci_dev *hdev);int hci_unregister_dev (struct hci_dev *hdev); -int hci_suspend_dev (struct hci_dev *hdev); -int hci_resume_dev (struct hci_dev *hdev);int hci_dev_open (__u16 dev);int hci_dev_close (__u16 dev);int hci_dev_reset (__u16 dev);
@@ -546,9 +543,6 @@read_unlock_bh (&hci_cb_list_lock); } -int hci_register_cb (struct hci_cb *hcb); -int hci_unregister_cb (struct hci_cb *hcb); -int hci_register_notifier (struct notifier_block *nb);int hci_unregister_notifier (struct notifier_block *nb);
@@ -589,6 +583,5 @@#define hci_req_unlock (d) up(&d->req_lock)void hci_req_complete (struct hci_dev *hdev,int result); -void hci_req_cancel (struct hci_dev *hdev,int err);#endif /* __HCI_CORE_H */
net/bluetooth/hci_conn.c renamed from net/bluetooth/hci_conn.c.old +1 -1
@@ -53,7 +53,7 @@ #define BT_DBG(D...)#endif -void hci_acl_connect (struct hci_conn *conn) +static void hci_acl_connect (struct hci_conn *conn) {struct hci_dev *hdev = conn->hdev;struct inquiry_entry *ie;
net/bluetooth/hci_core.c renamed from net/bluetooth/hci_core.c.old +2 -42
68 lines not on this page · raw message
net/bluetooth/hci_sock.c renamed from net/bluetooth/hci_sock.c.old +5 -5
@@ -447,7 +447,7 @@ goto done; } -int hci_sock_setsockopt (struct socket *sock,int level,int optname,char __user *optval,int len) +static int hci_sock_setsockopt (struct socket *sock,int level,int optname,char __user *optval,int len) {struct hci_ufilter uf = { .opcode =0 };struct sock *sk = sock->sk;
@@ -514,7 +514,7 @@return err; } -int hci_sock_getsockopt (struct socket *sock,int level,int optname,char __user *optval,int __user *optlen) +static int hci_sock_getsockopt (struct socket *sock,int level,int optname,char __user *optval,int __user *optlen) {struct hci_ufilter uf;struct sock *sk = sock->sk;
@@ -567,7 +567,7 @@return 0 ; } -struct proto_ops hci_sock_ops = { +static struct proto_ops hci_sock_ops = { .family =PF_BLUETOOTH , .owner =THIS_MODULE , .release = hci_sock_release,
@@ -647,13 +647,13 @@return NOTIFY_DONE ; } -struct net_proto_family hci_sock_family_ops = { +static struct net_proto_family hci_sock_family_ops = { .family =PF_BLUETOOTH , .owner =THIS_MODULE , .create = hci_sock_create, }; -struct notifier_block hci_sock_nblock = { +static struct notifier_block hci_sock_nblock = { .notifier_call = hci_sock_dev_event };
net/bluetooth/l2cap.c renamed from net/bluetooth/l2cap.c.old +1 -1
@@ -61,7 +61,7 @@static struct proto_ops l2cap_sock_ops; -struct bt_sock_list l2cap_sk_list = { +static struct bt_sock_list l2cap_sk_list = { .lock =RW_LOCK_UNLOCKED };
include/net/bluetooth/rfcomm.h renamed from include/net/bluetooth/rfcomm.h.old +0 -27
@@ -216,22 +216,6 @@#define RFCOMM_CFC_DISABLED 0#define RFCOMM_CFC_ENABLED RFCOMM_MAX_CREDITS -extern struct task_struct *rfcomm_thread; -extern unsigned long rfcomm_event; - -static inline void rfcomm_schedule (uint event) -{ -if (!rfcomm_thread) -return ; -//set_bit(event, &rfcomm_event); -set_bit (RFCOMM_SCHED_WAKEUP , &rfcomm_event); -wake_up_process (rfcomm_thread); -} - -extern struct semaphore rfcomm_sem; -#define rfcomm_lock () down(&rfcomm_sem); -#define rfcomm_unlock () up(&rfcomm_sem); -/* ---- RFCOMM DLCs (channels) ---- */ struct rfcomm_dlc *rfcomm_dlc_alloc (int prio);void rfcomm_dlc_free (struct rfcomm_dlc *d);
@@ -271,11 +255,6 @@ }/* ---- RFCOMM sessions ---- */ -struct rfcomm_session *rfcomm_session_add (struct socket *sock,int state); -struct rfcomm_session *rfcomm_session_get (bdaddr_t *src,bdaddr_t *dst); -struct rfcomm_session *rfcomm_session_create (bdaddr_t *src,bdaddr_t *dst,int *err); -void rfcomm_session_del (struct rfcomm_session *s); -void rfcomm_session_close (struct rfcomm_session *s,int err);void rfcomm_session_getaddr (struct rfcomm_session *s,bdaddr_t *src,bdaddr_t *dst);static inline void rfcomm_session_hold (struct rfcomm_session *s)
@@ -283,12 +262,6 @@atomic_inc (&s->refcnt); } -static inline void rfcomm_session_put (struct rfcomm_session *s) -{ -if (atomic_dec_and_test (&s->refcnt)) -rfcomm_session_del (s); -} -/* ---- RFCOMM chechsum ---- */ extern u8 rfcomm_crc_table[];
net/bluetooth/rfcomm/core.c renamed from net/bluetooth/rfcomm/core.c.old +30 -7
@@ -61,8 +61,12 @@struct proc_dir_entry *proc_bt_rfcomm;#endif -struct task_struct *rfcomm_thread; -DECLARE_MUTEX (rfcomm_sem); +static struct task_struct *rfcomm_thread; + +static DECLARE_MUTEX (rfcomm_sem); +#define rfcomm_lock () down(&rfcomm_sem); +#define rfcomm_unlock () up(&rfcomm_sem); +unsigned long rfcomm_event;static LIST_HEAD (session_list);
@@ -81,6 +85,10 @@static void rfcomm_process_connect (struct rfcomm_session *s); +static struct rfcomm_session *rfcomm_session_create (bdaddr_t *src,bdaddr_t *dst,int *err); +static struct rfcomm_session *rfcomm_session_get (bdaddr_t *src,bdaddr_t *dst); +static void rfcomm_session_del (struct rfcomm_session *s); +/* ---- RFCOMM frame parsing macros ---- */ #define __get_dlci (b) ((b & 0xfc) >> 2)#define __get_channel (b) ((b & 0xf8) >> 3)
@@ -111,6 +119,21 @@#define __get_rpn_stop_bits (line) (((line) >> 2) & 0x1)#define __get_rpn_parity (line) (((line) >> 3) & 0x3) +static inline void rfcomm_schedule (uint event) +{ +if (!rfcomm_thread) +return ; +//set_bit(event, &rfcomm_event); +set_bit (RFCOMM_SCHED_WAKEUP , &rfcomm_event); +wake_up_process (rfcomm_thread); +} + +static inline void rfcomm_session_put (struct rfcomm_session *s) +{ +if (atomic_dec_and_test (&s->refcnt)) +rfcomm_session_del (s); +} +/* ---- RFCOMM FCS computation ---- */ /* CRC on 2 bytes */
@@ -458,7 +481,7 @@ }/* ---- RFCOMM sessions ---- */ -struct rfcomm_session *rfcomm_session_add (struct socket *sock,int state) +static struct rfcomm_session *rfcomm_session_add (struct socket *sock,int state) {struct rfcomm_session *s =kmalloc (sizeof (*s),GFP_KERNEL );if (!s)
@@ -487,7 +510,7 @@return s; } -void rfcomm_session_del (struct rfcomm_session *s) +static void rfcomm_session_del (struct rfcomm_session *s) {int state = s->state;
@@ -505,7 +528,7 @@module_put (THIS_MODULE ); } -struct rfcomm_session *rfcomm_session_get (bdaddr_t *src,bdaddr_t *dst) +static struct rfcomm_session *rfcomm_session_get (bdaddr_t *src,bdaddr_t *dst) {struct rfcomm_session *s;struct list_head *p, *n;
@@ -521,7 +544,7 @@return NULL ; } -void rfcomm_session_close (struct rfcomm_session *s,int err) +static void rfcomm_session_close (struct rfcomm_session *s,int err) {struct rfcomm_dlc *d;struct list_head *p, *n;
@@ -542,7 +565,7 @@rfcomm_session_put (s); } -struct rfcomm_session *rfcomm_session_create (bdaddr_t *src,bdaddr_t *dst,int *err) +static struct rfcomm_session *rfcomm_session_create (bdaddr_t *src,bdaddr_t *dst,int *err) {struct rfcomm_session *s =NULL ;struct sockaddr_l2 addr;
net/bluetooth/rfcomm/sock.c renamed from net/bluetooth/rfcomm/sock.c.old +2 -2
@@ -393,7 +393,7 @@return err; } -int rfcomm_sock_listen (struct socket *sock,int backlog) +static int rfcomm_sock_listen (struct socket *sock,int backlog) {struct sock *sk = sock->sk;int err =0 ;
@@ -437,7 +437,7 @@return err; } -int rfcomm_sock_accept (struct socket *sock,struct socket *newsock,int flags) +static int rfcomm_sock_accept (struct socket *sock,struct socket *newsock,int flags) {DECLARE_WAITQUEUE (wait, current);struct sock *sk = sock->sk, *nsk;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
Marcel Holtmann
maintainerHi Adrian,
Quoted 8 lines
The patch below contains the following possible cleanups:
- make needlessly global code static
- remove the following EXPORT_SYMBOL'ed but unused functions inhci_core.c:
-hci_suspend_dev
-hci_resume_dev
-hci_register_cb
-hci_unregister_cb
these functions must stay. They have users outside the mainline kernel that are not merged back yet. Otherwise they won't be exported ;)
Quoted 2 lines
Please comment on which of these changes are correct and which conflict with pending patches.
Please send a separate patch for all the RFCOMM changes, because these conflicts with some pending patches and then it will make it easier for me to merge them.
The rest of the changes are fine with me, but I like to see also a separate patch for the CMTP stuff and cmtp_send_capimsg() don't need a forward declaration. Simply move the function to another place in the source code.
Regards
Marcel
Quoted 2 lines · Marcel Holtmann
these functions must stay. They have users outside the mainline kernel that are not merged back yet. Otherwise they won't be exported ;)
But we traditionally don't keep APIs only for the sake of external modules. Exceptions are made if you have short- to mid-term plans to merge them.
Marcel Holtmann
maintainerHi Christoph,
Quoted 5 lines
Quoted 2 lines
these functions must stay. They have users outside the mainline kernel that are not merged back yet. Otherwise they won't be exported ;)
But we traditionally don't keep APIs only for the sake of external modules. Exceptions are made if you have short- to mid-term plans to merge them.
it is a short term plan, because otherwise I won't have submitted it in the first place. And as I said, they are not merged back yet. They are not tested enough for mainline at the moment.
Regards
Marcel
Quoted 1 line · Marcel Holtmann
Hi Adrian,
Hi Marcel,
Quoted 4 lines
...
Quoted 2 lines
Please comment on which of these changes are correct and which conflict with pending patches.
Quoted 8 lines
Please send a separate patch for all the RFCOMM changes, because these conflicts with some pending patches and then it will make it easier for me to merge them.
The rest of the changes are fine with me, but I like to see also a separate patch for the CMTP stuff and
cmtp_send_capimsg()don't need a forward declaration. Simply move the function to another place in the source code.
splitted patches follow as reply to this email.
Quoted 3 lines
Regards
Marcel
cu
Adrian
Signature · 12 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/PATCH 1/1 bluetooth/rfcomm/: make some code static
The patch below makes some needlessly global code static.
diffstat output:
include/net/bluetooth/rfcomm.h | 27 ------------------------ net/bluetooth/rfcomm/core.c | 37 ++++++++++++++++++++++++++------- net/bluetooth/rfcomm/sock.c | 4 +-- 3 files changed, 32 insertions(+), 36 deletions(-)
include/net/bluetooth/rfcomm.h renamed from include/net/bluetooth/rfcomm.h.old +0 -27
@@ -216,22 +216,6 @@#define RFCOMM_CFC_DISABLED 0#define RFCOMM_CFC_ENABLED RFCOMM_MAX_CREDITS -extern struct task_struct *rfcomm_thread; -extern unsigned long rfcomm_event; - -static inline void rfcomm_schedule (uint event) -{ -if (!rfcomm_thread) -return ; -//set_bit(event, &rfcomm_event); -set_bit (RFCOMM_SCHED_WAKEUP , &rfcomm_event); -wake_up_process (rfcomm_thread); -} - -extern struct semaphore rfcomm_sem; -#define rfcomm_lock () down(&rfcomm_sem); -#define rfcomm_unlock () up(&rfcomm_sem); -/* ---- RFCOMM DLCs (channels) ---- */ struct rfcomm_dlc *rfcomm_dlc_alloc (int prio);void rfcomm_dlc_free (struct rfcomm_dlc *d);
@@ -271,11 +255,6 @@ }/* ---- RFCOMM sessions ---- */ -struct rfcomm_session *rfcomm_session_add (struct socket *sock,int state); -struct rfcomm_session *rfcomm_session_get (bdaddr_t *src,bdaddr_t *dst); -struct rfcomm_session *rfcomm_session_create (bdaddr_t *src,bdaddr_t *dst,int *err); -void rfcomm_session_del (struct rfcomm_session *s); -void rfcomm_session_close (struct rfcomm_session *s,int err);void rfcomm_session_getaddr (struct rfcomm_session *s,bdaddr_t *src,bdaddr_t *dst);static inline void rfcomm_session_hold (struct rfcomm_session *s)
@@ -283,12 +262,6 @@atomic_inc (&s->refcnt); } -static inline void rfcomm_session_put (struct rfcomm_session *s) -{ -if (atomic_dec_and_test (&s->refcnt)) -rfcomm_session_del (s); -} -/* ---- RFCOMM chechsum ---- */ extern u8 rfcomm_crc_table[];
net/bluetooth/rfcomm/core.c renamed from net/bluetooth/rfcomm/core.c.old +30 -7
@@ -61,8 +61,12 @@struct proc_dir_entry *proc_bt_rfcomm;#endif -struct task_struct *rfcomm_thread; -DECLARE_MUTEX (rfcomm_sem); +static struct task_struct *rfcomm_thread; + +static DECLARE_MUTEX (rfcomm_sem); +#define rfcomm_lock () down(&rfcomm_sem); +#define rfcomm_unlock () up(&rfcomm_sem); +unsigned long rfcomm_event;static LIST_HEAD (session_list);
@@ -81,6 +85,10 @@static void rfcomm_process_connect (struct rfcomm_session *s); +static struct rfcomm_session *rfcomm_session_create (bdaddr_t *src,bdaddr_t *dst,int *err); +static struct rfcomm_session *rfcomm_session_get (bdaddr_t *src,bdaddr_t *dst); +static void rfcomm_session_del (struct rfcomm_session *s); +/* ---- RFCOMM frame parsing macros ---- */ #define __get_dlci (b) ((b & 0xfc) >> 2)#define __get_channel (b) ((b & 0xf8) >> 3)
@@ -111,6 +119,21 @@#define __get_rpn_stop_bits (line) (((line) >> 2) & 0x1)#define __get_rpn_parity (line) (((line) >> 3) & 0x3) +static inline void rfcomm_schedule (uint event) +{ +if (!rfcomm_thread) +return ; +//set_bit(event, &rfcomm_event); +set_bit (RFCOMM_SCHED_WAKEUP , &rfcomm_event); +wake_up_process (rfcomm_thread); +} + +static inline void rfcomm_session_put (struct rfcomm_session *s) +{ +if (atomic_dec_and_test (&s->refcnt)) +rfcomm_session_del (s); +} +/* ---- RFCOMM FCS computation ---- */ /* CRC on 2 bytes */
@@ -458,7 +481,7 @@ }/* ---- RFCOMM sessions ---- */ -struct rfcomm_session *rfcomm_session_add (struct socket *sock,int state) +static struct rfcomm_session *rfcomm_session_add (struct socket *sock,int state) {struct rfcomm_session *s =kmalloc (sizeof (*s),GFP_KERNEL );if (!s)
@@ -487,7 +510,7 @@return s; } -void rfcomm_session_del (struct rfcomm_session *s) +static void rfcomm_session_del (struct rfcomm_session *s) {int state = s->state;
@@ -505,7 +528,7 @@module_put (THIS_MODULE ); } -struct rfcomm_session *rfcomm_session_get (bdaddr_t *src,bdaddr_t *dst) +static struct rfcomm_session *rfcomm_session_get (bdaddr_t *src,bdaddr_t *dst) {struct rfcomm_session *s;struct list_head *p, *n;
@@ -521,7 +544,7 @@return NULL ; } -void rfcomm_session_close (struct rfcomm_session *s,int err) +static void rfcomm_session_close (struct rfcomm_session *s,int err) {struct rfcomm_dlc *d;struct list_head *p, *n;
@@ -542,7 +565,7 @@rfcomm_session_put (s); } -struct rfcomm_session *rfcomm_session_create (bdaddr_t *src,bdaddr_t *dst,int *err) +static struct rfcomm_session *rfcomm_session_create (bdaddr_t *src,bdaddr_t *dst,int *err) {struct rfcomm_session *s =NULL ;struct sockaddr_l2 addr;
net/bluetooth/rfcomm/sock.c renamed from net/bluetooth/rfcomm/sock.c.old +2 -2
@@ -393,7 +393,7 @@return err; } -int rfcomm_sock_listen (struct socket *sock,int backlog) +static int rfcomm_sock_listen (struct socket *sock,int backlog) {struct sock *sk = sock->sk;int err =0 ;
@@ -437,7 +437,7 @@return err; } -int rfcomm_sock_accept (struct socket *sock,struct socket *newsock,int flags) +static int rfcomm_sock_accept (struct socket *sock,struct socket *newsock,int flags) {DECLARE_WAITQUEUE (wait, current);struct sock *sk = sock->sk, *nsk;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
PATCH 1/1 bluetooth/cmtp/capi.c: make a function static
In reply to Adrian BunkThe patch below makes a needlessly global function static.
diffstat output:
net/bluetooth/cmtp/capi.c | 28 +++++++++++++--------------- net/bluetooth/cmtp/cmtp.h | 1 - 2 files changed, 13 insertions(+), 16 deletions(-)
net/bluetooth/cmtp/cmtp.h renamed from net/bluetooth/cmtp/cmtp.h.old +0 -1
@@ -120,7 +120,6 @@void cmtp_detach_device (struct cmtp_session *session);void cmtp_recv_capimsg (struct cmtp_session *session,struct sk_buff *skb); -void cmtp_send_capimsg (struct cmtp_session *session,struct sk_buff *skb);static inline void cmtp_schedule (struct cmtp_session *session) {
net/bluetooth/cmtp/capi.c renamed from net/bluetooth/cmtp/capi.c.old +13 -15
@@ -139,6 +139,19 @@return session->msgnum; } +static void cmtp_send_capimsg (struct cmtp_session *session,struct sk_buff *skb) +{ +struct cmtp_scb *scb = (void *) skb->cb; + +BT_DBG ("session %p skb %p len %d" , session, skb, skb->len); + + scb->id =-1 ; + scb->data = (CAPIMSG_COMMAND (skb->data) ==CAPI_DATA_B3 ); + +skb_queue_tail (&session->transmit, skb); + +cmtp_schedule (session); +} static void cmtp_send_interopmsg(struct cmtp_session *session, __u8 subcmd, __u16 appl, __u16 msgnum,
@@ -337,21 +350,6 @@capi_ctr_handle_message (ctrl, appl, skb); } -void cmtp_send_capimsg (struct cmtp_session *session,struct sk_buff *skb) -{ -struct cmtp_scb *scb = (void *) skb->cb; - -BT_DBG ("session %p skb %p len %d" , session, skb, skb->len); - - scb->id =-1 ; - scb->data = (CAPIMSG_COMMAND (skb->data) ==CAPI_DATA_B3 ); - -skb_queue_tail (&session->transmit, skb); - -cmtp_schedule (session); -} - -static int cmtp_load_firmware (struct capi_ctr *ctrl,capiloaddata *data) {BT_DBG ("ctrl %p data %p" , ctrl, data);
PATCH 1/1 bluetooth: make some code static
In reply to Adrian BunkThe patch below makes some needlessly global code static.
diffstat output:
include/net/bluetooth/hci_core.h | 2 -- net/bluetooth/hci_conn.c | 2 +- net/bluetooth/hci_core.c | 4 ++-- net/bluetooth/hci_sock.c | 10 +++++----- net/bluetooth/l2cap.c | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-)
include/net/bluetooth/hci_core.h renamed from include/net/bluetooth/hci_core.h.old +0 -2
@@ -277,7 +277,6 @@return NULL ; } -void hci_acl_connect (struct hci_conn *conn);void hci_acl_disconn (struct hci_conn *conn,__u8 reason);void hci_add_sco (struct hci_conn *conn,__u16 handle);
@@ -589,6 +583,5 @@#define hci_req_unlock (d) up(&d->req_lock)void hci_req_complete (struct hci_dev *hdev,int result); -void hci_req_cancel (struct hci_dev *hdev,int err);#endif /* __HCI_CORE_H */
net/bluetooth/hci_conn.c renamed from net/bluetooth/hci_conn.c.old +1 -1
@@ -53,7 +53,7 @@ #define BT_DBG(D...)#endif -void hci_acl_connect (struct hci_conn *conn) +static void hci_acl_connect (struct hci_conn *conn) {struct hci_dev *hdev = conn->hdev;struct inquiry_entry *ie;
net/bluetooth/hci_core.c renamed from net/bluetooth/hci_core.c.old +2 -2
@@ -59,7 +59,7 @@static void hci_tx_task (unsigned long arg);static void hci_notify (struct hci_dev *hdev,int event); -rwlock_t hci_task_lock =RW_LOCK_UNLOCKED ; +static rwlock_t hci_task_lock =RW_LOCK_UNLOCKED ;/* HCI device list */ LIST_HEAD (hci_dev_list);
@@ -106,7 +106,7 @@ } } -void hci_req_cancel (struct hci_dev *hdev,int err) +static void hci_req_cancel (struct hci_dev *hdev,int err) {BT_DBG ("%s err 0x%2.2x" , hdev->name, err);
net/bluetooth/hci_sock.c renamed from net/bluetooth/hci_sock.c.old +5 -5
@@ -447,7 +447,7 @@ goto done; } -int hci_sock_setsockopt (struct socket *sock,int level,int optname,char __user *optval,int len) +static int hci_sock_setsockopt (struct socket *sock,int level,int optname,char __user *optval,int len) {struct hci_ufilter uf = { .opcode =0 };struct sock *sk = sock->sk;
@@ -514,7 +514,7 @@return err; } -int hci_sock_getsockopt (struct socket *sock,int level,int optname,char __user *optval,int __user *optlen) +static int hci_sock_getsockopt (struct socket *sock,int level,int optname,char __user *optval,int __user *optlen) {struct hci_ufilter uf;struct sock *sk = sock->sk;
@@ -567,7 +567,7 @@return 0 ; } -struct proto_ops hci_sock_ops = { +static struct proto_ops hci_sock_ops = { .family =PF_BLUETOOTH , .owner =THIS_MODULE , .release = hci_sock_release,
@@ -647,13 +647,13 @@return NOTIFY_DONE ; } -struct net_proto_family hci_sock_family_ops = { +static struct net_proto_family hci_sock_family_ops = { .family =PF_BLUETOOTH , .owner =THIS_MODULE , .create = hci_sock_create, }; -struct notifier_block hci_sock_nblock = { +static struct notifier_block hci_sock_nblock = { .notifier_call = hci_sock_dev_event };
net/bluetooth/l2cap.c renamed from net/bluetooth/l2cap.c.old +1 -1
@@ -61,7 +61,7 @@static struct proto_ops l2cap_sock_ops; -struct bt_sock_list l2cap_sk_list = { +static struct bt_sock_list l2cap_sk_list = { .lock =RW_LOCK_UNLOCKED };
Marcel Holtmann
maintainerHi Adrian,
Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Please comment on which of these changes are correct and which conflict with pending patches.
Please send a separate patch for all the RFCOMM changes, because these conflicts with some pending patches and then it will make it easier for me to merge them.
Quoted 6 lines
Quoted 4 lines
The rest of the changes are fine with me, but I like to see also a separate patch for the CMTP stuff and
cmtp_send_capimsg()don't need a forward declaration. Simply move the function to another place in the source code.splitted patches follow as reply to this email.
all of them are applied to my tree now. Thanks.
Regards
Marcel