bluetooth: Shrink object size, use current logging style
Subsystems (4)
v2 cover bluetooth: Shrink object size, use current logging style
Save some small amount of text and use more common logging styles.
V2:
Separate the logging function patch from the BT_INFO/BT_ERR macro conversion. At some point, the BT_INFO/BT_ERR/BT_DBG macros could be removed.
Joe Perches (3):
bluetooth: Add logging functions bt_info and bt_err
bluetooth: Convert BT_ERR/BT_INFO to bt_err/bt_info
bluetooth: Convert BT_DBG to pr_debug
drivers/bluetooth/ath3k.c | 56 ++++---- drivers/bluetooth/bcm203x.c | 34 ++-- drivers/bluetooth/bfusb.c | 102 +++++++------ drivers/bluetooth/bluecard_cs.c | 17 +- drivers/bluetooth/bpa10x.c | 48 +++--- drivers/bluetooth/bt3c_cs.c | 36 +++-- drivers/bluetooth/btmrvl_debugfs.c | 2 +- drivers/bluetooth/btmrvl_main.c | 102 +++++++------ drivers/bluetooth/btmrvl_sdio.c | 149 +++++++++--------- drivers/bluetooth/btsdio.c | 26 ++-- drivers/bluetooth/btuart_cs.c | 23 ++-- drivers/bluetooth/btusb.c | 86 +++++----- drivers/bluetooth/btwilink.c | 46 +++--- drivers/bluetooth/dtl1_cs.c | 19 ++- drivers/bluetooth/hci_ath.c | 14 +- drivers/bluetooth/hci_bcsp.c | 78 +++++----- drivers/bluetooth/hci_h4.c | 18 +- drivers/bluetooth/hci_ldisc.c | 37 +++--- drivers/bluetooth/hci_ll.c | 83 ++++++----- drivers/bluetooth/hci_vhci.c | 6 +- include/net/bluetooth/bluetooth.h | 14 +- include/net/bluetooth/hci_core.h | 6 +- include/net/bluetooth/l2cap.h | 2 +- net/bluetooth/af_bluetooth.c | 20 ++-- net/bluetooth/bnep/core.c | 30 ++-- net/bluetooth/bnep/netdev.c | 14 +- net/bluetooth/bnep/sock.c | 10 +- net/bluetooth/cmtp/capi.c | 50 +++--- net/bluetooth/cmtp/core.c | 31 ++-- net/bluetooth/cmtp/sock.c | 10 +- net/bluetooth/hci_conn.c | 58 ++++---- net/bluetooth/hci_core.c | 175 +++++++++++---------- net/bluetooth/hci_event.c | 298 ++++++++++++++++++------------------ net/bluetooth/hci_sock.c | 26 ++-- net/bluetooth/hci_sysfs.c | 10 +- net/bluetooth/hidp/core.c | 58 ++++--- net/bluetooth/hidp/sock.c | 10 +- net/bluetooth/l2cap_core.c | 221 ++++++++++++++------------- net/bluetooth/l2cap_sock.c | 40 +++--- net/bluetooth/lib.c | 27 +++- net/bluetooth/mgmt.c | 95 ++++++------ net/bluetooth/rfcomm/core.c | 180 +++++++++++----------- net/bluetooth/rfcomm/sock.c | 57 ++++---- net/bluetooth/rfcomm/tty.c | 106 +++++++------- net/bluetooth/sco.c | 77 +++++----- net/bluetooth/smp.c | 47 +++--- 46 files changed, 1366 insertions(+), 1288 deletions(-)
Signature · 1 line
1.7.8.111.gad25c.dirty
PATCH v2 1/3 bluetooth: Add logging functions bt_info and bt_err
Use specific logging functions instead of a generic bt_printk function can save some text.
Remove now unused bt_printk function.
Add compatibility BT_INFO and BT_ERR macros.
(compiled x86 and defconfig with bluetooth and all bluetooth drivers)
$ size net/bluetooth/built-in.o* text data bss dec hex filename 381662 20072 100416 502150 7a986 net/bluetooth/built-in.o.allyesconfig.new 382463 20072 100400 502935 7ac97 net/bluetooth/built-in.o.allyesconfig.old 126635 1388 132 128155 1f49b net/bluetooth/built-in.o.defconfig.new 127175 1388 132 128695 1f6b7 net/bluetooth/built-in.o.defconfig.old
$ size drivers/bluetooth/built-in.o* 127575 8976 29476 166027 2888b drivers/bluetooth/built-in.o.allyesconfig.new 129512 8976 29516 168004 29044 drivers/bluetooth/built-in.o.allyesconfig.old 52998 3292 156 56446 dc7e drivers/bluetooth/built-in.o.defconfig.new 54358 3292 156 57806 e1ce drivers/bluetooth/built-in.o.defconfig.old
--- include/net/bluetooth/bluetooth.h | 14 ++++++++------ net/bluetooth/lib.c | 27 ++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 9 deletions(-)
include/net/bluetooth/bluetooth.h +8 -6
@@ -109,12 +109,14 @@ struct bt_power {*/ #define BT_CHANNEL_POLICY_AMP_PREFERRED 2 -__printf(2, 3) -int bt_printk (const char *level,const char *fmt, ...); - -#define BT_INFO(fmt, arg...) bt_printk(KERN_INFO, pr_fmt(fmt), ##arg) -#define BT_ERR(fmt, arg...) bt_printk(KERN_ERR, pr_fmt(fmt), ##arg) -#define BT_DBG(fmt, arg...) pr_debug(fmt "\n", ##arg) +__printf(1, 2) +int bt_info (const char *fmt, ...); +__printf(1, 2) +int bt_err (const char *fmt, ...); + +#define BT_INFO (fmt, ...) bt_info(fmt "\n", ##__VA_ARGS__) +#define BT_ERR (fmt, ...) bt_err(fmt "\n", ##__VA_ARGS__) +#define BT_DBG (fmt, ...) pr_debug(fmt "\n", ##__VA_ARGS__)/* Connection and socket states */ enum {
net/bluetooth/lib.c +24 -3
@@ -24,6 +24,8 @@/* Bluetooth kernel library. */ +#define pr_fmt (fmt) "Bluetooth: " fmt +#include <linux/module.h> #include <linux/kernel.h>
@@ -151,7 +153,26 @@ int bt_to_errno(__u16 code) }EXPORT_SYMBOL (bt_to_errno); -int bt_printk (const char *level,const char *format, ...) +int bt_info (const char *format, ...) +{ +struct va_format vaf; +va_list args; +int r; + +va_start (args, format); + + vaf.fmt = format; + vaf.va = &args; + + r =pr_info ("%pV" , &vaf); + +va_end (args); + +return r; +} +EXPORT_SYMBOL (bt_info); + +int bt_err (const char *format, ...) {struct va_format vaf;va_list args;
@@ -162,10 +183,10 @@ int bt_printk(const char *level, const char *format, ...) vaf.fmt = format; vaf.va = &args; - r =printk ("%sBluetooth: %pV\n" , level, &vaf); + r =pr_err ("%pV" , &vaf);va_end (args);return r; } -EXPORT_SYMBOL (bt_printk); +EXPORT_SYMBOL (bt_err);
Signature · 1 line
1.7.8.111.gad25c.dirty
Re: [PATCH V2 1/3] bluetooth: Add logging functions bt_info and bt_err
Hi Joe,
Quoted 21 lines
Use specific logging functions instead of a generic
bt_printkfunction can save some text.Remove now unused
bt_printkfunction.
Add compatibilityBT_INFOandBT_ERRmacros.(compiled x86 and defconfig with bluetooth and all bluetooth drivers)
$ size net/bluetooth/built-in.o* text data bss dec hex filename 381662 20072 100416 502150 7a986 net/bluetooth/built-in.o.allyesconfig.new 382463 20072 100400 502935 7ac97 net/bluetooth/built-in.o.allyesconfig.old 126635 1388 132 128155 1f49b net/bluetooth/built-in.o.defconfig.new 127175 1388 132 128695 1f6b7 net/bluetooth/built-in.o.defconfig.old$ size drivers/bluetooth/built-in.o* 127575 8976 29476 166027 2888b drivers/bluetooth/built-in.o.allyesconfig.new 129512 8976 29516 168004 29044 drivers/bluetooth/built-in.o.allyesconfig.old 52998 3292 156 56446 dc7e drivers/bluetooth/built-in.o.defconfig.new 54358 3292 156 57806 e1ce drivers/bluetooth/built-in.o.defconfig.old
Quoted 5 lines
Signed-off-by Joe Perches <[email protected]>--- include/net/bluetooth/bluetooth.h | 14 ++++++++------ net/bluetooth/lib.c | 27 ++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 9 deletions(-)
lets try to get at least this patch merged. I hope we don't have too many conflicts.
Regards
Marcel
Johan Hedberg
AppliedRe: [PATCH V2 1/3] bluetooth: Add logging functions bt_info and bt_err
Hi,
Quoted 29 lines · Marcel Holtmann
Hi Joe,
Quoted 21 lines
Use specific logging functions instead of a generic
bt_printkfunction can save some text.Remove now unused
bt_printkfunction.
Add compatibilityBT_INFOandBT_ERRmacros.(compiled x86 and defconfig with bluetooth and all bluetooth drivers)
$ size net/bluetooth/built-in.o* text data bss dec hex filename 381662 20072 100416 502150 7a986 net/bluetooth/built-in.o.allyesconfig.new 382463 20072 100400 502935 7ac97 net/bluetooth/built-in.o.allyesconfig.old 126635 1388 132 128155 1f49b net/bluetooth/built-in.o.defconfig.new 127175 1388 132 128695 1f6b7 net/bluetooth/built-in.o.defconfig.old$ size drivers/bluetooth/built-in.o* 127575 8976 29476 166027 2888b drivers/bluetooth/built-in.o.allyesconfig.new 129512 8976 29516 168004 29044 drivers/bluetooth/built-in.o.allyesconfig.old 52998 3292 156 56446 dc7e drivers/bluetooth/built-in.o.defconfig.new 54358 3292 156 57806 e1ce drivers/bluetooth/built-in.o.defconfig.oldQuoted 5 lines
Signed-off-by Joe Perches <[email protected]>--- include/net/bluetooth/bluetooth.h | 14 ++++++++------ net/bluetooth/lib.c | 27 ++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 9 deletions(-)
Quoted 4 lines
lets try to get at least this patch merged. I hope we don't have too many conflicts.
Acked-by Marcel Holtmann <[email protected]>
Applied to my bluetooth-next tree. Thanks.
Johan
PATCH v2 2/3 bluetooth: Convert BT_ERR/BT_INFO to bt_err/bt_info
In reply to Joe PerchesUse the more common kernel style functions rather than an upper case macro.
Add newlines to end of formats.
Coalesce formats, align arguments.
--- drivers/bluetooth/ath3k.c | 46 +++++++------- drivers/bluetooth/bcm203x.c | 24 ++++---- drivers/bluetooth/bfusb.c | 67 +++++++++++--------- drivers/bluetooth/bluecard_cs.c | 17 +++--- drivers/bluetooth/bpa10x.c | 18 +++--- drivers/bluetooth/bt3c_cs.c | 36 ++++++----- drivers/bluetooth/btmrvl_debugfs.c | 2 +- drivers/bluetooth/btmrvl_main.c | 39 ++++++------ drivers/bluetooth/btmrvl_sdio.c | 122 +++++++++++++++++------------------- drivers/bluetooth/btsdio.c | 2 +- drivers/bluetooth/btuart_cs.c | 23 ++++--- drivers/bluetooth/btusb.c | 38 ++++++------ drivers/bluetooth/btwilink.c | 29 ++++----- drivers/bluetooth/dtl1_cs.c | 19 +++--- drivers/bluetooth/hci_ath.c | 6 +- drivers/bluetooth/hci_bcsp.c | 50 ++++++++------- drivers/bluetooth/hci_h4.c | 8 +- drivers/bluetooth/hci_ldisc.c | 14 ++-- drivers/bluetooth/hci_ll.c | 33 ++++++---- drivers/bluetooth/hci_vhci.c | 6 +- include/net/bluetooth/hci_core.h | 6 +- net/bluetooth/af_bluetooth.c | 4 +- net/bluetooth/bnep/core.c | 4 +- net/bluetooth/bnep/netdev.c | 2 +- net/bluetooth/bnep/sock.c | 4 +- net/bluetooth/cmtp/capi.c | 19 +++--- net/bluetooth/cmtp/core.c | 8 +- net/bluetooth/cmtp/sock.c | 4 +- net/bluetooth/hci_core.c | 24 ++++---- net/bluetooth/hci_event.c | 16 +++--- net/bluetooth/hci_sock.c | 6 +- net/bluetooth/hci_sysfs.c | 2 +- net/bluetooth/hidp/core.c | 14 +++-- net/bluetooth/hidp/sock.c | 4 +- net/bluetooth/l2cap_core.c | 32 +++++----- net/bluetooth/l2cap_sock.c | 6 +- net/bluetooth/mgmt.c | 6 +- net/bluetooth/rfcomm/core.c | 16 +++--- net/bluetooth/rfcomm/sock.c | 8 +- net/bluetooth/rfcomm/tty.c | 18 +++--- net/bluetooth/sco.c | 8 +- net/bluetooth/smp.c | 14 ++-- 42 files changed, 419 insertions(+), 405 deletions(-)
drivers/bluetooth/ath3k.c +23 -23
@@ -108,7 +108,7 @@ static int ath3k_load_firmware(struct usb_device *udev, send_buf =kmalloc (BULK_SIZE ,GFP_KERNEL );if (!send_buf) { -BT_ERR ("Can't allocate memory chunk for firmware" ); +bt_err ("Can't allocate memory chunk for firmware\n" );return -ENOMEM ; }
@@ -117,7 +117,7 @@ static int ath3k_load_firmware(struct usb_device *udev, USB_REQ_DFU_DNLOAD, USB_TYPE_VENDOR, 0, 0, send_buf, 20, USB_CTRL_SET_TIMEOUT)) < 0) { -BT_ERR ("Can't change to loading configuration err" ); +bt_err ("Can't change to loading configuration err\n" ); goto error; } sent +=20 ;
@@ -132,8 +132,8 @@ static int ath3k_load_firmware(struct usb_device *udev, &len, 3000);if (err || (len != size)) { -BT_ERR ("Error in firmware loading err = %d," -"len = %d, size = %d" , err, len, size); +bt_err ("Error in firmware loading err = %d, len = %d, size = %d\n" , + err, len, size); goto error; }
@@ -179,7 +179,7 @@ static int ath3k_load_fwfile(struct usb_device *udev, send_buf =kmalloc (BULK_SIZE ,GFP_KERNEL );if (!send_buf) { -BT_ERR ("Can't allocate memory chunk for firmware" ); +bt_err ("Can't allocate memory chunk for firmware\n" );return -ENOMEM ; }
@@ -191,7 +191,7 @@ static int ath3k_load_fwfile(struct usb_device *udev,USB_TYPE_VENDOR ,0 ,0 , send_buf, size, USB_CTRL_SET_TIMEOUT);if (ret <0 ) { -BT_ERR ("Can't change to loading configuration err" ); +bt_err ("Can't change to loading configuration err\n" );kfree (send_buf);return ret; }
@@ -208,8 +208,8 @@ static int ath3k_load_fwfile(struct usb_device *udev, err =usb_bulk_msg (udev, pipe, send_buf, size, &len,3000 );if (err || (len != size)) { -BT_ERR ("Error in firmware loading err = %d," -"len = %d, size = %d" , err, len, size); +bt_err ("Error in firmware loading err = %d, len = %d, size = %d\n" , + err, len, size);kfree (send_buf);return err; }
@@ -238,7 +238,7 @@ static int ath3k_set_normal_mode(struct usb_device *udev) ret =ath3k_get_state (udev, &fw_state);if (ret <0 ) { -BT_ERR ("Can't get state to change to normal mode err" ); +bt_err ("Can't get state to change to normal mode err\n" );return ret; }
@@ -263,7 +263,7 @@ static int ath3k_load_patch(struct usb_device *udev) ret =ath3k_get_state (udev, &fw_state);if (ret <0 ) { -BT_ERR ("Can't get state to change to load ram patch err" ); +bt_err ("Can't get state to change to load ram patch err\n" );return ret; }
@@ -274,7 +274,7 @@ static int ath3k_load_patch(struct usb_device *udev) ret =ath3k_get_version (udev, &fw_version);if (ret <0 ) { -BT_ERR ("Can't get version to change to load ram patch err" ); +bt_err ("Can't get version to change to load ram patch err\n" );return ret; }
@@ -283,7 +283,7 @@ static int ath3k_load_patch(struct usb_device *udev) ret =request_firmware (&firmware, filename, &udev->dev);if (ret <0 ) { -BT_ERR ("Patch file not found %s" , filename); +bt_err ("Patch file not found %s\n" , filename);return ret; }
@@ -293,7 +293,7 @@ static int ath3k_load_patch(struct usb_device *udev)if ((pt_version.rom_version != fw_version.rom_version) || (pt_version.build_version <= fw_version.build_version)) { -BT_ERR ("Patch file version did not match with firmware" ); +bt_err ("Patch file version did not match with firmware\n" );release_firmware (firmware);return -EINVAL ; }
@@ -314,13 +314,13 @@ static int ath3k_load_syscfg(struct usb_device *udev) ret =ath3k_get_state (udev, &fw_state);if (ret <0 ) { -BT_ERR ("Can't get state to change to load configration err" ); +bt_err ("Can't get state to change to load configration err\n" );return -EBUSY ; } ret =ath3k_get_version (udev, &fw_version);if (ret <0 ) { -BT_ERR ("Can't get version to change to load ram patch err" ); +bt_err ("Can't get version to change to load ram patch err\n" );return ret; }
@@ -345,7 +345,7 @@ static int ath3k_load_syscfg(struct usb_device *udev) ret =request_firmware (&firmware, filename, &udev->dev);if (ret <0 ) { -BT_ERR ("Configuration file not found %s" , filename); +bt_err ("Configuration file not found %s\n" , filename);return ret; }
@@ -384,17 +384,17 @@ static int ath3k_probe(struct usb_interface *intf, ret =ath3k_load_patch (udev);if (ret <0 ) { -BT_ERR ("Loading patch file failed" ); +bt_err ("Loading patch file failed\n" );return ret; } ret =ath3k_load_syscfg (udev);if (ret <0 ) { -BT_ERR ("Loading sysconfig file failed" ); +bt_err ("Loading sysconfig file failed\n" );return ret; } ret =ath3k_set_normal_mode (udev);if (ret <0 ) { -BT_ERR ("Set normal mode failed" ); +bt_err ("Set normal mode failed\n" );return ret; }ath3k_switch_pid (udev);
@@ -404,11 +404,11 @@ static int ath3k_probe(struct usb_interface *intf, ret =request_firmware (&firmware,ATH3K_FIRMWARE , &udev->dev);if (ret <0 ) {if (ret == -ENOENT ) -BT_ERR ("Firmware file \"%s\" not found" , -ATH3K_FIRMWARE ); +bt_err ("Firmware file \"%s\" not found\n" , +ATH3K_FIRMWARE );else -BT_ERR ("Firmware file \"%s\" request failed (err=%d)" , -ATH3K_FIRMWARE , ret); +bt_err ("Firmware file \"%s\" request failed (err=%d)\n" , +ATH3K_FIRMWARE , ret);return ret; }
drivers/bluetooth/bcm203x.c +12 -12
@@ -85,7 +85,7 @@ static void bcm203x_complete(struct urb *urb)BT_DBG ("udev %p urb %p" , udev, urb);if (urb->status) { -BT_ERR ("URB failed with status %d" , urb->status); +bt_err ("URB failed with status %d\n" , urb->status); data->state =BCM203X_ERROR ;return ; }
@@ -110,12 +110,12 @@ static void bcm203x_complete(struct urb *urb) data->state =BCM203X_CHECK_MEMORY ;if (usb_submit_urb (data->urb,GFP_ATOMIC ) <0 ) -BT_ERR ("Can't submit URB" ); +bt_err ("Can't submit URB\n" );break ;case BCM203X_CHECK_MEMORY :if (data->buffer[0 ] !='#' ) { -BT_ERR ("Memory select failed" ); +bt_err ("Memory select failed\n" ); data->state =BCM203X_ERROR ;break ; }
@@ -138,12 +138,12 @@ static void bcm203x_complete(struct urb *urb) }if (usb_submit_urb (data->urb,GFP_ATOMIC ) <0 ) -BT_ERR ("Can't submit URB" ); +bt_err ("Can't submit URB\n" );break ;case BCM203X_CHECK_FIRMWARE :if (data->buffer[0 ] !='.' ) { -BT_ERR ("Firmware loading failed" ); +bt_err ("Firmware loading failed\n" ); data->state =BCM203X_ERROR ;break ; }
@@ -162,7 +162,7 @@ static void bcm203x_work(struct work_struct *work)return ;if (usb_submit_urb (data->urb,GFP_KERNEL ) <0 ) -BT_ERR ("Can't submit URB" ); +bt_err ("Can't submit URB\n" ); }static int bcm203x_probe (struct usb_interface *intf,const struct usb_device_id *id)
@@ -179,7 +179,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id data =kzalloc (sizeof (*data),GFP_KERNEL );if (!data) { -BT_ERR ("Can't allocate memory for data structure" ); +bt_err ("Can't allocate memory for data structure\n" );return -ENOMEM ; }
@@ -188,13 +188,13 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id data->urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!data->urb) { -BT_ERR ("Can't allocate URB" ); +bt_err ("Can't allocate URB\n" );kfree (data);return -ENOMEM ; }if (request_firmware (&firmware,"BCM2033-MD.hex" , &udev->dev) <0 ) { -BT_ERR ("Mini driver request failed" ); +bt_err ("Mini driver request failed\n" );usb_free_urb (data->urb);kfree (data);return -EIO ;
@@ -206,7 +206,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id data->buffer =kmalloc (size,GFP_KERNEL );if (!data->buffer) { -BT_ERR ("Can't allocate memory for mini driver" ); +bt_err ("Can't allocate memory for mini driver\n" );release_firmware (firmware);usb_free_urb (data->urb);kfree (data);
@@ -221,7 +221,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_idrelease_firmware (firmware);if (request_firmware (&firmware,"BCM2033-FW.bin" , &udev->dev) <0 ) { -BT_ERR ("Firmware request failed" ); +bt_err ("Firmware request failed\n" );usb_free_urb (data->urb);kfree (data->buffer);kfree (data);
@@ -232,7 +232,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id data->fw_data =kmemdup (firmware->data, firmware->size,GFP_KERNEL );if (!data->fw_data) { -BT_ERR ("Can't allocate memory for firmware image" ); +bt_err ("Can't allocate memory for firmware image\n" );release_firmware (firmware);usb_free_urb (data->urb);kfree (data->buffer);
drivers/bluetooth/bfusb.c +36 -31
224 lines not on this page · raw message
drivers/bluetooth/bluecard_cs.c +9 -8
@@ -218,7 +218,7 @@ static int bluecard_write(unsigned int iobase, unsigned int offset, __u8 *buf, istatic void bluecard_write_wakeup (bluecard_info_t *info) {if (!info) { -BT_ERR ("Unknown device" ); +bt_err ("Unknown device\n" );return ; }
@@ -374,7 +374,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)int i, len;if (!info) { -BT_ERR ("Unknown device" ); +bt_err ("Unknown device\n" );return ; }
@@ -392,7 +392,7 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset) info->rx_state =RECV_WAIT_PACKET_TYPE ; info->rx_count =0 ;if (!(info->rx_skb =bt_skb_alloc (HCI_MAX_FRAME_SIZE ,GFP_ATOMIC ))) { -BT_ERR ("Can't allocate mem for new packet" ); +bt_err ("Can't allocate mem for new packet\n" );return ; } }
@@ -434,7 +434,8 @@ static void bluecard_receive(bluecard_info_t *info, unsigned int offset)default :/* unknown packet */ -BT_ERR ("Unknown HCI packet with type 0x%02x received" ,bt_cb (info->rx_skb)->pkt_type); +bt_err ("Unknown HCI packet with type 0x%02x received\n" , +bt_cb (info->rx_skb)->pkt_type); info->hdev->stat.err_rx++;kfree_skb (info->rx_skb);
@@ -568,7 +569,7 @@ static int bluecard_hci_set_baud_rate(struct hci_dev *hdev, int baud)unsigned char cmd[] = {HCI_COMMAND_PKT ,0x09 ,0xfc ,0x01 ,0x03 };if (!(skb =bt_skb_alloc (HCI_MAX_FRAME_SIZE ,GFP_ATOMIC ))) { -BT_ERR ("Can't allocate mem for new packet" ); +bt_err ("Can't allocate mem for new packet\n" );return -1 ; }
@@ -663,7 +664,7 @@ static int bluecard_hci_send_frame(struct sk_buff *skb)struct hci_dev *hdev = (struct hci_dev *)(skb->dev);if (!hdev) { -BT_ERR ("Frame for unknown HCI device (hdev=NULL)" ); +bt_err ("Frame for unknown HCI device (hdev=NULL)\n" );return -ENODEV ; }
@@ -727,7 +728,7 @@ static int bluecard_open(bluecard_info_t *info)/* Initialize HCI device */ hdev =hci_alloc_dev ();if (!hdev) { -BT_ERR ("Can't allocate HCI device" ); +bt_err ("Can't allocate HCI device\n" );return -ENOMEM ; }
@@ -815,7 +816,7 @@ static int bluecard_open(bluecard_info_t *info)/* Register HCI device */ if (hci_register_dev (hdev) <0 ) { -BT_ERR ("Can't register HCI device" ); +bt_err ("Can't register HCI device\n" ); info->hdev =NULL ;hci_free_dev (hdev);return -ENODEV ;
drivers/bluetooth/bpa10x.c +9 -9
@@ -125,7 +125,7 @@ static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count) skb =bt_skb_alloc (len,GFP_ATOMIC );if (!skb) { -BT_ERR ("%s no memory for packet" , hdev->name); +bt_err ("%s no memory for packet\n" , hdev->name);return -ENOMEM ; }
@@ -202,7 +202,7 @@ static void bpa10x_rx_complete(struct urb *urb)if (bpa10x_recv (hdev,usb_pipebulk (urb->pipe), urb->transfer_buffer, urb->actual_length) <0 ) { -BT_ERR ("%s corrupted event packet" , hdev->name); +bt_err ("%s corrupted event packet\n" , hdev->name); hdev->stat.err_rx++; } }
@@ -211,8 +211,8 @@ static void bpa10x_rx_complete(struct urb *urb) err =usb_submit_urb (urb,GFP_ATOMIC );if (err <0 ) { -BT_ERR ("%s urb %p failed to resubmit (%d)" , - hdev->name, urb, -err); +bt_err ("%s urb %p failed to resubmit (%d)\n" , + hdev->name, urb, -err);usb_unanchor_urb (urb); } }
@@ -248,8 +248,8 @@ static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev) err =usb_submit_urb (urb,GFP_KERNEL );if (err <0 ) { -BT_ERR ("%s urb %p submission failed (%d)" , - hdev->name, urb, -err); +bt_err ("%s urb %p submission failed (%d)\n" , + hdev->name, urb, -err);usb_unanchor_urb (urb); }
@@ -289,8 +289,8 @@ static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev) err =usb_submit_urb (urb,GFP_KERNEL );if (err <0 ) { -BT_ERR ("%s urb %p submission failed (%d)" , - hdev->name, urb, -err); +bt_err ("%s urb %p submission failed (%d)\n" , + hdev->name, urb, -err);usb_unanchor_urb (urb); }
@@ -422,7 +422,7 @@ static int bpa10x_send_frame(struct sk_buff *skb) err =usb_submit_urb (urb,GFP_ATOMIC );if (err <0 ) { -BT_ERR ("%s urb %p submission failed" , hdev->name, urb); +bt_err ("%s urb %p submission failed\n" , hdev->name, urb);kfree (urb->setup_packet);usb_unanchor_urb (urb); }
drivers/bluetooth/bt3c_cs.c +19 -17
@@ -179,7 +179,7 @@ static int bt3c_write(unsigned int iobase, int fifo_size, __u8 *buf, int len)static void bt3c_write_wakeup (bt3c_info_t *info) {if (!info) { -BT_ERR ("Unknown device" ); +bt_err ("Unknown device\n" );return ; }
@@ -204,7 +204,7 @@ static void bt3c_write_wakeup(bt3c_info_t *info) len =bt3c_write (iobase,256 , skb->data, skb->len);if (len != skb->len) { -BT_ERR ("Very strange" ); +bt_err ("Very strange\n" ); }kfree_skb (skb);
@@ -221,7 +221,7 @@ static void bt3c_receive(bt3c_info_t *info)int size =0 , avail;if (!info) { -BT_ERR ("Unknown device" ); +bt_err ("Unknown device\n" );return ; }
@@ -240,7 +240,7 @@ static void bt3c_receive(bt3c_info_t *info) info->rx_state =RECV_WAIT_PACKET_TYPE ; info->rx_count =0 ;if (!(info->rx_skb =bt_skb_alloc (HCI_MAX_FRAME_SIZE ,GFP_ATOMIC ))) { -BT_ERR ("Can't allocate mem for new packet" ); +bt_err ("Can't allocate mem for new packet\n" );return ; } }
@@ -272,7 +272,8 @@ static void bt3c_receive(bt3c_info_t *info)default :/* Unknown packet */ -BT_ERR ("Unknown HCI packet with type 0x%02x received" ,bt_cb (info->rx_skb)->pkt_type); +bt_err ("Unknown HCI packet with type 0x%02x received\n" , +bt_cb (info->rx_skb)->pkt_type); info->hdev->stat.err_rx++;clear_bit (HCI_RUNNING , &(info->hdev->flags));
@@ -355,17 +356,18 @@ static irqreturn_t bt3c_interrupt(int irq, void *dev_inst)int stat =bt3c_read (iobase,0x7001 );if ((stat &0xff ) ==0x7f ) { -BT_ERR ("Very strange (stat=0x%04x)" , stat); +bt_err ("Very strange (stat=0x%04x)\n" , stat); }else if ((stat &0xff ) !=0xff ) {if (stat &0x0020 ) {int status =bt3c_read (iobase,0x7002 ) &0x10 ; -BT_INFO ("%s: Antenna %s" , info->hdev->name, - status ?"out" :"in" ); +bt_info ("%s: Antenna %s\n" , + info->hdev->name, + status ?"out" :"in" ); }if (stat &0x0001 )bt3c_receive (info);if (stat &0x0002 ) { -//BT_ERR("Ack (stat=0x%04x)", stat); +/*bt_err("Ack (stat=0x%04x)\n", stat);*/ clear_bit (XMIT_SENDING , &(info->tx_state));bt3c_write_wakeup (info); }
@@ -424,7 +426,7 @@ static int bt3c_hci_send_frame(struct sk_buff *skb)unsigned long flags;if (!hdev) { -BT_ERR ("Frame for unknown HCI device (hdev=NULL)" ); +bt_err ("Frame for unknown HCI device (hdev=NULL)\n" );return -ENODEV ; }
@@ -494,7 +496,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware,/* Load */ while (count) {if (ptr[0 ] !='S' ) { -BT_ERR ("Bad address in firmware" ); +bt_err ("Bad address in firmware\n" ); err = -EFAULT ; goto error; }
@@ -518,7 +520,7 @@ static int bt3c_load_firmware(bt3c_info_t *info, const unsigned char *firmware, }if (((tmp + fcs) &0xff ) !=0xff ) { -BT_ERR ("Checksum error in firmware" ); +bt_err ("Checksum error in firmware\n" ); err = -EILSEQ ; goto error; }
@@ -573,7 +575,7 @@ static int bt3c_open(bt3c_info_t *info)/* Initialize HCI device */ hdev =hci_alloc_dev ();if (!hdev) { -BT_ERR ("Can't allocate HCI device" ); +bt_err ("Can't allocate HCI device\n" );return -ENOMEM ; }
@@ -595,7 +597,7 @@ static int bt3c_open(bt3c_info_t *info)/* Load firmware */ err =request_firmware (&firmware,"BT3CPCC.bin" , &info->p_dev->dev);if (err <0 ) { -BT_ERR ("Firmware request failed" ); +bt_err ("Firmware request failed\n" ); goto error; }
@@ -604,7 +606,7 @@ static int bt3c_open(bt3c_info_t *info)release_firmware (firmware);if (err <0 ) { -BT_ERR ("Firmware loading failed" ); +bt_err ("Firmware loading failed\n" ); goto error; }
@@ -614,7 +616,7 @@ static int bt3c_open(bt3c_info_t *info)/* Register HCI device */ err =hci_register_dev (hdev);if (err <0 ) { -BT_ERR ("Can't register HCI device" ); +bt_err ("Can't register HCI device\n" ); goto error; }
@@ -726,7 +728,7 @@ static int bt3c_config(struct pcmcia_device *link)if (!pcmcia_loop_config (link, bt3c_check_config_notpicky,NULL )) goto found_port; -BT_ERR ("No usable port range found" ); +bt_err ("No usable port range found\n" ); goto failed; found_port:
drivers/bluetooth/btmrvl_debugfs.c +1 -1
@@ -394,7 +394,7 @@ void btmrvl_debugfs_init(struct hci_dev *hdev) priv->debugfs_data = dbg;if (!dbg) { -BT_ERR ("Can not allocate memory for btmrvl_debugfs_data." ); +bt_err ("Can not allocate memory for btmrvl_debugfs_data\n" );return ; }
drivers/bluetooth/btmrvl_main.c +20 -19
@@ -164,7 +164,7 @@ int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd) skb =bt_skb_alloc (sizeof (*cmd),GFP_ATOMIC );if (skb ==NULL ) { -BT_ERR ("No free skb" ); +bt_err ("No free skb\n" );return -ENOMEM ; }
@@ -190,8 +190,8 @@ int btmrvl_send_module_cfg_cmd(struct btmrvl_private *priv, int subcmd) priv->adapter->cmd_complete, msecs_to_jiffies(WAIT_UNTIL_CMD_RESP))) { ret = -ETIMEDOUT ; -BT_ERR ("module_cfg_cmd(%x): timeout: %d" , - subcmd, priv->btmrvl_dev.sendcmdflag); +bt_err ("module_cfg_cmd(%x): timeout: %d\n" , + subcmd, priv->btmrvl_dev.sendcmdflag); }BT_DBG ("module cfg Command done" );
@@ -207,7 +207,7 @@ int btmrvl_enable_ps(struct btmrvl_private *priv) skb =bt_skb_alloc (sizeof (*cmd),GFP_ATOMIC );if (skb ==NULL ) { -BT_ERR ("No free skb" ); +bt_err ("No free skb\n" );return -ENOMEM ; }
@@ -240,7 +240,7 @@ static int btmrvl_enable_hs(struct btmrvl_private *priv) skb =bt_skb_alloc (sizeof (*cmd),GFP_ATOMIC );if (skb ==NULL ) { -BT_ERR ("No free skb" ); +bt_err ("No free skb\n" );return -ENOMEM ; }
@@ -261,9 +261,10 @@ static int btmrvl_enable_hs(struct btmrvl_private *priv) priv->adapter->hs_state, msecs_to_jiffies(WAIT_UNTIL_HS_STATE_CHANGED))) { ret = -ETIMEDOUT ; -BT_ERR ("timeout: %d, %d,%d" , priv->adapter->hs_state, - priv->adapter->ps_state, - priv->adapter->wakeup_tries); +bt_err ("timeout: %d, %d,%d\n" , + priv->adapter->hs_state, + priv->adapter->ps_state, + priv->adapter->wakeup_tries); }return ret;
@@ -280,7 +281,7 @@ int btmrvl_prepare_command(struct btmrvl_private *priv) skb =bt_skb_alloc (sizeof (*cmd),GFP_ATOMIC );if (skb ==NULL ) { -BT_ERR ("No free skb" ); +bt_err ("No free skb\n" );return -ENOMEM ; }
@@ -326,8 +327,8 @@ static int btmrvl_tx_pkt(struct btmrvl_private *priv, struct sk_buff *skb)return -EINVAL ;if (!skb->len || ((skb->len +BTM_HEADER_LEN ) >BTM_UPLD_SIZE )) { -BT_ERR ("Tx Error: Bad skb length %d : %d" , - skb->len,BTM_UPLD_SIZE ); +bt_err ("Tx Error: Bad skb length %d : %d\n" , + skb->len,BTM_UPLD_SIZE );return -EINVAL ; }
@@ -336,8 +337,8 @@ static int btmrvl_tx_pkt(struct btmrvl_private *priv, struct sk_buff *skb) skb =skb_realloc_headroom (skb,BTM_HEADER_LEN );if (!skb) { -BT_ERR ("Tx Error: realloc_headroom failed %d" , -BTM_HEADER_LEN ); +bt_err ("Tx Error: realloc_headroom failed %d\n" , +BTM_HEADER_LEN ); skb = tmp;return -EINVAL ; }
@@ -399,13 +400,13 @@ static int btmrvl_send_frame(struct sk_buff *skb)BT_DBG ("type=%d, len=%d" , skb->pkt_type, skb->len);if (!hdev || !hdev->driver_data) { -BT_ERR ("Frame for unknown HCI device" ); +bt_err ("Frame for unknown HCI device\n" );return -ENODEV ; } priv = (struct btmrvl_private *) hdev->driver_data;if (!test_bit (HCI_RUNNING , &hdev->flags)) { -BT_ERR ("Failed testing HCI_RUNING, flags=%lx" , hdev->flags); +bt_err ("Failed testing HCI_RUNING, flags=%lx\n" , hdev->flags);print_hex_dump_bytes ("data: " ,DUMP_PREFIX_OFFSET , skb->data, skb->len);return -EBUSY ;
@@ -541,7 +542,7 @@ int btmrvl_register_hdev(struct btmrvl_private *priv) hdev =hci_alloc_dev ();if (!hdev) { -BT_ERR ("Can not allocate HCI device" ); +bt_err ("Can not allocate HCI device\n" ); goto err_hdev; }
@@ -563,7 +564,7 @@ int btmrvl_register_hdev(struct btmrvl_private *priv) ret =hci_register_dev (hdev);if (ret <0 ) { -BT_ERR ("Can not register HCI device" ); +bt_err ("Can not register HCI device\n" ); goto err_hci_register_dev; }
@@ -593,13 +594,13 @@ struct btmrvl_private *btmrvl_add_card(void *card) priv =kzalloc (sizeof (*priv),GFP_KERNEL );if (!priv) { -BT_ERR ("Can not allocate priv" ); +bt_err ("Can not allocate priv\n" ); goto err_priv; } priv->adapter =kzalloc (sizeof (*priv->adapter),GFP_KERNEL );if (!priv->adapter) { -BT_ERR ("Allocate buffer for btmrvl_adapter failed!" ); +bt_err ("Allocate buffer for btmrvl_adapter failed!\n" ); goto err_adapter; }
drivers/bluetooth/btmrvl_sdio.c +58 -64
386 lines not on this page · raw message
drivers/bluetooth/btsdio.c +1 -1
@@ -389,7 +389,7 @@ static struct sdio_driver btsdio_driver = {static int __init btsdio_init (void ) { -BT_INFO ("Generic Bluetooth SDIO driver ver %s" ,VERSION ); +bt_info ("Generic Bluetooth SDIO driver ver %s\n" ,VERSION );return sdio_register_driver (&btsdio_driver); }
drivers/bluetooth/btuart_cs.c +12 -11
@@ -131,7 +131,7 @@ static int btuart_write(unsigned int iobase, int fifo_size, __u8 *buf, int len)static void btuart_write_wakeup (btuart_info_t *info) {if (!info) { -BT_ERR ("Unknown device" ); +bt_err ("Unknown device\n" );return ; }
@@ -178,7 +178,7 @@ static void btuart_receive(btuart_info_t *info)int boguscount =0 ;if (!info) { -BT_ERR ("Unknown device" ); +bt_err ("Unknown device\n" );return ; }
@@ -192,7 +192,7 @@ static void btuart_receive(btuart_info_t *info) info->rx_state =RECV_WAIT_PACKET_TYPE ; info->rx_count =0 ;if (!(info->rx_skb =bt_skb_alloc (HCI_MAX_FRAME_SIZE ,GFP_ATOMIC ))) { -BT_ERR ("Can't allocate mem for new packet" ); +bt_err ("Can't allocate mem for new packet\n" );return ; } }
@@ -221,7 +221,8 @@ static void btuart_receive(btuart_info_t *info)default :/* Unknown packet */ -BT_ERR ("Unknown HCI packet with type 0x%02x received" ,bt_cb (info->rx_skb)->pkt_type); +bt_err ("Unknown HCI packet with type 0x%02x received\n" , +bt_cb (info->rx_skb)->pkt_type); info->hdev->stat.err_rx++;clear_bit (HCI_RUNNING , &(info->hdev->flags));
@@ -309,7 +310,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst)switch (iir) {case UART_IIR_RLSI : -BT_ERR ("RLSI" ); +bt_err ("RLSI\n" );break ;case UART_IIR_RDI :/* Receive interrupt */
@@ -322,7 +323,7 @@ static irqreturn_t btuart_interrupt(int irq, void *dev_inst) }break ;default : -BT_ERR ("Unhandled IIR=%#x" , iir); +bt_err ("Unhandled IIR=%#x\n" , iir);break ; }
@@ -349,7 +350,7 @@ static void btuart_change_speed(btuart_info_t *info, unsigned int speed)int divisor;if (!info) { -BT_ERR ("Unknown device" ); +bt_err ("Unknown device\n" );return ; }
@@ -431,7 +432,7 @@ static int btuart_hci_send_frame(struct sk_buff *skb)struct hci_dev *hdev = (struct hci_dev *)(skb->dev);if (!hdev) { -BT_ERR ("Frame for unknown HCI device (hdev=NULL)" ); +bt_err ("Frame for unknown HCI device (hdev=NULL)\n" );return -ENODEV ; }
@@ -491,7 +492,7 @@ static int btuart_open(btuart_info_t *info)/* Initialize HCI device */ hdev =hci_alloc_dev ();if (!hdev) { -BT_ERR ("Can't allocate HCI device" ); +bt_err ("Can't allocate HCI device\n" );return -ENOMEM ; }
@@ -534,7 +535,7 @@ static int btuart_open(btuart_info_t *info)/* Register HCI device */ if (hci_register_dev (hdev) <0 ) { -BT_ERR ("Can't register HCI device" ); +bt_err ("Can't register HCI device\n" ); info->hdev =NULL ;hci_free_dev (hdev);return -ENODEV ;
@@ -655,7 +656,7 @@ static int btuart_config(struct pcmcia_device *link)if (!pcmcia_loop_config (link, btuart_check_config_notpicky,NULL )) goto found_port; -BT_ERR ("No usable port range found" ); +bt_err ("No usable port range found\n" ); goto failed; found_port:
drivers/bluetooth/btusb.c +19 -19
@@ -259,7 +259,7 @@ static void btusb_intr_complete(struct urb *urb)if (hci_recv_fragment (hdev,HCI_EVENT_PKT , urb->transfer_buffer, urb->actual_length) <0 ) { -BT_ERR ("%s corrupted event packet" , hdev->name); +bt_err ("%s corrupted event packet\n" , hdev->name); hdev->stat.err_rx++; } }
@@ -275,8 +275,8 @@ static void btusb_intr_complete(struct urb *urb)/* -EPERM: urb is being killed; * -ENODEV: device got disconnected */ if (err != -EPERM && err != -ENODEV ) -BT_ERR ("%s urb %p failed to resubmit (%d)" , - hdev->name, urb, -err); +bt_err ("%s urb %p failed to resubmit (%d)\n" , + hdev->name, urb, -err);usb_unanchor_urb (urb); } }
@@ -319,8 +319,8 @@ static int btusb_submit_intr_urb(struct hci_dev *hdev, gfp_t mem_flags) err =usb_submit_urb (urb, mem_flags);if (err <0 ) {if (err != -EPERM && err != -ENODEV ) -BT_ERR ("%s urb %p submission failed (%d)" , - hdev->name, urb, -err); +bt_err ("%s urb %p submission failed (%d)\n" , + hdev->name, urb, -err);usb_unanchor_urb (urb); }
@@ -347,7 +347,7 @@ static void btusb_bulk_complete(struct urb *urb)if (hci_recv_fragment (hdev,HCI_ACLDATA_PKT , urb->transfer_buffer, urb->actual_length) <0 ) { -BT_ERR ("%s corrupted ACL packet" , hdev->name); +bt_err ("%s corrupted ACL packet\n" , hdev->name); hdev->stat.err_rx++; } }
@@ -363,8 +363,8 @@ static void btusb_bulk_complete(struct urb *urb)/* -EPERM: urb is being killed; * -ENODEV: device got disconnected */ if (err != -EPERM && err != -ENODEV ) -BT_ERR ("%s urb %p failed to resubmit (%d)" , - hdev->name, urb, -err); +bt_err ("%s urb %p failed to resubmit (%d)\n" , + hdev->name, urb, -err);usb_unanchor_urb (urb); } }
@@ -405,8 +405,8 @@ static int btusb_submit_bulk_urb(struct hci_dev *hdev, gfp_t mem_flags) err =usb_submit_urb (urb, mem_flags);if (err <0 ) {if (err != -EPERM && err != -ENODEV ) -BT_ERR ("%s urb %p submission failed (%d)" , - hdev->name, urb, -err); +bt_err ("%s urb %p submission failed (%d)\n" , + hdev->name, urb, -err);usb_unanchor_urb (urb); }
@@ -440,7 +440,7 @@ static void btusb_isoc_complete(struct urb *urb)if (hci_recv_fragment (hdev,HCI_SCODATA_PKT , urb->transfer_buffer + offset, length) <0 ) { -BT_ERR ("%s corrupted SCO packet" , hdev->name); +bt_err ("%s corrupted SCO packet\n" , hdev->name); hdev->stat.err_rx++; } }
@@ -456,8 +456,8 @@ static void btusb_isoc_complete(struct urb *urb)/* -EPERM: urb is being killed; * -ENODEV: device got disconnected */ if (err != -EPERM && err != -ENODEV ) -BT_ERR ("%s urb %p failed to resubmit (%d)" , - hdev->name, urb, -err); +bt_err ("%s urb %p failed to resubmit (%d)\n" , + hdev->name, urb, -err);usb_unanchor_urb (urb); } }
@@ -524,8 +524,8 @@ static int btusb_submit_isoc_urb(struct hci_dev *hdev, gfp_t mem_flags) err =usb_submit_urb (urb, mem_flags);if (err <0 ) {if (err != -EPERM && err != -ENODEV ) -BT_ERR ("%s urb %p submission failed (%d)" , - hdev->name, urb, -err); +bt_err ("%s urb %p submission failed (%d)\n" , + hdev->name, urb, -err);usb_unanchor_urb (urb); }
@@ -772,8 +772,8 @@ skip_waking: err =usb_submit_urb (urb,GFP_ATOMIC );if (err <0 ) {if (err != -EPERM && err != -ENODEV ) -BT_ERR ("%s urb %p submission failed (%d)" , - hdev->name, urb, -err); +bt_err ("%s urb %p submission failed (%d)\n" , + hdev->name, urb, -err);kfree (urb->setup_packet);usb_unanchor_urb (urb); }else {
@@ -818,7 +818,7 @@ static inline int __set_isoc_interface(struct hci_dev *hdev, int altsetting) err =usb_set_interface (data->udev,1 , altsetting);if (err <0 ) { -BT_ERR ("%s setting interface failed (%d)" , hdev->name, -err); +bt_err ("%s setting interface failed (%d)\n" , hdev->name, -err);return err; }
@@ -842,7 +842,7 @@ static inline int __set_isoc_interface(struct hci_dev *hdev, int altsetting) }if (!data->isoc_tx_ep || !data->isoc_rx_ep) { -BT_ERR ("%s invalid SCO descriptors" , hdev->name); +bt_err ("%s invalid SCO descriptors\n" , hdev->name);return -ENODEV ; }
drivers/bluetooth/btwilink.c +14 -15
@@ -113,7 +113,7 @@ static long st_receive(void *priv_data, struct sk_buff *skb)/* Forward skb to HCI core layer */ err =hci_recv_frame (skb);if (err <0 ) { -BT_ERR ("Unable to push skb to HCI core(%d)" , err); +bt_err ("Unable to push skb to HCI core(%d)\n" , err);return err; }
@@ -184,7 +184,7 @@ static int ti_st_open(struct hci_dev *hdev)if (err != -EINPROGRESS ) {clear_bit (HCI_RUNNING , &hdev->flags); -BT_ERR ("st_register failed %d" , err); +bt_err ("st_register failed %d\n" , err);return err; }
@@ -198,9 +198,8 @@ static int ti_st_open(struct hci_dev *hdev) msecs_to_jiffies(BT_REGISTER_TIMEOUT));if (!timeleft) {clear_bit (HCI_RUNNING , &hdev->flags); -BT_ERR ("Timeout(%d sec),didn't get reg " -"completion signal from ST" , -BT_REGISTER_TIMEOUT /1000 ); +bt_err ("Timeout(%d sec),didn't get reg completion signal from ST\n" , +BT_REGISTER_TIMEOUT /1000 );return -ETIMEDOUT ; }
@@ -208,22 +207,22 @@ static int ti_st_open(struct hci_dev *hdev)* called with ERROR status? */ if (hst->reg_status !=0 ) {clear_bit (HCI_RUNNING , &hdev->flags); -BT_ERR ("ST registration completed with invalid " -"status %d" , hst->reg_status); +bt_err ("ST registration completed with invalid status %d\n" , + hst->reg_status);return -EAGAIN ; } done: hst->st_write = ti_st_proto[i].write;if (!hst->st_write) { -BT_ERR ("undefined ST write function" ); +bt_err ("undefined ST write function\n" );clear_bit (HCI_RUNNING , &hdev->flags);for (i =0 ; i <MAX_BT_CHNL_IDS ; i++) {/* Undo registration with ST */ err =st_unregister (&ti_st_proto[i]);if (err) -BT_ERR ("st_unregister() failed with " -"error %d" , err); +bt_err ("st_unregister() failed with error %d\n" , + err); hst->st_write =NULL ; }return -EIO ;
@@ -244,8 +243,8 @@ static int ti_st_close(struct hci_dev *hdev)for (i =MAX_BT_CHNL_IDS -1 ; i >=0 ; i--) { err =st_unregister (&ti_st_proto[i]);if (err) -BT_ERR ("st_unregister(%d) failed with error %d" , - ti_st_proto[i].chnl_id, err); +bt_err ("st_unregister(%d) failed with error %d\n" , + ti_st_proto[i].chnl_id, err); } hst->st_write =NULL ;
@@ -279,7 +278,7 @@ static int ti_st_send_frame(struct sk_buff *skb) len = hst->st_write (skb);if (len <0 ) {kfree_skb (skb); -BT_ERR ("ST write failed (%ld)" , len); +bt_err ("ST write failed (%ld)\n" , len);/* Try Again, would only fail if UART has gone bad */ return -EAGAIN ; }
@@ -330,7 +329,7 @@ static int bt_ti_probe(struct platform_device *pdev) err =hci_register_dev (hdev);if (err <0 ) { -BT_ERR ("Can't register HCI device error %d" , err); +bt_err ("Can't register HCI device error %d\n" , err);kfree (hst);hci_free_dev (hdev);return err;
@@ -375,7 +374,7 @@ static struct platform_driver btwilink_driver = {/* ------- Module Init/Exit interfaces ------ */ static int __init btwilink_init (void ) { -BT_INFO ("Bluetooth Driver for TI WiLink - Version %s" ,VERSION ); +bt_info ("Bluetooth Driver for TI WiLink - Version %s\n" ,VERSION );return platform_driver_register (&btwilink_driver); }
drivers/bluetooth/dtl1_cs.c +10 -9
@@ -133,7 +133,7 @@ static int dtl1_write(unsigned int iobase, int fifo_size, __u8 *buf, int len)static void dtl1_write_wakeup (dtl1_info_t *info) {if (!info) { -BT_ERR ("Unknown device" ); +bt_err ("Unknown device\n" );return ; }
@@ -209,7 +209,7 @@ static void dtl1_receive(dtl1_info_t *info)int boguscount =0 ;if (!info) { -BT_ERR ("Unknown device" ); +bt_err ("Unknown device\n" );return ; }
@@ -221,7 +221,7 @@ static void dtl1_receive(dtl1_info_t *info)/* Allocate packet */ if (info->rx_skb ==NULL )if (!(info->rx_skb =bt_skb_alloc (HCI_MAX_FRAME_SIZE ,GFP_ATOMIC ))) { -BT_ERR ("Can't allocate mem for new packet" ); +bt_err ("Can't allocate mem for new packet\n" ); info->rx_state =RECV_WAIT_NSH ; info->rx_count =NSHL ;return ;
@@ -266,7 +266,8 @@ static void dtl1_receive(dtl1_info_t *info)break ;default :/* unknown packet */ -BT_ERR ("Unknown HCI packet with type 0x%02x received" ,bt_cb (info->rx_skb)->pkt_type); +bt_err ("Unknown HCI packet with type 0x%02x received\n" , +bt_cb (info->rx_skb)->pkt_type);kfree_skb (info->rx_skb);break ; }
@@ -313,7 +314,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst)switch (iir) {case UART_IIR_RLSI : -BT_ERR ("RLSI" ); +bt_err ("RLSI\n" );break ;case UART_IIR_RDI :/* Receive interrupt */
@@ -326,7 +327,7 @@ static irqreturn_t dtl1_interrupt(int irq, void *dev_inst) }break ;default : -BT_ERR ("Unhandled IIR=%#x" , iir); +bt_err ("Unhandled IIR=%#x\n" , iir);break ; }
@@ -395,7 +396,7 @@ static int dtl1_hci_send_frame(struct sk_buff *skb)nsh_t nsh;if (!hdev) { -BT_ERR ("Frame for unknown HCI device (hdev=NULL)" ); +bt_err ("Frame for unknown HCI device (hdev=NULL)\n" );return -ENODEV ; }
@@ -476,7 +477,7 @@ static int dtl1_open(dtl1_info_t *info)/* Initialize HCI device */ hdev =hci_alloc_dev ();if (!hdev) { -BT_ERR ("Can't allocate HCI device" ); +bt_err ("Can't allocate HCI device\n" );return -ENOMEM ; }
@@ -520,7 +521,7 @@ static int dtl1_open(dtl1_info_t *info)/* Register HCI device */ if (hci_register_dev (hdev) <0 ) { -BT_ERR ("Can't register HCI device" ); +bt_err ("Can't register HCI device\n" ); info->hdev =NULL ;hci_free_dev (hdev);return -ENODEV ;
drivers/bluetooth/hci_ath.c +3 -3
@@ -205,7 +205,7 @@ static int ath_recv(struct hci_uart *hu, void *data, int count) ret =hci_recv_stream_fragment (hu->hdev, data, count);if (ret <0 ) { -BT_ERR ("Frame Reassembly Failed" ); +bt_err ("Frame Reassembly Failed\n" );return ret; }
@@ -227,9 +227,9 @@ int __init ath_init(void)int err =hci_uart_register_proto (&athp);if (!err) -BT_INFO ("HCIATH3K protocol initialized" ); +bt_info ("HCIATH3K protocol initialized\n" );else -BT_ERR ("HCIATH3K protocol registration failed" ); +bt_err ("HCIATH3K protocol registration failed\n" );return err; }
drivers/bluetooth/hci_bcsp.c +26 -24
153 lines not on this page · raw message
drivers/bluetooth/hci_h4.c +4 -4
@@ -133,7 +133,7 @@ static inline int h4_check_data_len(struct h4_struct *h4, int len)if (!len) {hci_recv_frame (h4->rx_skb); }else if (len > room) { -BT_ERR ("Data length is too large" ); +bt_err ("Data length is too large\n" );kfree_skb (h4->rx_skb); }else { h4->rx_state =H4_W4_DATA ;
@@ -155,7 +155,7 @@ static int h4_recv(struct hci_uart *hu, void *data, int count) ret =hci_recv_stream_fragment (hu->hdev, data, count);if (ret <0 ) { -BT_ERR ("Frame Reassembly Failed" ); +bt_err ("Frame Reassembly Failed\n" );return ret; }
@@ -183,9 +183,9 @@ int __init h4_init(void)int err =hci_uart_register_proto (&h4p);if (!err) -BT_INFO ("HCI H4 protocol initialized" ); +bt_info ("HCI H4 protocol initialized\n" );else -BT_ERR ("HCI H4 protocol registration failed" ); +bt_err ("HCI H4 protocol registration failed\n" );return err; }
drivers/bluetooth/hci_ldisc.c +7 -7
@@ -213,7 +213,7 @@ static int hci_uart_send_frame(struct sk_buff *skb)struct hci_uart *hu;if (!hdev) { -BT_ERR ("Frame for unknown device (hdev=NULL)" ); +bt_err ("Frame for unknown device (hdev=NULL)\n" );return -ENODEV ; }
@@ -267,7 +267,7 @@ static int hci_uart_tty_open(struct tty_struct *tty)return -EOPNOTSUPP ;if (!(hu =kzalloc (sizeof (struct hci_uart ),GFP_KERNEL ))) { -BT_ERR ("Can't allocate control structure" ); +bt_err ("Can't allocate control structure\n" );return -ENFILE ; }
@@ -384,7 +384,7 @@ static int hci_uart_register_dev(struct hci_uart *hu)/* Initialize and register HCI device */ hdev =hci_alloc_dev ();if (!hdev) { -BT_ERR ("Can't allocate HCI device" ); +bt_err ("Can't allocate HCI device\n" );return -ENOMEM ; }
@@ -409,7 +409,7 @@ static int hci_uart_register_dev(struct hci_uart *hu)set_bit (HCI_QUIRK_RAW_DEVICE , &hdev->quirks);if (hci_register_dev (hdev) <0 ) { -BT_ERR ("Can't register HCI device" ); +bt_err ("Can't register HCI device\n" );hci_free_dev (hdev);return -ENODEV ; }
@@ -531,7 +531,7 @@ static int __init hci_uart_init(void)static struct tty_ldisc_ops hci_uart_ldisc;int err; -BT_INFO ("HCI UART driver ver %s" ,VERSION ); +bt_info ("HCI UART driver ver %s\n" ,VERSION );/* Register the tty discipline */
@@ -549,7 +549,7 @@ static int __init hci_uart_init(void) hci_uart_ldisc.owner =THIS_MODULE ;if ((err =tty_register_ldisc (N_HCI , &hci_uart_ldisc))) { -BT_ERR ("HCI line discipline registration failed. (%d)" , err); +bt_err ("HCI line discipline registration failed. (%d)\n" , err);return err; }
@@ -588,7 +588,7 @@ static void __exit hci_uart_exit(void)/* Release tty registration of line discipline */ if ((err =tty_unregister_ldisc (N_HCI ))) -BT_ERR ("Can't unregister HCI line discipline (%d)" , err); +bt_err ("Can't unregister HCI line discipline (%d)\n" , err); }module_init (hci_uart_init);
drivers/bluetooth/hci_ll.c +19 -14
@@ -102,7 +102,7 @@ static int send_hcill_cmd(u8 cmd, struct hci_uart *hu)/* allocate packet */ skb =bt_skb_alloc (1 ,GFP_ATOMIC );if (!skb) { -BT_ERR ("cannot allocate memory for HCILL packet" ); +bt_err ("cannot allocate memory for HCILL packet\n" ); err = -ENOMEM ; goto out; }
@@ -219,13 +219,14 @@ static void ll_device_want_to_wakeup(struct hci_uart *hu)case HCILL_ASLEEP :/* acknowledge device wake up */ if (send_hcill_cmd (HCILL_WAKE_UP_ACK , hu) <0 ) { -BT_ERR ("cannot acknowledge device wake up" ); +bt_err ("cannot acknowledge device wake up\n" ); goto out; }break ;default :/* any other state is illegal */ -BT_ERR ("received HCILL_WAKE_UP_IND in state %ld" , ll->hcill_state); +bt_err ("received HCILL_WAKE_UP_IND in state %ld\n" , + ll->hcill_state);break ; }
@@ -254,11 +255,12 @@ static void ll_device_want_to_sleep(struct hci_uart *hu)/* sanity check */ if (ll->hcill_state !=HCILL_AWAKE ) -BT_ERR ("ERR: HCILL_GO_TO_SLEEP_IND in state %ld" , ll->hcill_state); +bt_err ("ERR: HCILL_GO_TO_SLEEP_IND in state %ld\n" , + ll->hcill_state);/* acknowledge device sleep */ if (send_hcill_cmd (HCILL_GO_TO_SLEEP_ACK , hu) <0 ) { -BT_ERR ("cannot acknowledge device sleep" ); +bt_err ("cannot acknowledge device sleep\n" ); goto out; }
@@ -287,7 +289,8 @@ static void ll_device_woke_up(struct hci_uart *hu)/* sanity check */ if (ll->hcill_state !=HCILL_ASLEEP_TO_AWAKE ) -BT_ERR ("received HCILL_WAKE_UP_ACK in state %ld" , ll->hcill_state); +bt_err ("received HCILL_WAKE_UP_ACK in state %ld\n" , + ll->hcill_state);/* send pending packets and change state to HCILL_AWAKE */ __ll_do_awake (ll);
@@ -325,7 +328,7 @@ static int ll_enqueue(struct hci_uart *hu, struct sk_buff *skb)skb_queue_tail (&ll->tx_wait_q, skb);/* awake device */ if (send_hcill_cmd (HCILL_WAKE_UP_IND , hu) <0 ) { -BT_ERR ("cannot wake up device" ); +bt_err ("cannot wake up device\n" );break ; } ll->hcill_state =HCILL_ASLEEP_TO_AWAKE ;
@@ -336,7 +339,8 @@ static int ll_enqueue(struct hci_uart *hu, struct sk_buff *skb)skb_queue_tail (&ll->tx_wait_q, skb);break ;default : -BT_ERR ("illegal hcill state: %ld (losing packet)" , ll->hcill_state); +bt_err ("illegal hcill state: %ld (losing packet)\n" , + ll->hcill_state);kfree_skb (skb);break ; }
@@ -355,7 +359,7 @@ static inline int ll_check_data_len(struct ll_struct *ll, int len)if (!len) {hci_recv_frame (ll->rx_skb); }else if (len > room) { -BT_ERR ("Data length is too large" ); +bt_err ("Data length is too large\n" );kfree_skb (ll->rx_skb); }else { ll->rx_state =HCILL_W4_DATA ;
@@ -460,7 +464,8 @@ static int ll_recv(struct hci_uart *hu, void *data, int count)case HCILL_GO_TO_SLEEP_ACK :/* shouldn't happen */ -BT_ERR ("received HCILL_GO_TO_SLEEP_ACK (in state %ld)" , ll->hcill_state); +bt_err ("received HCILL_GO_TO_SLEEP_ACK (in state %ld)\n" , + ll->hcill_state); ptr++; count--;continue ;
@@ -477,7 +482,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count)continue ;default : -BT_ERR ("Unknown HCI packet type %2.2x" , (__u8)*ptr); +bt_err ("Unknown HCI packet type %2.2x\n" , (__u8)*ptr); hu->hdev->stat.err_rx++; ptr++; count--;continue ;
@@ -488,7 +493,7 @@ static int ll_recv(struct hci_uart *hu, void *data, int count)/* Allocate packet */ ll->rx_skb =bt_skb_alloc (HCI_MAX_FRAME_SIZE ,GFP_ATOMIC );if (!ll->rx_skb) { -BT_ERR ("Can't allocate mem for new packet" ); +bt_err ("Can't allocate mem for new packet\n" ); ll->rx_state =HCILL_W4_PACKET_TYPE ; ll->rx_count =0 ;return -ENOMEM ;
@@ -522,9 +527,9 @@ int __init ll_init(void)int err =hci_uart_register_proto (&llp);if (!err) -BT_INFO ("HCILL protocol initialized" ); +bt_info ("HCILL protocol initialized\n" );else -BT_ERR ("HCILL protocol registration failed" ); +bt_err ("HCILL protocol registration failed\n" );return err; }
drivers/bluetooth/hci_vhci.c +3 -3
@@ -86,7 +86,7 @@ static int vhci_send_frame(struct sk_buff *skb)struct vhci_data *data;if (!hdev) { -BT_ERR ("Frame for unknown HCI device (hdev=NULL)" ); +bt_err ("Frame for unknown HCI device (hdev=NULL)\n" );return -ENODEV ; }
@@ -253,7 +253,7 @@ static int vhci_open(struct inode *inode, struct file *file) hdev->owner =THIS_MODULE ;if (hci_register_dev (hdev) <0 ) { -BT_ERR ("Can't register HCI device" ); +bt_err ("Can't register HCI device\n" );kfree (data);hci_free_dev (hdev);return -EBUSY ;
@@ -295,7 +295,7 @@ static struct miscdevice vhci_miscdev= {static int __init vhci_init (void ) { -BT_INFO ("Virtual HCI driver ver %s" ,VERSION ); +bt_info ("Virtual HCI driver ver %s\n" ,VERSION );return misc_register (&vhci_miscdev); }
include/net/bluetooth/hci_core.h +3 -3
@@ -691,7 +691,7 @@ static inline int hci_proto_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr,return sco_connect_ind (hdev, bdaddr);default : -BT_ERR ("unknown link type %d" , type); +bt_err ("unknown link type %d\n" , type);return -EINVAL ; } }
@@ -710,7 +710,7 @@ static inline void hci_proto_connect_cfm(struct hci_conn *conn, __u8 status)break ;default : -BT_ERR ("unknown link type %d" , conn->type); +bt_err ("unknown link type %d\n" , conn->type);break ; }
@@ -740,7 +740,7 @@ static inline void hci_proto_disconn_cfm(struct hci_conn *conn, __u8 reason)break ;default : -BT_ERR ("unknown link type %d" , conn->type); +bt_err ("unknown link type %d\n" , conn->type);break ; }
net/bluetooth/af_bluetooth.c +2 -2
@@ -552,7 +552,7 @@ static int __init bt_init(void) {int err; -BT_INFO ("Core ver %s" ,VERSION ); +bt_info ("Core ver %s\n" ,VERSION ); err =bt_sysfs_init ();if (err <0 )
@@ -564,7 +564,7 @@ static int __init bt_init(void)return err; } -BT_INFO ("HCI device and connection manager initialized" ); +bt_info ("HCI device and connection manager initialized\n" ); err =hci_sock_init ();if (err <0 )
net/bluetooth/bnep/core.c +2 -2
@@ -718,9 +718,9 @@ static int __init bnep_init(void)strcat (flt,"multicast" );#endif -BT_INFO ("BNEP (Ethernet Emulation) ver %s" ,VERSION ); +bt_info ("BNEP (Ethernet Emulation) ver %s\n" ,VERSION );if (flt[0 ]) -BT_INFO ("BNEP filters: %s" , flt); +bt_info ("BNEP filters: %s\n" , flt);bnep_sock_init ();return 0 ;
net/bluetooth/bnep/netdev.c +1 -1
@@ -70,7 +70,7 @@ static void bnep_net_set_mc_list(struct net_device *dev) size =sizeof (*r) + (BNEP_MAX_MULTICAST_FILTERS +1 ) *ETH_ALEN *2 ; skb =alloc_skb (size,GFP_ATOMIC );if (!skb) { -BT_ERR ("%s Multicast list allocation failed" , dev->name); +bt_err ("%s Multicast list allocation failed\n" , dev->name);return ; }
net/bluetooth/bnep/sock.c +2 -2
@@ -245,7 +245,7 @@ int __init bnep_sock_init(void)return 0 ; error: -BT_ERR ("Can't register BNEP socket" ); +bt_err ("Can't register BNEP socket\n" );proto_unregister (&bnep_proto);return err; }
@@ -253,7 +253,7 @@ error: void __exit bnep_sock_cleanup(void) {if (bt_sock_unregister (BTPROTO_BNEP ) <0 ) -BT_ERR ("Can't unregister BNEP socket" ); +bt_err ("Can't unregister BNEP socket\n" );proto_unregister (&bnep_proto); }
net/bluetooth/cmtp/capi.c +10 -9
@@ -158,7 +158,7 @@ static void cmtp_send_interopmsg(struct cmtp_session *session, skb =alloc_skb (CAPI_MSG_BASELEN +6 + len,GFP_ATOMIC );if (!skb) { -BT_ERR ("Can't allocate memory for interoperability packet" ); +bt_err ("Can't allocate memory for interoperability packet\n" );return ; }
@@ -352,7 +352,7 @@ void cmtp_recv_capimsg(struct cmtp_session *session, struct sk_buff *skb) appl = application->appl;CAPIMSG_SETAPPID (skb->data, appl); }else { -BT_ERR ("Can't find application with id %d" , appl); +bt_err ("Can't find application with id %d\n" , appl);kfree_skb (skb);return ; }
@@ -363,7 +363,7 @@ void cmtp_recv_capimsg(struct cmtp_session *session, struct sk_buff *skb) }if (!ctrl) { -BT_ERR ("Can't find controller %d for message" , session->num); +bt_err ("Can't find controller %d for message\n" , session->num);kfree_skb (skb);return ; }
@@ -404,7 +404,7 @@ static void cmtp_register_appl(struct capi_ctr *ctrl, __u16 appl, capi_register_ application =cmtp_application_add (session, appl);if (!application) { -BT_ERR ("Can't allocate memory for new application" ); +bt_err ("Can't allocate memory for new application\n" );return ; }
@@ -468,7 +468,7 @@ static void cmtp_release_appl(struct capi_ctr *ctrl, __u16 appl) application =cmtp_application_get (session,CMTP_APPLID , appl);if (!application) { -BT_ERR ("Can't find application" ); +bt_err ("Can't find application\n" );return ; }
@@ -497,7 +497,7 @@ static u16 cmtp_send_message(struct capi_ctr *ctrl, struct sk_buff *skb) application =cmtp_application_get (session,CMTP_APPLID , appl);if ((!application) || (application->state !=BT_CONNECTED )) { -BT_ERR ("Can't find application with id %d" , appl); +bt_err ("Can't find application with id %d\n" , appl);return CAPI_ILLAPPNR ; }
@@ -565,7 +565,8 @@ int cmtp_attach_device(struct cmtp_session *session) ret =wait_event_interruptible_timeout (session->wait, session->ncontroller,CMTP_INTEROP_TIMEOUT ); -BT_INFO ("Found %d CAPI controller(s) on device %s" , session->ncontroller, session->name); +bt_info ("Found %d CAPI controller(s) on device %s\n" , + session->ncontroller, session->name);if (!ret)return -ETIMEDOUT ;
@@ -574,7 +575,7 @@ int cmtp_attach_device(struct cmtp_session *session)return -ENODEV ;if (session->ncontroller >1 ) -BT_INFO ("Setting up only CAPI controller 1" ); +bt_info ("Setting up only CAPI controller 1\n" ); session->ctrl.owner =THIS_MODULE ; session->ctrl.driverdata = session;
@@ -591,7 +592,7 @@ int cmtp_attach_device(struct cmtp_session *session) session->ctrl.proc_fops = &cmtp_proc_fops;if (attach_capi_ctr (&session->ctrl) <0 ) { -BT_ERR ("Can't attach new controller" ); +bt_err ("Can't attach new controller\n" );return -EBUSY ; }
net/bluetooth/cmtp/core.c +4 -4
@@ -114,7 +114,7 @@ static inline void cmtp_add_msgpart(struct cmtp_session *session, int id, const nskb =alloc_skb (size,GFP_ATOMIC );if (!nskb) { -BT_ERR ("Can't allocate memory for CAPI message" ); +bt_err ("Can't allocate memory for CAPI message\n" );return ; }
@@ -158,7 +158,7 @@ static inline int cmtp_recv_frame(struct cmtp_session *session, struct sk_buff *BT_DBG ("hdr 0x%02x hdrlen %d len %d id %d" , hdr, hdrlen, len, id);if (hdrlen + len > skb->len) { -BT_ERR ("Wrong size or header information in CMTP frame" ); +bt_err ("Wrong size or header information in CMTP frame\n" );break ; }
@@ -216,7 +216,7 @@ static void cmtp_process_transmit(struct cmtp_session *session) nskb =alloc_skb (session->mtu,GFP_ATOMIC );if (!nskb) { -BT_ERR ("Can't allocate memory for new frame" ); +bt_err ("Can't allocate memory for new frame\n" );return ; }
@@ -478,7 +478,7 @@ int cmtp_get_conninfo(struct cmtp_conninfo *ci)static int __init cmtp_init (void ) { -BT_INFO ("CMTP (CAPI Emulation) ver %s" ,VERSION ); +bt_info ("CMTP (CAPI Emulation) ver %s\n" ,VERSION );cmtp_init_sockets ();
net/bluetooth/cmtp/sock.c +2 -2
@@ -239,7 +239,7 @@ int cmtp_init_sockets(void)return 0 ; error: -BT_ERR ("Can't register CMTP socket" ); +bt_err ("Can't register CMTP socket\n" );proto_unregister (&cmtp_proto);return err; }
@@ -247,7 +247,7 @@ error:void cmtp_cleanup_sockets (void ) {if (bt_sock_unregister (BTPROTO_CMTP ) <0 ) -BT_ERR ("Can't unregister CMTP socket" ); +bt_err ("Can't unregister CMTP socket\n" );proto_unregister (&cmtp_proto); }
net/bluetooth/hci_core.c +12 -12
@@ -278,7 +278,7 @@ static void hci_init_req(struct hci_dev *hdev, unsigned long opt)break ;default : -BT_ERR ("Unknown device type %d" , hdev->dev_type); +bt_err ("Unknown device type %d\n" , hdev->dev_type);break ; }
@@ -1234,7 +1234,7 @@ static void hci_cmd_timer(unsigned long arg) {struct hci_dev *hdev = (void *) arg; -BT_ERR ("%s command tx timeout" , hdev->name); +bt_err ("%s command tx timeout\n" , hdev->name);atomic_set (&hdev->cmd_cnt,1 );queue_work (hdev->workqueue, &hdev->cmd_work); }
@@ -1886,7 +1886,7 @@ int hci_send_cmd(struct hci_dev *hdev, __u16 opcode, __u32 plen, void *param) skb =bt_skb_alloc (len,GFP_ATOMIC );if (!skb) { -BT_ERR ("%s no memory for command" , hdev->name); +bt_err ("%s no memory for command\n" , hdev->name);return -ENOMEM ; }
@@ -2073,7 +2073,7 @@ static inline struct hci_conn *hci_low_sent(struct hci_dev *hdev, __u8 type, intbreak ;default : cnt =0 ; -BT_ERR ("Unknown link type" ); +bt_err ("Unknown link type\n" ); } q = cnt / num;
@@ -2090,15 +2090,15 @@ static inline void hci_link_tx_to(struct hci_dev *hdev, __u8 type)struct hci_conn_hash *h = &hdev->conn_hash;struct hci_conn *c; -BT_ERR ("%s link tx timeout" , hdev->name); +bt_err ("%s link tx timeout\n" , hdev->name);rcu_read_lock ();/* Kill stalled connections */ list_for_each_entry_rcu (c, &h->list, list) {if (c->type == type && c->sent) { -BT_ERR ("%s killing stalled connection %s" , - hdev->name,batostr (&c->dst)); +bt_err ("%s killing stalled connection %s\n" , + hdev->name,batostr (&c->dst));hci_acl_disconn (c,0x13 ); } }
@@ -2176,7 +2176,7 @@ static inline struct hci_chan *hci_chan_sent(struct hci_dev *hdev, __u8 type,break ;default : cnt =0 ; -BT_ERR ("Unknown link type" ); +bt_err ("Unknown link type\n" ); } q = cnt / num;
@@ -2436,8 +2436,8 @@ static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)l2cap_recv_acldata (conn, skb, flags);return ; }else { -BT_ERR ("%s ACL packet for unknown connection handle %d" , - hdev->name, handle); +bt_err ("%s ACL packet for unknown connection handle %d\n" , + hdev->name, handle); }kfree_skb (skb);
@@ -2467,8 +2467,8 @@ static inline void hci_scodata_packet(struct hci_dev *hdev, struct sk_buff *skb)sco_recv_scodata (conn, skb);return ; }else { -BT_ERR ("%s SCO packet for unknown connection handle %d" , - hdev->name, handle); +bt_err ("%s SCO packet for unknown connection handle %d\n" , + hdev->name, handle); }kfree_skb (skb);
net/bluetooth/hci_event.c +8 -8
@@ -1058,7 +1058,7 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,break ;default : -BT_ERR ("Used reserved LE_Scan_Enable param %d" , cp->enable); +bt_err ("Used reserved LE_Scan_Enable param %d\n" , cp->enable);break ; } }
@@ -1156,7 +1156,7 @@ static inline void hci_cs_create_conn(struct hci_dev *hdev, __u8 status) conn->out =1 ; conn->link_mode |=HCI_LM_MASTER ; }else -BT_ERR ("No memory for new connection" ); +bt_err ("No memory for new connection\n" ); } }
@@ -1480,7 +1480,7 @@ static void hci_cs_le_create_conn(struct hci_dev *hdev, __u8 status) conn->dst_type = cp->peer_addr_type; conn->out =1 ; }else { -BT_ERR ("No memory for new connection" ); +bt_err ("No memory for new connection\n" ); } } }
@@ -1647,7 +1647,7 @@ static inline void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skif (!conn) { conn =hci_conn_add (hdev, ev->link_type, &ev->bdaddr);if (!conn) { -BT_ERR ("No memory for new connection" ); +bt_err ("No memory for new connection\n" );hci_dev_unlock (hdev);return ; }
@@ -1744,7 +1744,7 @@ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *sif (!ev->status) {if (!(conn->ssp_mode >0 && hdev->ssp_mode >0 ) &&test_bit (HCI_CONN_REAUTH_PEND , &conn->pend)) { -BT_INFO ("re-auth of legacy device is not possible." ); +bt_info ("re-auth of legacy device is not possible\n" ); }else { conn->link_mode |=HCI_LM_AUTH ; conn->sec_level = conn->pending_sec_level;
@@ -2272,7 +2272,7 @@ static inline void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *sint i;if (hdev->flow_ctl_mode !=HCI_FLOW_CTL_MODE_PACKET_BASED ) { -BT_ERR ("Wrong event for mode %d" , hdev->flow_ctl_mode); +bt_err ("Wrong event for mode %d\n" , hdev->flow_ctl_mode);return ; }
@@ -2324,7 +2324,7 @@ static inline void hci_num_comp_pkts_evt(struct hci_dev *hdev, struct sk_buff *sbreak ;default : -BT_ERR ("Unknown type %d conn %p" , conn->type, conn); +bt_err ("Unknown type %d conn %p\n" , conn->type, conn);break ; } }
@@ -3003,7 +3003,7 @@ static inline void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buffif (!conn) { conn =hci_conn_add (hdev,LE_LINK , &ev->bdaddr);if (!conn) { -BT_ERR ("No memory for new connection" ); +bt_err ("No memory for new connection\n" );hci_dev_unlock (hdev);return ; }
net/bluetooth/hci_sock.c +3 -3
@@ -808,12 +808,12 @@ int __init hci_sock_init(void)hci_register_notifier (&hci_sock_nblock); -BT_INFO ("HCI socket layer initialized" ); +bt_info ("HCI socket layer initialized\n" );return 0 ; error: -BT_ERR ("HCI socket registration failed" ); +bt_err ("HCI socket registration failed\n" );proto_unregister (&hci_sk_proto);return err; }
@@ -821,7 +821,7 @@ error:void hci_sock_cleanup (void ) {if (bt_sock_unregister (BTPROTO_HCI ) <0 ) -BT_ERR ("HCI socket unregistration failed" ); +bt_err ("HCI socket unregistration failed\n" );hci_unregister_notifier (&hci_sock_nblock);
net/bluetooth/hci_sysfs.c +1 -1
@@ -123,7 +123,7 @@ void hci_conn_add_sysfs(struct hci_conn *conn)dev_set_drvdata (&conn->dev, conn);if (device_add (&conn->dev) <0 ) { -BT_ERR ("Failed to register connection device" ); +bt_err ("Failed to register connection device\n" );return ; }
net/bluetooth/hidp/core.c +8 -6
@@ -158,7 +158,7 @@ static int hidp_queue_event(struct hidp_session *session, struct input_dev *dev, skb =alloc_skb (3 ,GFP_ATOMIC );if (!skb) { -BT_ERR ("Can't allocate memory for new frame" ); +bt_err ("Can't allocate memory for new frame\n" );return -ENOMEM ; }
@@ -211,14 +211,16 @@ static void hidp_input_report(struct hidp_session *session, struct sk_buff *skb)if (hidp_keycode[keys[i]])input_report_key (dev, hidp_keycode[keys[i]],0 );else -BT_ERR ("Unknown key (scancode %#x) released." , keys[i]); +bt_err ("Unknown key (scancode %#x) released\n" , + keys[i]); }if (udata[i] >3 &&memscan (keys +2 , udata[i],6 ) == keys +8 ) {if (hidp_keycode[udata[i]])input_report_key (dev, hidp_keycode[udata[i]],1 );else -BT_ERR ("Unknown key (scancode %#x) pressed." , udata[i]); +bt_err ("Unknown key (scancode %#x) pressed\n" , + udata[i]); } }
@@ -255,7 +257,7 @@ static int __hidp_send_ctrl_message(struct hidp_session *session, skb =alloc_skb (size +1 ,GFP_ATOMIC );if (!skb) { -BT_ERR ("Can't allocate memory for new frame" ); +bt_err ("Can't allocate memory for new frame\n" );return -ENOMEM ; }
@@ -289,7 +291,7 @@ static int hidp_queue_report(struct hidp_session *session, skb =alloc_skb (size +1 ,GFP_ATOMIC );if (!skb) { -BT_ERR ("Can't allocate memory for new frame" ); +bt_err ("Can't allocate memory for new frame\n" );return -ENOMEM ; }
@@ -1209,7 +1211,7 @@ static int __init hidp_init(void) {int ret; -BT_INFO ("HIDP (Human Interface Emulation) ver %s" ,VERSION ); +bt_info ("HIDP (Human Interface Emulation) ver %s\n" ,VERSION ); ret =hid_register_driver (&hidp_driver);if (ret)
net/bluetooth/hidp/sock.c +2 -2
@@ -291,7 +291,7 @@ int __init hidp_init_sockets(void)return 0 ; error: -BT_ERR ("Can't register HIDP socket" ); +bt_err ("Can't register HIDP socket\n" );proto_unregister (&hidp_proto);return err; }
@@ -299,7 +299,7 @@ error: void __exit hidp_cleanup_sockets(void) {if (bt_sock_unregister (BTPROTO_HIDP ) <0 ) -BT_ERR ("Can't unregister HIDP socket" ); +bt_err ("Can't unregister HIDP socket\n" );proto_unregister (&hidp_proto); }
net/bluetooth/l2cap_core.c +16 -16
@@ -2551,7 +2551,7 @@ static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) rfc.monitor_timeout =cpu_to_le16 (L2CAP_DEFAULT_MONITOR_TO ); rfc.max_pdu_size =cpu_to_le16 (chan->imtu); -BT_ERR ("Expected RFC option was not found, using defaults" ); +bt_err ("Expected RFC option was not found, using defaults\n" ); done:switch (rfc.mode) {
@@ -3455,7 +3455,7 @@ static inline int l2cap_bredr_sig_cmd(struct l2cap_conn *conn,break ;default : -BT_ERR ("Unknown BR/EDR signaling command 0x%2.2x" , cmd->code); +bt_err ("Unknown BR/EDR signaling command 0x%2.2x\n" , cmd->code); err = -EINVAL ;break ; }
@@ -3477,7 +3477,7 @@ static inline int l2cap_le_sig_cmd(struct l2cap_conn *conn,return 0 ;default : -BT_ERR ("Unknown LE signaling command 0x%2.2x" , cmd->code); +bt_err ("Unknown LE signaling command 0x%2.2x\n" , cmd->code);return -EINVAL ; } }
@@ -3515,7 +3515,7 @@ static inline void l2cap_sig_channel(struct l2cap_conn *conn,if (err) {struct l2cap_cmd_rej_unk rej; -BT_ERR ("Wrong link type (%d)" , err); +bt_err ("Wrong link type (%d)\n" , err);/* FIXME: Map err to a valid reason */ rej.reason =cpu_to_le16 (L2CAP_REJ_NOT_UNDERSTOOD );
@@ -4187,7 +4187,7 @@ static int l2cap_ertm_data_rcv(struct sock *sk, struct sk_buff *skb)l2cap_data_channel_iframe (chan, control, skb); }else {if (len !=0 ) { -BT_ERR ("%d" , len); +bt_err ("%d\n" , len);l2cap_send_disconn_req (chan->conn, chan,ECONNRESET ); goto drop; }
@@ -4610,7 +4610,7 @@ int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags)int len;if (conn->rx_len) { -BT_ERR ("Unexpected start frame (len %d)" , skb->len); +bt_err ("Unexpected start frame (len %d)\n" , skb->len);kfree_skb (conn->rx_skb); conn->rx_skb =NULL ; conn->rx_len =0 ;
@@ -4619,7 +4619,7 @@ int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags)/* Start fragment always begin with Basic L2CAP header */ if (skb->len <L2CAP_HDR_SIZE ) { -BT_ERR ("Frame is too short (len %d)" , skb->len); +bt_err ("Frame is too short (len %d)\n" , skb->len);l2cap_conn_unreliable (conn,ECOMM ); goto drop; }
@@ -4637,8 +4637,8 @@ int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags)BT_DBG ("Start: total len %d, frag len %d" , len, skb->len);if (skb->len > len) { -BT_ERR ("Frame is too long (len %d, expected len %d)" , - skb->len, len); +bt_err ("Frame is too long (len %d, expected len %d)\n" , + skb->len, len);l2cap_conn_unreliable (conn,ECOMM ); goto drop; }
@@ -4649,9 +4649,8 @@ int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags)struct sock *sk = chan->sk;if (chan->imtu < len -L2CAP_HDR_SIZE ) { -BT_ERR ("Frame exceeding recv MTU (len %d, " -"MTU %d)" , len, - chan->imtu); +bt_err ("Frame exceeding recv MTU (len %d, MTU %d)\n" , + len, chan->imtu);release_sock (sk);l2cap_conn_unreliable (conn,ECOMM ); goto drop;
@@ -4671,14 +4670,15 @@ int l2cap_recv_acldata(struct hci_conn *hcon, struct sk_buff *skb, u16 flags)BT_DBG ("Cont: frag len %d (expecting %d)" , skb->len, conn->rx_len);if (!conn->rx_len) { -BT_ERR ("Unexpected continuation frame (len %d)" , skb->len); +bt_err ("Unexpected continuation frame (len %d)\n" , + skb->len);l2cap_conn_unreliable (conn,ECOMM ); goto drop; }if (skb->len > conn->rx_len) { -BT_ERR ("Fragment is too long (len %d, expected %d)" , - skb->len, conn->rx_len); +bt_err ("Fragment is too long (len %d, expected %d)\n" , + skb->len, conn->rx_len);kfree_skb (conn->rx_skb); conn->rx_skb =NULL ; conn->rx_len =0 ;
@@ -4750,7 +4750,7 @@ int __init l2cap_init(void) l2cap_debugfs =debugfs_create_file ("l2cap" ,0444 , bt_debugfs,NULL , &l2cap_debugfs_fops);if (!l2cap_debugfs) -BT_ERR ("Failed to create L2CAP debug file" ); +bt_err ("Failed to create L2CAP debug file\n" ); }return 0 ;
net/bluetooth/l2cap_sock.c +3 -3
@@ -1086,12 +1086,12 @@ int __init l2cap_init_sockets(void)if (err <0 ) goto error; -BT_INFO ("L2CAP socket layer initialized" ); +bt_info ("L2CAP socket layer initialized\n" );return 0 ; error: -BT_ERR ("L2CAP socket registration failed" ); +bt_err ("L2CAP socket registration failed\n" );proto_unregister (&l2cap_proto);return err; }
@@ -1099,7 +1099,7 @@ error:void l2cap_cleanup_sockets (void ) {if (bt_sock_unregister (BTPROTO_L2CAP ) <0 ) -BT_ERR ("L2CAP socket unregistration failed" ); +bt_err ("L2CAP socket unregistration failed\n" );proto_unregister (&l2cap_proto); }
net/bluetooth/mgmt.c +3 -3
@@ -1057,8 +1057,8 @@ static int load_link_keys(struct sock *sk, u16 index, unsigned char *data, expected_len =sizeof (*cp) + key_count *sizeof (struct mgmt_link_key_info );if (expected_len != len) { -BT_ERR ("load_link_keys: expected %u bytes, got %u bytes" , - len, expected_len); +bt_err ("load_link_keys: expected %u bytes, got %u bytes\n" , + len, expected_len);return cmd_status (sk, index,MGMT_OP_LOAD_LINK_KEYS ,MGMT_STATUS_INVALID_PARAMS ); }
@@ -1366,7 +1366,7 @@ static int pin_code_reply(struct sock *sk, u16 index, unsigned char *data,if (conn->pending_sec_level ==BT_SECURITY_HIGH && cp->pin_len !=16 ) {bacpy (&ncp.bdaddr, &cp->bdaddr); -BT_ERR ("PIN code is not 16 bytes long" ); +bt_err ("PIN code is not 16 bytes long\n" ); err =send_pin_code_neg_reply (sk, index, hdev, &ncp);if (err >=0 )
net/bluetooth/rfcomm/core.c +8 -8
@@ -1626,7 +1626,7 @@ static int rfcomm_recv_mcc(struct rfcomm_session *s, struct sk_buff *skb)break ;default : -BT_ERR ("Unknown control type 0x%02x" , type); +bt_err ("Unknown control type 0x%02x\n" , type);rfcomm_send_nsc (s, cr, type);break ; }
@@ -1679,7 +1679,7 @@ static int rfcomm_recv_frame(struct rfcomm_session *s, struct sk_buff *skb) fcs = *(u8 *)skb_tail_pointer (skb);if (__check_fcs (skb->data, type, fcs)) { -BT_ERR ("bad checksum in packet" ); +bt_err ("bad checksum in packet\n" );kfree_skb (skb);return -EILSEQ ; }
@@ -1717,7 +1717,7 @@ static int rfcomm_recv_frame(struct rfcomm_session *s, struct sk_buff *skb)break ;default : -BT_ERR ("Unknown packet type 0x%02x" , type); +bt_err ("Unknown packet type 0x%02x\n" , type);break ; }kfree_skb (skb);
@@ -1994,7 +1994,7 @@ static int rfcomm_add_listener(bdaddr_t *ba)/* Create socket */ err =rfcomm_l2sock_create (&sock);if (err <0 ) { -BT_ERR ("Create socket failed %d" , err); +bt_err ("Create socket failed %d\n" , err);return err; }
@@ -2005,7 +2005,7 @@ static int rfcomm_add_listener(bdaddr_t *ba) addr.l2_cid =0 ; err =kernel_bind (sock, (struct sockaddr *) &addr,sizeof (addr));if (err <0 ) { -BT_ERR ("Bind failed %d" , err); +bt_err ("Bind failed %d\n" , err); goto failed; }
@@ -2018,7 +2018,7 @@ static int rfcomm_add_listener(bdaddr_t *ba)/* Start listening on the socket */ err =kernel_listen (sock,10 );if (err) { -BT_ERR ("Listen failed %d" , err); +bt_err ("Listen failed %d\n" , err); goto failed; }
@@ -2183,7 +2183,7 @@ static int __init rfcomm_init(void) rfcomm_dlc_debugfs =debugfs_create_file ("rfcomm_dlc" ,0444 , bt_debugfs,NULL , &rfcomm_dlc_debugfs_fops);if (!rfcomm_dlc_debugfs) -BT_ERR ("Failed to create RFCOMM debug file" ); +bt_err ("Failed to create RFCOMM debug file\n" ); } err =rfcomm_init_ttys ();
@@ -2194,7 +2194,7 @@ static int __init rfcomm_init(void)if (err <0 ) goto cleanup; -BT_INFO ("RFCOMM ver %s" ,VERSION ); +bt_info ("RFCOMM ver %s\n" ,VERSION );return 0 ;
net/bluetooth/rfcomm/sock.c +4 -4
@@ -1054,15 +1054,15 @@ int __init rfcomm_init_sockets(void) rfcomm_sock_debugfs =debugfs_create_file ("rfcomm" ,0444 , bt_debugfs,NULL , &rfcomm_sock_debugfs_fops);if (!rfcomm_sock_debugfs) -BT_ERR ("Failed to create RFCOMM debug file" ); +bt_err ("Failed to create RFCOMM debug file\n" ); } -BT_INFO ("RFCOMM socket layer initialized" ); +bt_info ("RFCOMM socket layer initialized\n" );return 0 ; error: -BT_ERR ("RFCOMM socket layer registration failed" ); +bt_err ("RFCOMM socket layer registration failed\n" );proto_unregister (&rfcomm_proto);return err; }
@@ -1072,7 +1072,7 @@ void __exit rfcomm_cleanup_sockets(void)debugfs_remove (rfcomm_sock_debugfs);if (bt_sock_unregister (BTPROTO_RFCOMM ) <0 ) -BT_ERR ("RFCOMM socket layer unregistration failed" ); +bt_err ("RFCOMM socket layer unregistration failed\n" );proto_unregister (&rfcomm_proto); }
net/bluetooth/rfcomm/tty.c +9 -9
@@ -306,10 +306,10 @@ out:dev_set_drvdata (dev->tty_dev, dev);if (device_create_file (dev->tty_dev, &dev_attr_address) <0 ) -BT_ERR ("Failed to create address attribute" ); +bt_err ("Failed to create address attribute\n" );if (device_create_file (dev->tty_dev, &dev_attr_channel) <0 ) -BT_ERR ("Failed to create channel attribute" ); +bt_err ("Failed to create channel attribute\n" );return dev->id;
@@ -846,23 +846,23 @@ static int rfcomm_tty_ioctl(struct tty_struct *tty, unsigned int cmd, unsigned lbreak ;case TIOCGSERIAL : -BT_ERR ("TIOCGSERIAL is not supported" ); +bt_err ("TIOCGSERIAL is not supported\n" );return -ENOIOCTLCMD ;case TIOCSSERIAL : -BT_ERR ("TIOCSSERIAL is not supported" ); +bt_err ("TIOCSSERIAL is not supported\n" );return -ENOIOCTLCMD ;case TIOCSERGSTRUCT : -BT_ERR ("TIOCSERGSTRUCT is not supported" ); +bt_err ("TIOCSERGSTRUCT is not supported\n" );return -ENOIOCTLCMD ;case TIOCSERGETLSR : -BT_ERR ("TIOCSERGETLSR is not supported" ); +bt_err ("TIOCSERGETLSR is not supported\n" );return -ENOIOCTLCMD ;case TIOCSERCONFIG : -BT_ERR ("TIOCSERCONFIG is not supported" ); +bt_err ("TIOCSERCONFIG is not supported\n" );return -ENOIOCTLCMD ;default :
@@ -1172,12 +1172,12 @@ int __init rfcomm_init_ttys(void) error =tty_register_driver (rfcomm_tty_driver);if (error) { -BT_ERR ("Can't register RFCOMM TTY driver" ); +bt_err ("Can't register RFCOMM TTY driver\n" );put_tty_driver (rfcomm_tty_driver);return error; } -BT_INFO ("RFCOMM TTY layer initialized" ); +bt_info ("RFCOMM TTY layer initialized\n" );return 0 ; }
net/bluetooth/sco.c +4 -4
@@ -1027,7 +1027,7 @@ int __init sco_init(void) err =bt_sock_register (BTPROTO_SCO , &sco_sock_family_ops);if (err <0 ) { -BT_ERR ("SCO socket registration failed" ); +bt_err ("SCO socket registration failed\n" ); goto error; }
@@ -1035,10 +1035,10 @@ int __init sco_init(void) sco_debugfs =debugfs_create_file ("sco" ,0444 , bt_debugfs,NULL , &sco_debugfs_fops);if (!sco_debugfs) -BT_ERR ("Failed to create SCO debug file" ); +bt_err ("Failed to create SCO debug file\n" ); } -BT_INFO ("SCO socket layer initialized" ); +bt_info ("SCO socket layer initialized\n" );return 0 ;
@@ -1052,7 +1052,7 @@ void __exit sco_exit(void)debugfs_remove (sco_debugfs);if (bt_sock_unregister (BTPROTO_SCO ) <0 ) -BT_ERR ("SCO socket unregistration failed" ); +bt_err ("SCO socket unregistration failed\n" );proto_unregister (&sco_proto); }
net/bluetooth/smp.c +7 -7
@@ -53,7 +53,7 @@ static int smp_e(struct crypto_blkcipher *tfm, const u8 *k, u8 *r)unsigned char iv[128 ];if (tfm ==NULL ) { -BT_ERR ("tfm %p" , tfm); +bt_err ("tfm %p\n" , tfm);return -EINVAL ; }
@@ -62,7 +62,7 @@ static int smp_e(struct crypto_blkcipher *tfm, const u8 *k, u8 *r) err =crypto_blkcipher_setkey (tfm, k,16 );if (err) { -BT_ERR ("cipher setkey failed: %d" , err); +bt_err ("cipher setkey failed: %d\n" , err);return err; }
@@ -76,7 +76,7 @@ static int smp_e(struct crypto_blkcipher *tfm, const u8 *k, u8 *r) err =crypto_blkcipher_encrypt (&desc, &sg, &sg,16 );if (err) -BT_ERR ("Encrypt data error %d" , err); +bt_err ("Encrypt data error %d\n" , err);return err; }
@@ -108,7 +108,7 @@ static int smp_c1(struct crypto_blkcipher *tfm, u8 k[16], u8 r[16],/* res = e(k, res) */ err =smp_e (tfm, k, res);if (err) { -BT_ERR ("Encrypt data error" ); +bt_err ("Encrypt data error\n" );return err; }
@@ -118,7 +118,7 @@ static int smp_c1(struct crypto_blkcipher *tfm, u8 k[16], u8 r[16],/* res = e(k, res) */ err =smp_e (tfm, k, res);if (err) -BT_ERR ("Encrypt data error" ); +bt_err ("Encrypt data error\n" );return err; }
@@ -134,7 +134,7 @@ static int smp_s1(struct crypto_blkcipher *tfm, u8 k[16], err =smp_e (tfm, k, _r);if (err) -BT_ERR ("Encrypt data error" ); +bt_err ("Encrypt data error\n" );return err; }
@@ -431,7 +431,7 @@ static void random_work(struct work_struct *work)swap128 (res, confirm);if (memcmp (smp->pcnf, confirm,sizeof (smp->pcnf)) !=0 ) { -BT_ERR ("Pairing failed (confirmation values mismatch)" ); +bt_err ("Pairing failed (confirmation values mismatch)\n" ); reason =SMP_CONFIRM_FAILED ; goto error; }
Signature · 1 line
1.7.8.111.gad25c.dirty
Re: [PATCH V2 2/3] bluetooth: Convert BT_ERR/BT_INFO to bt_err/bt_info
Hi Joe,
Quoted 43 lines
Use the more common kernel style functions rather than an upper case macro.
Add newlines to end of formats.
Coalesce formats, align arguments.Signed-off-by Joe Perches <[email protected]>--- drivers/bluetooth/ath3k.c | 46 +++++++------- drivers/bluetooth/bcm203x.c | 24 ++++---- drivers/bluetooth/bfusb.c | 67 +++++++++++--------- drivers/bluetooth/bluecard_cs.c | 17 +++--- drivers/bluetooth/bpa10x.c | 18 +++--- drivers/bluetooth/bt3c_cs.c | 36 ++++++----- drivers/bluetooth/btmrvl_debugfs.c | 2 +- drivers/bluetooth/btmrvl_main.c | 39 ++++++------ drivers/bluetooth/btmrvl_sdio.c | 122 +++++++++++++++++------------------- drivers/bluetooth/btsdio.c | 2 +- drivers/bluetooth/btuart_cs.c | 23 ++++--- drivers/bluetooth/btusb.c | 38 ++++++------ drivers/bluetooth/btwilink.c | 29 ++++----- drivers/bluetooth/dtl1_cs.c | 19 +++--- drivers/bluetooth/hci_ath.c | 6 +- drivers/bluetooth/hci_bcsp.c | 50 ++++++++------- drivers/bluetooth/hci_h4.c | 8 +- drivers/bluetooth/hci_ldisc.c | 14 ++-- drivers/bluetooth/hci_ll.c | 33 ++++++---- drivers/bluetooth/hci_vhci.c | 6 +- include/net/bluetooth/hci_core.h | 6 +- net/bluetooth/af_bluetooth.c | 4 +- net/bluetooth/bnep/core.c | 4 +- net/bluetooth/bnep/netdev.c | 2 +- net/bluetooth/bnep/sock.c | 4 +- net/bluetooth/cmtp/capi.c | 19 +++--- net/bluetooth/cmtp/core.c | 8 +- net/bluetooth/cmtp/sock.c | 4 +- net/bluetooth/hci_core.c | 24 ++++---- net/bluetooth/hci_event.c | 16 +++--- net/bluetooth/hci_sock.c | 6 +- net/bluetooth/hci_sysfs.c | 2 +- net/bluetooth/hidp/core.c | 14 +++-- net/bluetooth/hidp/sock.c | 4 +- net/bluetooth/l2cap_core.c | 32 +++++-----
Quoted 8 lines
net/bluetooth/l2cap_sock.c | 6 +- net/bluetooth/mgmt.c | 6 +- net/bluetooth/rfcomm/core.c | 16 +++--- net/bluetooth/rfcomm/sock.c | 8 +- net/bluetooth/rfcomm/tty.c | 18 +++--- net/bluetooth/sco.c | 8 +- net/bluetooth/smp.c | 14 ++-- 42 files changed, 419 insertions(+), 405 deletions(-)
I leave this up to Johan if he can get it merged without having to redo the patch. Otherwise it might have to wait a little bit.
If you would split drivers/ from include/ and net/ I think it has more likelihood that at least that one can be merged easily.
Regards
Marcel
Re: [PATCH V2 2/3] bluetooth: Convert BT_ERR/BT_INFO to bt_err/bt_info
Hi,
Quoted 52 lines
Quoted 43 lines
Use the more common kernel style functions rather than an upper case macro.
Add newlines to end of formats.
Coalesce formats, align arguments.Signed-off-by Joe Perches <[email protected]>--- drivers/bluetooth/ath3k.c | 46 +++++++------- drivers/bluetooth/bcm203x.c | 24 ++++---- drivers/bluetooth/bfusb.c | 67 +++++++++++--------- drivers/bluetooth/bluecard_cs.c | 17 +++--- drivers/bluetooth/bpa10x.c | 18 +++--- drivers/bluetooth/bt3c_cs.c | 36 ++++++----- drivers/bluetooth/btmrvl_debugfs.c | 2 +- drivers/bluetooth/btmrvl_main.c | 39 ++++++------ drivers/bluetooth/btmrvl_sdio.c | 122 +++++++++++++++++------------------- drivers/bluetooth/btsdio.c | 2 +- drivers/bluetooth/btuart_cs.c | 23 ++++--- drivers/bluetooth/btusb.c | 38 ++++++------ drivers/bluetooth/btwilink.c | 29 ++++----- drivers/bluetooth/dtl1_cs.c | 19 +++--- drivers/bluetooth/hci_ath.c | 6 +- drivers/bluetooth/hci_bcsp.c | 50 ++++++++------- drivers/bluetooth/hci_h4.c | 8 +- drivers/bluetooth/hci_ldisc.c | 14 ++-- drivers/bluetooth/hci_ll.c | 33 ++++++---- drivers/bluetooth/hci_vhci.c | 6 +- include/net/bluetooth/hci_core.h | 6 +- net/bluetooth/af_bluetooth.c | 4 +- net/bluetooth/bnep/core.c | 4 +- net/bluetooth/bnep/netdev.c | 2 +- net/bluetooth/bnep/sock.c | 4 +- net/bluetooth/cmtp/capi.c | 19 +++--- net/bluetooth/cmtp/core.c | 8 +- net/bluetooth/cmtp/sock.c | 4 +- net/bluetooth/hci_core.c | 24 ++++---- net/bluetooth/hci_event.c | 16 +++--- net/bluetooth/hci_sock.c | 6 +- net/bluetooth/hci_sysfs.c | 2 +- net/bluetooth/hidp/core.c | 14 +++-- net/bluetooth/hidp/sock.c | 4 +- net/bluetooth/l2cap_core.c | 32 +++++-----Quoted 8 lines
net/bluetooth/l2cap_sock.c | 6 +- net/bluetooth/mgmt.c | 6 +- net/bluetooth/rfcomm/core.c | 16 +++--- net/bluetooth/rfcomm/sock.c | 8 +- net/bluetooth/rfcomm/tty.c | 18 +++--- net/bluetooth/sco.c | 8 +- net/bluetooth/smp.c | 14 ++-- 42 files changed, 419 insertions(+), 405 deletions(-)
Quoted 7 lines
I leave this up to Johan if he can get it merged without having to redo the patch. Otherwise it might have to wait a little bit.
If you would split
drivers/frominclude/andnet/I think it has more likelihood that at least that one can be merged easily.Acked-by Marcel Holtmann <[email protected]>
Patches 2/3 and 3/3 have never actually made it to the linux-bluetooth list (I've never seen them and they're not visible in the archives either). Doing the split like Marcel proposes would probably solve the issue since I'm guessing the large message size is to blame.
Johan
Re: [PATCH V2 2/3] bluetooth: Convert BT_ERR/BT_INFO to bt_err/bt_info
Quoted 4 lines · Johan Hedberg
Patches 2/3 and 3/3 have never actually made it to the linux-bluetooth list (I've never seen them and they're not visible in the archives either). Doing the split like Marcel proposes would probably solve the issue since I'm guessing the large message size is to blame.
Hi Johan.
I'm not subscribed to linux-bluetooth.
linux-bluetooth is a vger list so I would expect
the maximum message size to be no different than
lkml though. These messages did get through to
netdev and lkml.
http://patchwork.ozlabs.org/patch/141748/
http://patchwork.ozlabs.org/patch/141749/
You're not listed as a bluetooth maintainer.
Should you be?
Do you want the original patch set sent directly
to you?
PATCH v2 3/3 bluetooth: Convert BT_DBG to pr_debug
In reply to Joe PerchesNo need to obfuscate, just use the normal debugging macro.
Add "\n" to uses, align arguments, coalesce formats. Fix a typo and fix a bad format extended by a line continuation.
--- drivers/bluetooth/ath3k.c | 10 +- drivers/bluetooth/bcm203x.c | 10 +- drivers/bluetooth/bfusb.c | 35 +++--- drivers/bluetooth/bpa10x.c | 30 ++-- drivers/bluetooth/btmrvl_main.c | 63 +++++----- drivers/bluetooth/btmrvl_sdio.c | 27 ++-- drivers/bluetooth/btsdio.c | 24 ++-- drivers/bluetooth/btusb.c | 48 ++++---- drivers/bluetooth/btwilink.c | 17 +-- drivers/bluetooth/hci_ath.c | 8 +- drivers/bluetooth/hci_bcsp.c | 28 ++-- drivers/bluetooth/hci_h4.c | 10 +- drivers/bluetooth/hci_ldisc.c | 23 ++-- drivers/bluetooth/hci_ll.c | 50 ++++---- include/net/bluetooth/l2cap.h | 2 +- net/bluetooth/af_bluetooth.c | 16 +- net/bluetooth/bnep/core.c | 26 ++-- net/bluetooth/bnep/netdev.c | 12 +- net/bluetooth/bnep/sock.c | 6 +- net/bluetooth/cmtp/capi.c | 31 +++-- net/bluetooth/cmtp/core.c | 23 ++-- net/bluetooth/cmtp/sock.c | 6 +- net/bluetooth/hci_conn.c | 58 ++++---- net/bluetooth/hci_core.c | 151 +++++++++++---------- net/bluetooth/hci_event.c | 282 ++++++++++++++++++++------------------- net/bluetooth/hci_sock.c | 20 ++-- net/bluetooth/hci_sysfs.c | 8 +- net/bluetooth/hidp/core.c | 44 ++++--- net/bluetooth/hidp/sock.c | 6 +- net/bluetooth/l2cap_core.c | 189 ++++++++++++++------------- net/bluetooth/l2cap_sock.c | 34 +++--- net/bluetooth/mgmt.c | 89 ++++++------ net/bluetooth/rfcomm/core.c | 164 ++++++++++++----------- net/bluetooth/rfcomm/sock.c | 49 ++++---- net/bluetooth/rfcomm/tty.c | 88 ++++++------ net/bluetooth/sco.c | 69 +++++----- net/bluetooth/smp.c | 33 +++--- 37 files changed, 915 insertions(+), 874 deletions(-)
drivers/bluetooth/ath3k.c +5 -5
@@ -102,7 +102,7 @@ static int ath3k_load_firmware(struct usb_device *udev,int err, pipe, len, size, sent =0 ;int count = firmware->size; -BT_DBG ("udev %p" , udev); +pr_debug ("udev %p\n" , udev); pipe =usb_sndctrlpipe (udev,0 );
@@ -243,7 +243,7 @@ static int ath3k_set_normal_mode(struct usb_device *udev) }if ((fw_state &ATH3K_MODE_MASK ) ==ATH3K_NORMAL_MODE ) { -BT_DBG ("firmware was already in normal mode" ); +pr_debug ("firmware was already in normal mode\n" );return 0 ; }
@@ -268,7 +268,7 @@ static int ath3k_load_patch(struct usb_device *udev) }if (fw_state &ATH3K_PATCH_UPDATE ) { -BT_DBG ("Patch was already downloaded" ); +pr_debug ("Patch was already downloaded\n" );return 0 ; }
@@ -362,7 +362,7 @@ static int ath3k_probe(struct usb_interface *intf,struct usb_device *udev =interface_to_usbdev (intf);int ret; -BT_DBG ("intf %p id %p" , intf, id); +pr_debug ("intf %p id %p\n" , intf, id);if (intf->cur_altsetting->desc.bInterfaceNumber !=0 )return -ENODEV ;
@@ -420,7 +420,7 @@ static int ath3k_probe(struct usb_interface *intf,static void ath3k_disconnect (struct usb_interface *intf) { -BT_DBG ("ath3k_disconnect intf %p" , intf); +pr_debug ("ath3k_disconnect intf %p\n" , intf); }static struct usb_driver ath3k_driver = {
drivers/bluetooth/bcm203x.c +5 -5
@@ -82,7 +82,7 @@ static void bcm203x_complete(struct urb *urb)struct usb_device *udev = urb->dev;int len; -BT_DBG ("udev %p urb %p" , udev, urb); +pr_debug ("udev %p urb %p\n" , udev, urb);if (urb->status) {bt_err ("URB failed with status %d\n" , urb->status);
@@ -172,7 +172,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_idstruct bcm203x_data *data;int size; -BT_DBG ("intf %p id %p" , intf, id); +pr_debug ("intf %p id %p\n" , intf, id);if (intf->cur_altsetting->desc.bInterfaceNumber !=0 )return -ENODEV ;
@@ -200,7 +200,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_idreturn -EIO ; } -BT_DBG ("minidrv data %p size %zu" , firmware->data, firmware->size); +pr_debug ("minidrv data %p size %zu\n" , firmware->data, firmware->size); size =max_t (uint, firmware->size,4096 );
@@ -228,7 +228,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_idreturn -EIO ; } -BT_DBG ("firmware data %p size %zu" , firmware->data, firmware->size); +pr_debug ("firmware data %p size %zu\n" , firmware->data, firmware->size); data->fw_data =kmemdup (firmware->data, firmware->size,GFP_KERNEL );if (!data->fw_data) {
@@ -259,7 +259,7 @@ static void bcm203x_disconnect(struct usb_interface *intf) {struct bcm203x_data *data =usb_get_intfdata (intf); -BT_DBG ("intf %p" , intf); +pr_debug ("intf %p\n" , intf);atomic_inc (&data->shutdown);cancel_work_sync (&data->work);
drivers/bluetooth/bfusb.c +18 -17
@@ -95,7 +95,7 @@ static struct urb *bfusb_get_completed(struct bfusb_data *data)struct sk_buff *skb;struct urb *urb =NULL ; -BT_DBG ("bfusb %p" , data); +pr_debug ("bfusb %p\n" , data); skb =skb_dequeue (&data->completed_q);if (skb) {
@@ -111,7 +111,7 @@ static void bfusb_unlink_urbs(struct bfusb_data *data)struct sk_buff *skb;struct urb *urb; -BT_DBG ("bfusb %p" , data); +pr_debug ("bfusb %p\n" , data);while ((skb =skb_dequeue (&data->pending_q))) { urb = ((struct bfusb_data_scb *) skb->cb)->urb;
@@ -129,7 +129,7 @@ static int bfusb_send_bulk(struct bfusb_data *data, struct sk_buff *skb)struct urb *urb =bfusb_get_completed (data);int err, pipe; -BT_DBG ("bfusb %p skb %p len %d" , data, skb, skb->len); +pr_debug ("bfusb %p skb %p len %d\n" , data, skb, skb->len);if (!urb && !(urb =usb_alloc_urb (0 ,GFP_ATOMIC )))return -ENOMEM ;
@@ -159,7 +159,7 @@ static void bfusb_tx_wakeup(struct bfusb_data *data) {struct sk_buff *skb; -BT_DBG ("bfusb %p" , data); +pr_debug ("bfusb %p\n" , data);if (test_and_set_bit (BFUSB_TX_PROCESS , &data->state)) {set_bit (BFUSB_TX_WAKEUP , &data->state);
@@ -187,7 +187,7 @@ static void bfusb_tx_complete(struct urb *urb)struct sk_buff *skb = (struct sk_buff *) urb->context;struct bfusb_data *data = (struct bfusb_data *) skb->dev; -BT_DBG ("bfusb %p urb %p skb %p len %d" , data, urb, skb, skb->len); +pr_debug ("bfusb %p urb %p skb %p len %d\n" , data, urb, skb, skb->len);atomic_dec (&data->pending_tx);
@@ -216,7 +216,7 @@ static int bfusb_rx_submit(struct bfusb_data *data, struct urb *urb)struct sk_buff *skb;int err, pipe, size =HCI_MAX_FRAME_SIZE +32 ; -BT_DBG ("bfusb %p urb %p" , data, urb); +pr_debug ("bfusb %p urb %p\n" , data, urb);if (!urb && !(urb =usb_alloc_urb (0 ,GFP_ATOMIC )))return -ENOMEM ;
@@ -253,7 +253,7 @@ static int bfusb_rx_submit(struct bfusb_data *data, struct urb *urb)static inline int bfusb_recv_block (struct bfusb_data *data,int hdr,unsigned char *buf,int len) { -BT_DBG ("bfusb %p hdr 0x%02x data %p len %d" , data, hdr, buf, len); +pr_debug ("bfusb %p hdr 0x%02x data %p len %d\n" , data, hdr, buf, len);if (hdr &0x10 ) {bt_err ("%s error in block\n" , data->hdev->name);
@@ -353,7 +353,7 @@ static void bfusb_rx_complete(struct urb *urb)int count = urb->actual_length;int err, hdr, len; -BT_DBG ("bfusb %p urb %p skb %p len %d" , data, urb, skb, skb->len); +pr_debug ("bfusb %p urb %p skb %p len %d\n" , data, urb, skb, skb->len);read_lock (&data->lock);
@@ -420,7 +420,7 @@ static int bfusb_open(struct hci_dev *hdev)unsigned long flags;int i, err; -BT_DBG ("hdev %p bfusb %p" , hdev, data); +pr_debug ("hdev %p bfusb %p\n" , hdev, data);if (test_and_set_bit (HCI_RUNNING , &hdev->flags))return 0 ;
@@ -444,7 +444,7 @@ static int bfusb_flush(struct hci_dev *hdev) {struct bfusb_data *data = hdev->driver_data; -BT_DBG ("hdev %p bfusb %p" , hdev, data); +pr_debug ("hdev %p bfusb %p\n" , hdev, data);skb_queue_purge (&data->transmit_q);
@@ -456,7 +456,7 @@ static int bfusb_close(struct hci_dev *hdev)struct bfusb_data *data = hdev->driver_data;unsigned long flags; -BT_DBG ("hdev %p bfusb %p" , hdev, data); +pr_debug ("hdev %p bfusb %p\n" , hdev, data);if (!test_and_clear_bit (HCI_RUNNING , &hdev->flags))return 0 ;
@@ -478,7 +478,8 @@ static int bfusb_send_frame(struct sk_buff *skb)unsigned char buf[3 ];int sent =0 , size, count; -BT_DBG ("hdev %p skb %p type %d len %d" , hdev, skb,bt_cb (skb)->pkt_type, skb->len); +pr_debug ("hdev %p skb %p type %d len %d\n" , + hdev, skb,bt_cb (skb)->pkt_type, skb->len);if (!hdev) {bt_err ("Frame for unknown HCI device (hdev=NULL)\n" );
@@ -553,7 +554,7 @@ static void bfusb_destruct(struct hci_dev *hdev) {struct bfusb_data *data = hdev->driver_data; -BT_DBG ("hdev %p bfusb %p" , hdev, data); +pr_debug ("hdev %p bfusb %p\n" , hdev, data);kfree (data); }
@@ -569,7 +570,7 @@ static int bfusb_load_firmware(struct bfusb_data *data,unsigned char *buf;int err, pipe, len, size, sent =0 ; -BT_DBG ("bfusb %p udev %p" , data, data->udev); +pr_debug ("bfusb %p udev %p\n" , data, data->udev);bt_info ("BlueFRITZ! USB loading firmware\n" );
@@ -652,7 +653,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *istruct hci_dev *hdev;struct bfusb_data *data; -BT_DBG ("intf %p id %p" , intf, id); +pr_debug ("intf %p id %p\n" , intf, id);/* Check number of endpoints */ if (intf->cur_altsetting->desc.bNumEndpoints <2 )
@@ -691,7 +692,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i goto error; } -BT_DBG ("firmware data %p size %zu" , firmware->data, firmware->size); +pr_debug ("firmware data %p size %zu\n" , firmware->data, firmware->size);if (bfusb_load_firmware (data, firmware->data, firmware->size) <0 ) {bt_err ("Firmware loading failed\n" );
@@ -747,7 +748,7 @@ static void bfusb_disconnect(struct usb_interface *intf)struct bfusb_data *data =usb_get_intfdata (intf);struct hci_dev *hdev = data->hdev; -BT_DBG ("intf %p" , intf); +pr_debug ("intf %p\n" , intf);if (!hdev)return ;
drivers/bluetooth/bpa10x.c +15 -15
@@ -68,8 +68,8 @@ static int bpa10x_recv(struct hci_dev *hdev, int queue, void *buf, int count) {struct bpa10x_data *data = hdev->driver_data; -BT_DBG ("%s queue %d buffer %p count %d" , hdev->name, - queue, buf, count); +pr_debug ("%s queue %d buffer %p count %d\n" , + hdev->name, queue, buf, count);if (queue <0 || queue >1 )return -EILSEQ ;
@@ -169,8 +169,8 @@ static void bpa10x_tx_complete(struct urb *urb)struct sk_buff *skb = urb->context;struct hci_dev *hdev = (struct hci_dev *) skb->dev; -BT_DBG ("%s urb %p status %d count %d" , hdev->name, - urb, urb->status, urb->actual_length); +pr_debug ("%s urb %p status %d count %d\n" , + hdev->name, urb, urb->status, urb->actual_length);if (!test_bit (HCI_RUNNING , &hdev->flags)) goto done;
@@ -192,8 +192,8 @@ static void bpa10x_rx_complete(struct urb *urb)struct bpa10x_data *data = hdev->driver_data;int err; -BT_DBG ("%s urb %p status %d count %d" , hdev->name, - urb, urb->status, urb->actual_length); +pr_debug ("%s urb %p status %d count %d\n" , + hdev->name, urb, urb->status, urb->actual_length);if (!test_bit (HCI_RUNNING , &hdev->flags))return ;
@@ -225,7 +225,7 @@ static inline int bpa10x_submit_intr_urb(struct hci_dev *hdev)unsigned int pipe;int err, size =16 ; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name); urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!urb)
@@ -266,7 +266,7 @@ static inline int bpa10x_submit_bulk_urb(struct hci_dev *hdev)unsigned int pipe;int err, size =64 ; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name); urb =usb_alloc_urb (0 ,GFP_KERNEL );if (!urb)
@@ -304,7 +304,7 @@ static int bpa10x_open(struct hci_dev *hdev)struct bpa10x_data *data = hdev->driver_data;int err; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name);if (test_and_set_bit (HCI_RUNNING , &hdev->flags))return 0 ;
@@ -331,7 +331,7 @@ static int bpa10x_close(struct hci_dev *hdev) {struct bpa10x_data *data = hdev->driver_data; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name);if (!test_and_clear_bit (HCI_RUNNING , &hdev->flags))return 0 ;
@@ -345,7 +345,7 @@ static int bpa10x_flush(struct hci_dev *hdev) {struct bpa10x_data *data = hdev->driver_data; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name);usb_kill_anchored_urbs (&data->tx_anchor);
@@ -361,7 +361,7 @@ static int bpa10x_send_frame(struct sk_buff *skb)unsigned int pipe;int err; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name);if (!test_bit (HCI_RUNNING , &hdev->flags))return -EBUSY ;
@@ -436,7 +436,7 @@ static void bpa10x_destruct(struct hci_dev *hdev) {struct bpa10x_data *data = hdev->driver_data; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name);kfree_skb (data->rx_skb[0 ]);kfree_skb (data->rx_skb[1 ]);
@@ -449,7 +449,7 @@ static int bpa10x_probe(struct usb_interface *intf, const struct usb_device_id *struct hci_dev *hdev;int err; -BT_DBG ("intf %p id %p" , intf, id); +pr_debug ("intf %p id %p\n" , intf, id);if (intf->cur_altsetting->desc.bInterfaceNumber !=0 )return -ENODEV ;
@@ -502,7 +502,7 @@ static void bpa10x_disconnect(struct usb_interface *intf) {struct bpa10x_data *data =usb_get_intfdata (intf); -BT_DBG ("intf %p" , intf); +pr_debug ("intf %p\n" , intf);if (!data)return ;
drivers/bluetooth/btmrvl_main.c +32 -31
169 lines not on this page · raw message
drivers/bluetooth/btmrvl_sdio.c +14 -13
@@ -267,8 +267,8 @@ static int btmrvl_sdio_download_helper(struct btmrvl_sdio_card *card) helper = fw_helper->data; helperlen = fw_helper->size; -BT_DBG ("Downloading helper image (%d bytes), block size %d bytes" , - helperlen,SDIO_BLOCK_SIZE ); +pr_debug ("Downloading helper image (%d bytes), block size %d bytes\n" , + helperlen,SDIO_BLOCK_SIZE ); tmphlprbufsz =ALIGN_SZ (BTM_UPLD_SIZE ,BTSDIO_DMA_ALIGN );
@@ -323,7 +323,7 @@ static int btmrvl_sdio_download_helper(struct btmrvl_sdio_card *card) hlprblknow += tx_len; }while (true); -BT_DBG ("Transferring helper image EOF block" ); +pr_debug ("Transferring helper image EOF block\n" );memset (helperbuf,0x0 ,SDIO_BLOCK_SIZE );
@@ -368,7 +368,7 @@ static int btmrvl_sdio_download_fw_w_helper(struct btmrvl_sdio_card *card) firmware = fw_firmware->data; firmwarelen = fw_firmware->size; -BT_DBG ("Downloading FW image (%d bytes)" , firmwarelen); +pr_debug ("Downloading FW image (%d bytes)\n" , firmwarelen); tmpfwbufsz =ALIGN_SZ (BTM_UPLD_SIZE ,BTSDIO_DMA_ALIGN ); tmpfwbuf =kzalloc (tmpfwbufsz,GFP_KERNEL );
@@ -472,7 +472,7 @@ static int btmrvl_sdio_download_fw_w_helper(struct btmrvl_sdio_card *card) offset += txlen; }while (true); -BT_DBG ("FW download over, size %d bytes" , offset); +pr_debug ("FW download over, size %d bytes\n" , offset); ret =0 ;
@@ -614,8 +614,8 @@ static int btmrvl_sdio_process_int_status(struct btmrvl_private *priv)sdio_claim_host (card->func);if (ireg &DN_LD_HOST_INT_STATUS ) {if (priv->btmrvl_dev.tx_dnld_rdy) -BT_DBG ("tx_done already received: " -" int_status=0x%x" , ireg); +pr_debug ("tx_done already received: int_status=0x%x\n" , + ireg);else priv->btmrvl_dev.tx_dnld_rdy = true; }
@@ -657,7 +657,7 @@ static void btmrvl_sdio_interrupt(struct sdio_func *func)* Clear the interrupt status register and re-enable the * interrupt. */ -BT_DBG ("ireg = 0x%x" , ireg); +pr_debug ("ireg = 0x%x\n" , ireg); sdio_writeb(card->func, ~(ireg) & (DN_LD_HOST_INT_STATUS | UP_LD_HOST_INT_STATUS),
@@ -736,7 +736,7 @@ static int btmrvl_sdio_register_dev(struct btmrvl_sdio_card *card) card->ioport |= (reg <<16 ); -BT_DBG ("SDIO FUNC%d IO port: 0x%x" , func->num, card->ioport); +pr_debug ("SDIO FUNC%d IO port: 0x%x\n" , func->num, card->ioport);sdio_set_drvdata (func, card);
@@ -873,7 +873,7 @@ static int btmrvl_sdio_download_fw(struct btmrvl_sdio_card *card)sdio_claim_host (card->func);if (!btmrvl_sdio_verify_fw_download (card,1 )) { -BT_DBG ("Firmware already downloaded!" ); +pr_debug ("Firmware already downloaded!\n" ); goto done; }
@@ -885,7 +885,8 @@ static int btmrvl_sdio_download_fw(struct btmrvl_sdio_card *card) goto done; }if (fws0) { -BT_DBG ("BT not the winner (%#x). Skip FW downloading" , fws0); +pr_debug ("BT not the winner (%#x). Skip FW downloading\n" , + fws0);/* Give other function more time to download the firmware */ pollnum *=10 ;
@@ -934,7 +935,7 @@ static int btmrvl_sdio_wakeup_fw(struct btmrvl_private *priv)sdio_release_host (card->func); -BT_DBG ("wake up firmware" ); +pr_debug ("wake up firmware\n" );return ret; }
@@ -1034,7 +1035,7 @@ static void btmrvl_sdio_remove(struct sdio_func *func) MODULE_SHUTDOWN_REQ);btmrvl_sdio_disable_host_int (card); } -BT_DBG ("unregester dev" ); +pr_debug ("unregister dev\n" );btmrvl_sdio_unregister_dev (card);btmrvl_remove_card (card->priv);kfree (card);
drivers/bluetooth/btsdio.c +12 -12
@@ -78,7 +78,7 @@ static int btsdio_tx_packet(struct btsdio_data *data, struct sk_buff *skb) {int err; -BT_DBG ("%s" , data->hdev->name); +pr_debug ("%s\n" , data->hdev->name);/* Prepend Type-A header */ skb_push (skb,4 );
@@ -107,7 +107,7 @@ static void btsdio_work(struct work_struct *work)struct sk_buff *skb;int err; -BT_DBG ("%s" , data->hdev->name); +pr_debug ("%s\n" , data->hdev->name);sdio_claim_host (data->func);
@@ -129,7 +129,7 @@ static int btsdio_rx_packet(struct btsdio_data *data)struct sk_buff *skb;int err, len; -BT_DBG ("%s" , data->hdev->name); +pr_debug ("%s\n" , data->hdev->name); err =sdio_readsb (data->func, hdr,REG_RDAT ,4 );if (err <0 )
@@ -174,7 +174,7 @@ static void btsdio_interrupt(struct sdio_func *func)struct btsdio_data *data =sdio_get_drvdata (func);int intrd; -BT_DBG ("%s" , data->hdev->name); +pr_debug ("%s\n" , data->hdev->name); intrd =sdio_readb (func,REG_INTRD ,NULL );if (intrd &0x01 ) {
@@ -192,7 +192,7 @@ static int btsdio_open(struct hci_dev *hdev)struct btsdio_data *data = hdev->driver_data;int err; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name);if (test_and_set_bit (HCI_RUNNING , &hdev->flags))return 0 ;
@@ -227,7 +227,7 @@ static int btsdio_close(struct hci_dev *hdev) {struct btsdio_data *data = hdev->driver_data; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name);if (!test_and_clear_bit (HCI_RUNNING , &hdev->flags))return 0 ;
@@ -248,7 +248,7 @@ static int btsdio_flush(struct hci_dev *hdev) {struct btsdio_data *data = hdev->driver_data; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name);skb_queue_purge (&data->txq);
@@ -260,7 +260,7 @@ static int btsdio_send_frame(struct sk_buff *skb)struct hci_dev *hdev = (struct hci_dev *) skb->dev;struct btsdio_data *data = hdev->driver_data; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name);if (!test_bit (HCI_RUNNING , &hdev->flags))return -EBUSY ;
@@ -293,7 +293,7 @@ static void btsdio_destruct(struct hci_dev *hdev) {struct btsdio_data *data = hdev->driver_data; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name);kfree (data); }
@@ -306,10 +306,10 @@ static int btsdio_probe(struct sdio_func *func,struct sdio_func_tuple *tuple = func->tuples;int err; -BT_DBG ("func %p id %p class 0x%04x" , func, id, func->class); +pr_debug ("func %p id %p class 0x%04x\n" , func, id, func->class);while (tuple) { -BT_DBG ("code 0x%x size %d" , tuple->code, tuple->size); +pr_debug ("code 0x%x size %d\n" , tuple->code, tuple->size); tuple = tuple->next; }
@@ -366,7 +366,7 @@ static void btsdio_remove(struct sdio_func *func)struct btsdio_data *data =sdio_get_drvdata (func);struct hci_dev *hdev; -BT_DBG ("func %p" , func); +pr_debug ("func %p\n" , func);if (!data)return ;
drivers/bluetooth/btusb.c +24 -24
162 lines not on this page · raw message
drivers/bluetooth/btwilink.c +8 -9
@@ -155,7 +155,7 @@ static int ti_st_open(struct hci_dev *hdev)struct ti_st *hst;int err, i; -BT_DBG ("%s %p" , hdev->name, hdev); +pr_debug ("%s %p\n" , hdev->name, hdev);if (test_and_set_bit (HCI_RUNNING , &hdev->flags))return -EBUSY ;
@@ -191,8 +191,7 @@ static int ti_st_open(struct hci_dev *hdev)/* ST is busy with either protocol * registration or firmware download. */ -BT_DBG ("waiting for registration " -"completion signal from ST" ); +pr_debug ("waiting for registration completion signal from ST\n" ); timeleft =wait_for_completion_timeout (&hst->wait_reg_completion,msecs_to_jiffies (BT_REGISTER_TIMEOUT ));
@@ -268,8 +267,8 @@ static int ti_st_send_frame(struct sk_buff *skb)/* Prepend skb with frame type */ memcpy (skb_push (skb,1 ), &bt_cb (skb)->pkt_type,1 ); -BT_DBG ("%s: type %d len %d" , hdev->name,bt_cb (skb)->pkt_type, - skb->len); +pr_debug ("%s: type %d len %d\n" , + hdev->name,bt_cb (skb)->pkt_type, skb->len);/* Insert skb to shared transport layer's transmit queue. * Freeing skb memory is taken care in shared transport layer,
@@ -292,7 +291,7 @@ static int ti_st_send_frame(struct sk_buff *skb)static void ti_st_destruct (struct hci_dev *hdev) { -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name);/* do nothing here, since platform remove * would free the hdev->driver_data */
@@ -315,7 +314,7 @@ static int bt_ti_probe(struct platform_device *pdev)return -ENOMEM ; } -BT_DBG ("hdev %p" , hdev); +pr_debug ("hdev %p\n" , hdev); hst->hdev = hdev; hdev->bus =HCI_UART ;
@@ -335,7 +334,7 @@ static int bt_ti_probe(struct platform_device *pdev)return err; } -BT_DBG ("HCI device registered (hdev %p)" , hdev); +pr_debug ("HCI device registered (hdev %p)\n" , hdev);dev_set_drvdata (&pdev->dev, hst);return err;
@@ -349,7 +348,7 @@ static int bt_ti_remove(struct platform_device *pdev)if (!hst)return -EFAULT ; -BT_DBG ("%s" , hst->hdev->name); +pr_debug ("%s\n" , hst->hdev->name); hdev = hst->hdev;ti_st_close (hdev);
drivers/bluetooth/hci_ath.c +4 -4
@@ -110,7 +110,7 @@ static int ath_open(struct hci_uart *hu) {struct ath_struct *ath; -BT_DBG ("hu %p" , hu); +pr_debug ("hu %p\n" , hu); ath =kzalloc (sizeof (*ath),GFP_ATOMIC );if (!ath)
@@ -131,7 +131,7 @@ static int ath_flush(struct hci_uart *hu) {struct ath_struct *ath = hu->priv; -BT_DBG ("hu %p" , hu); +pr_debug ("hu %p\n" , hu);skb_queue_purge (&ath->txq);
@@ -143,7 +143,7 @@ static int ath_close(struct hci_uart *hu) {struct ath_struct *ath = hu->priv; -BT_DBG ("hu %p" , hu); +pr_debug ("hu %p\n" , hu);skb_queue_purge (&ath->txq);
@@ -178,7 +178,7 @@ static int ath_enqueue(struct hci_uart *hu, struct sk_buff *skb) ath->cur_sleep = skb->data[HCI_COMMAND_HDR_SIZE ]; } -BT_DBG ("hu %p skb %p" , hu, skb); +pr_debug ("hu %p skb %p\n" , hu, skb);/* Prepend skb with frame type */ memcpy (skb_push (skb,1 ), &bt_cb (skb)->pkt_type,1 );
drivers/bluetooth/hci_bcsp.c +14 -14
@@ -239,11 +239,11 @@ static struct sk_buff *bcsp_prepare_pkt(struct bcsp_struct *bcsp, u8 *data, hdr[0 ] = bcsp->rxseq_txack <<3 ; bcsp->txack_req =0 ; -BT_DBG ("We request packet no %u to card" , bcsp->rxseq_txack); +pr_debug ("We request packet no %u to card\n" , bcsp->rxseq_txack);if (rel) { hdr[0 ] |=0x80 + bcsp->msgq_txseq; -BT_DBG ("Sending packet with seqno %u" , bcsp->msgq_txseq); +pr_debug ("Sending packet with seqno %u\n" , bcsp->msgq_txseq); bcsp->msgq_txseq = (bcsp->msgq_txseq +1 ) &0x07 ; }
@@ -340,7 +340,7 @@ static struct sk_buff *bcsp_dequeue(struct hci_uart *hu)static int bcsp_flush (struct hci_uart *hu) { -BT_DBG ("hu %p" , hu); +pr_debug ("hu %p\n" , hu);return 0 ; }
@@ -367,9 +367,9 @@ static void bcsp_pkt_cull(struct bcsp_struct *bcsp)if (bcsp->rxack != seqno)bt_err ("Peer acked invalid packet\n" ); -BT_DBG ("Removing %u pkts out of %u, up to seqno %u" , - pkts_to_be_removed,skb_queue_len (&bcsp->unack), - (seqno -1 ) &0x07 ); +pr_debug ("Removing %u pkts out of %u, up to seqno %u\n" , + pkts_to_be_removed,skb_queue_len (&bcsp->unack), + (seqno -1 ) &0x07 ); i =0 ; skb_queue_walk_safe(&bcsp->unack, skb, tmp) {
@@ -406,7 +406,7 @@ static void bcsp_handle_le_pkt(struct hci_uart *hu) !memcmp(&bcsp->rx_skb->data[4], conf_pkt, 4)) {struct sk_buff *nskb =alloc_skb (4 ,GFP_ATOMIC ); -BT_DBG ("Found a LE conf pkt" ); +pr_debug ("Found a LE conf pkt\n" );if (!nskb)return ;memcpy (skb_put (nskb,4 ), conf_rsp_pkt,4 );
@@ -477,7 +477,7 @@ static void bcsp_complete_rx_pkt(struct hci_uart *hu)int pass_up;if (bcsp->rx_skb->data[0 ] &0x80 ) {/* reliable pkt */ -BT_DBG ("Received seqno %u from card" , bcsp->rxseq_txack); +pr_debug ("Received seqno %u from card\n" , bcsp->rxseq_txack); bcsp->rxseq_txack++; bcsp->rxseq_txack %=0x8 ; bcsp->txack_req =1 ;
@@ -487,7 +487,7 @@ static void bcsp_complete_rx_pkt(struct hci_uart *hu) } bcsp->rxack = (bcsp->rx_skb->data[0 ] >>3 ) &0x07 ; -BT_DBG ("Request for pkt %u from card" , bcsp->rxack); +pr_debug ("Request for pkt %u from card\n" , bcsp->rxack);bcsp_pkt_cull (bcsp); if ((bcsp->rx_skb->data[1] & 0x0f) == 6 &&
@@ -555,8 +555,8 @@ static int bcsp_recv(struct hci_uart *hu, void *data, int count)struct bcsp_struct *bcsp = hu->priv; registerunsigned char *ptr; -BT_DBG ("hu %p count %d rx_state %d rx_count %ld" , - hu, count, bcsp->rx_state, bcsp->rx_count); +pr_debug ("hu %p count %d rx_state %d rx_count %ld\n" , + hu, count, bcsp->rx_state, bcsp->rx_count); ptr = data;while (count) {
@@ -674,7 +674,7 @@ static void bcsp_timed_event(unsigned long arg)struct sk_buff *skb;unsigned long flags; -BT_DBG ("hu %p retransmitting %u pkts" , hu, bcsp->unack.qlen); +pr_debug ("hu %p retransmitting %u pkts\n" , hu, bcsp->unack.qlen);spin_lock_irqsave_nested (&bcsp->unack.lock, flags,SINGLE_DEPTH_NESTING );
@@ -692,7 +692,7 @@ static int bcsp_open(struct hci_uart *hu) {struct bcsp_struct *bcsp; -BT_DBG ("hu %p" , hu); +pr_debug ("hu %p\n" , hu); bcsp =kzalloc (sizeof (*bcsp),GFP_ATOMIC );if (!bcsp)
@@ -720,7 +720,7 @@ static int bcsp_close(struct hci_uart *hu)struct bcsp_struct *bcsp = hu->priv; hu->priv =NULL ; -BT_DBG ("hu %p" , hu); +pr_debug ("hu %p\n" , hu);skb_queue_purge (&bcsp->unack);skb_queue_purge (&bcsp->rel);
drivers/bluetooth/hci_h4.c +5 -5
@@ -67,7 +67,7 @@ static int h4_open(struct hci_uart *hu) {struct h4_struct *h4; -BT_DBG ("hu %p" , hu); +pr_debug ("hu %p\n" , hu); h4 =kzalloc (sizeof (*h4),GFP_ATOMIC );if (!h4)
@@ -84,7 +84,7 @@ static int h4_flush(struct hci_uart *hu) {struct h4_struct *h4 = hu->priv; -BT_DBG ("hu %p" , hu); +pr_debug ("hu %p\n" , hu);skb_queue_purge (&h4->txq);
@@ -98,7 +98,7 @@ static int h4_close(struct hci_uart *hu) hu->priv =NULL ; -BT_DBG ("hu %p" , hu); +pr_debug ("hu %p\n" , hu);skb_queue_purge (&h4->txq);
@@ -115,7 +115,7 @@ static int h4_enqueue(struct hci_uart *hu, struct sk_buff *skb) {struct h4_struct *h4 = hu->priv; -BT_DBG ("hu %p skb %p" , hu, skb); +pr_debug ("hu %p skb %p\n" , hu, skb);/* Prepend skb with frame type */ memcpy (skb_push (skb,1 ), &bt_cb (skb)->pkt_type,1 );
@@ -128,7 +128,7 @@ static inline int h4_check_data_len(struct h4_struct *h4, int len) { registerint room =skb_tailroom (h4->rx_skb); -BT_DBG ("len %d room %d" , len, room); +pr_debug ("len %d room %d\n" , len, room);if (!len) {hci_recv_frame (h4->rx_skb);
drivers/bluetooth/hci_ldisc.c +12 -11
@@ -129,7 +129,7 @@ int hci_uart_tx_wakeup(struct hci_uart *hu)return 0 ; } -BT_DBG ("" ); +pr_debug ("\n" ); restart:clear_bit (HCI_UART_TX_WAKEUP , &hu->tx_state);
@@ -162,7 +162,7 @@ restart:/* Initialize device */ static int hci_uart_open (struct hci_dev *hdev) { -BT_DBG ("%s %p" , hdev->name, hdev); +pr_debug ("%s %p\n" , hdev->name, hdev);/* Nothing to do for UART driver */
@@ -177,7 +177,7 @@ static int hci_uart_flush(struct hci_dev *hdev)struct hci_uart *hu = (struct hci_uart *) hdev->driver_data;struct tty_struct *tty = hu->tty; -BT_DBG ("hdev %p tty %p" , hdev, tty); +pr_debug ("hdev %p tty %p\n" , hdev, tty);if (hu->tx_skb) {kfree_skb (hu->tx_skb); hu->tx_skb =NULL ;
@@ -196,7 +196,7 @@ static int hci_uart_flush(struct hci_dev *hdev)/* Close device */ static int hci_uart_close (struct hci_dev *hdev) { -BT_DBG ("hdev %p" , hdev); +pr_debug ("hdev %p\n" , hdev);if (!test_and_clear_bit (HCI_RUNNING , &hdev->flags))return 0 ;
@@ -222,7 +222,8 @@ static int hci_uart_send_frame(struct sk_buff *skb) hu = (struct hci_uart *) hdev->driver_data; -BT_DBG ("%s: type %d len %d" , hdev->name,bt_cb (skb)->pkt_type, skb->len); +pr_debug ("%s: type %d len %d\n" , + hdev->name,bt_cb (skb)->pkt_type, skb->len); hu->proto->enqueue (hu, skb);
@@ -236,7 +237,7 @@ static void hci_uart_destruct(struct hci_dev *hdev)if (!hdev)return ; -BT_DBG ("%s" , hdev->name); +pr_debug ("%s\n" , hdev->name);kfree (hdev->driver_data); }
@@ -254,7 +255,7 @@ static int hci_uart_tty_open(struct tty_struct *tty) {struct hci_uart *hu = (void *) tty->disc_data; -BT_DBG ("tty %p" , tty); +pr_debug ("tty %p\n" , tty);/* FIXME: This btw is bogus, nothing requires the old ldisc to clear the pointer */
@@ -298,7 +299,7 @@ static void hci_uart_tty_close(struct tty_struct *tty) {struct hci_uart *hu = (void *)tty->disc_data; -BT_DBG ("tty %p" , tty); +pr_debug ("tty %p\n" , tty);/* Detach from the tty */ tty->disc_data =NULL ;
@@ -331,7 +332,7 @@ static void hci_uart_tty_wakeup(struct tty_struct *tty) {struct hci_uart *hu = (void *)tty->disc_data; -BT_DBG ("" ); +pr_debug ("\n" );if (!hu)return ;
@@ -379,7 +380,7 @@ static int hci_uart_register_dev(struct hci_uart *hu) {struct hci_dev *hdev; -BT_DBG ("" ); +pr_debug ("\n" );/* Initialize and register HCI device */ hdev =hci_alloc_dev ();
@@ -460,7 +461,7 @@ static int hci_uart_tty_ioctl(struct tty_struct *tty, struct file * file,struct hci_uart *hu = (void *)tty->disc_data;int err =0 ; -BT_DBG ("" ); +pr_debug ("\n" );/* Verify the status of the device */ if (!hu)
drivers/bluetooth/hci_ll.c +26 -24
190 lines not on this page · raw message
include/net/bluetooth/l2cap.h +1 -1
@@ -609,7 +609,7 @@ static inline void l2cap_chan_put(struct l2cap_chan *c)static inline void l2cap_set_timer (struct l2cap_chan *chan,struct delayed_work *work,long timeout) { -BT_DBG ("chan %p state %d timeout %ld" , chan, chan->state, timeout); +pr_debug ("chan %p state %d timeout %ld\n" , chan, chan->state, timeout);if (!cancel_delayed_work (work))l2cap_chan_hold (chan);
net/bluetooth/af_bluetooth.c +8 -8
@@ -170,7 +170,7 @@ EXPORT_SYMBOL(bt_sock_unlink);void bt_accept_enqueue (struct sock *parent,struct sock *sk) { -BT_DBG ("parent %p, sk %p" , parent, sk); +pr_debug ("parent %p, sk %p\n" , parent, sk);sock_hold (sk);list_add_tail (&bt_sk (sk)->accept_q, &bt_sk (parent)->accept_q);
@@ -181,7 +181,7 @@ EXPORT_SYMBOL(bt_accept_enqueue);void bt_accept_unlink (struct sock *sk) { -BT_DBG ("sk %p state %d" , sk, sk->sk_state); +pr_debug ("sk %p state %d\n" , sk, sk->sk_state);list_del_init (&bt_sk (sk)->accept_q);bt_sk (sk)->parent->sk_ack_backlog--;
@@ -195,7 +195,7 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock)struct list_head *p, *n;struct sock *sk; -BT_DBG ("parent %p" , parent); +pr_debug ("parent %p\n" , parent);list_for_each_safe (p, n, &bt_sk (parent)->accept_q) { sk = (struct sock *) list_entry(p, struct bt_sock, accept_q);
@@ -235,7 +235,7 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,size_t copied;int err; -BT_DBG ("sock %p sk %p len %zu" , sock, sk, len); +pr_debug ("sock %p sk %p len %zu\n" , sock, sk, len);if (flags & (MSG_OOB ))return -EOPNOTSUPP ;
@@ -308,7 +308,7 @@ int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock, msg->msg_namelen =0 ; -BT_DBG ("sk %p size %zu" , sk, size); +pr_debug ("sk %p size %zu\n" , sk, size);lock_sock (sk);
@@ -423,7 +423,7 @@ unsigned int bt_sock_poll(struct file *file, struct socket *sock, poll_table *wastruct sock *sk = sock->sk;unsigned int mask =0 ; -BT_DBG ("sock %p, sk %p" , sock, sk); +pr_debug ("sock %p, sk %p\n" , sock, sk);poll_wait (file,sk_sleep (sk), wait);
@@ -466,7 +466,7 @@ int bt_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)long amount;int err; -BT_DBG ("sk %p cmd %x arg %lx" , sk, cmd, arg); +pr_debug ("sk %p cmd %x arg %lx\n" , sk, cmd, arg);switch (cmd) {case TIOCOUTQ :
@@ -512,7 +512,7 @@ int bt_sock_wait_state(struct sock *sk, int state, unsigned long timeo)DECLARE_WAITQUEUE (wait, current);int err =0 ; -BT_DBG ("sk %p" , sk); +pr_debug ("sk %p\n" , sk);add_wait_queue (sk_sleep (sk), &wait);set_current_state (TASK_INTERRUPTIBLE );
net/bluetooth/bnep/core.c +13 -13
@@ -66,7 +66,7 @@ static struct bnep_session *__bnep_get_session(u8 *dst) {struct bnep_session *s; -BT_DBG ("" ); +pr_debug ("\n" );list_for_each_entry (s, &bnep_session_list, list)if (!compare_ether_addr (dst, s->eh.h_source))
@@ -131,7 +131,7 @@ static int bnep_ctrl_set_netfilter(struct bnep_session *s, __be16 *data, int lenif (len < n)return -EILSEQ ; -BT_DBG ("filter len %d" , n); +pr_debug ("filter len %d\n" , n);#ifdef CONFIG_BT_BNEP_PROTO_FILTER n /=4 ;
@@ -143,8 +143,8 @@ static int bnep_ctrl_set_netfilter(struct bnep_session *s, __be16 *data, int len f[i].start =get_unaligned_be16 (data++); f[i].end =get_unaligned_be16 (data++); -BT_DBG ("proto filter start %d end %d" , - f[i].start, f[i].end); +pr_debug ("proto filter start %d end %d\n" , + f[i].start, f[i].end); }if (i <BNEP_MAX_PROTO_FILTERS )
@@ -177,7 +177,7 @@ static int bnep_ctrl_set_mcfilter(struct bnep_session *s, u8 *data, int len)if (len < n)return -EILSEQ ; -BT_DBG ("filter len %d" , n); +pr_debug ("filter len %d\n" , n);#ifdef CONFIG_BT_BNEP_MC_FILTER n /= (ETH_ALEN *2 );
@@ -199,8 +199,8 @@ static int bnep_ctrl_set_mcfilter(struct bnep_session *s, u8 *data, int len) a2 = data; data +=ETH_ALEN ; -BT_DBG ("mc filter %s -> %s" , -batostr ((void *) a1),batostr ((void *) a2)); +pr_debug ("mc filter %s -> %s\n" , +batostr ((void *) a1),batostr ((void *) a2));/* Iterate from a1 to a2 */ set_bit (bnep_mc_hash (a1), (ulong *) &s->mc_filter);
@@ -215,7 +215,7 @@ static int bnep_ctrl_set_mcfilter(struct bnep_session *s, u8 *data, int len) } } -BT_DBG ("mc filter hash 0x%llx" , s->mc_filter); +pr_debug ("mc filter hash 0x%llx\n" , s->mc_filter);bnep_send_rsp (s,BNEP_FILTER_MULTI_ADDR_RSP ,BNEP_SUCCESS );#else
@@ -277,7 +277,7 @@ static int bnep_rx_extension(struct bnep_session *s, struct sk_buff *skb)break ; } -BT_DBG ("type 0x%x len %d" , h->type, h->len); +pr_debug ("type 0x%x len %d\n" , h->type, h->len);switch (h->type &BNEP_TYPE_MASK ) {case BNEP_EXT_CONTROL :
@@ -412,7 +412,7 @@ static inline int bnep_tx_frame(struct bnep_session *s, struct sk_buff *skb)int len =0 , il =0 ;u8 type =0 ; -BT_DBG ("skb %p dev %p type %d" , skb, skb->dev, skb->pkt_type); +pr_debug ("skb %p dev %p type %d\n" , skb, skb->dev, skb->pkt_type);if (!skb->dev) {/* Control frame sent by us */
@@ -471,7 +471,7 @@ static int bnep_session(void *arg)struct sk_buff *skb;wait_queue_t wait; -BT_DBG ("" ); +pr_debug ("\n" );set_user_nice (current,-15 );
@@ -556,7 +556,7 @@ int bnep_add_connection(struct bnep_connadd_req *req, struct socket *sock)u8 dst[ETH_ALEN ], src[ETH_ALEN ];int err; -BT_DBG ("" ); +pr_debug ("\n" );baswap ((void *) dst, &bt_sk (sock->sk)->dst);baswap ((void *) src, &bt_sk (sock->sk)->src);
@@ -636,7 +636,7 @@ int bnep_del_connection(struct bnep_conndel_req *req)struct bnep_session *s;int err =0 ; -BT_DBG ("" ); +pr_debug ("\n" );down_read (&bnep_session_sem);
net/bluetooth/bnep/netdev.c +6 -6
@@ -65,7 +65,7 @@ static void bnep_net_set_mc_list(struct net_device *dev)struct sk_buff *skb;int size; -BT_DBG ("%s mc_count %d" , dev->name,netdev_mc_count (dev)); +pr_debug ("%s mc_count %d\n" , dev->name,netdev_mc_count (dev)); size =sizeof (*r) + (BNEP_MAX_MULTICAST_FILTERS +1 ) *ETH_ALEN *2 ; skb =alloc_skb (size,GFP_ATOMIC );
@@ -117,13 +117,13 @@ static void bnep_net_set_mc_list(struct net_device *dev)static int bnep_net_set_mac_addr (struct net_device *dev,void *arg) { -BT_DBG ("%s" , dev->name); +pr_debug ("%s\n" , dev->name);return 0 ; }static void bnep_net_timeout (struct net_device *dev) { -BT_DBG ("net_timeout" ); +pr_debug ("net_timeout\n" );netif_wake_queue (dev); }
@@ -165,7 +165,7 @@ static inline int bnep_net_proto_filter(struct sk_buff *skb, struct bnep_session return 0; } -BT_DBG ("BNEP: filtered skb %p, proto 0x%.4x" , skb, proto); +pr_debug ("BNEP: filtered skb %p, proto 0x%.4x\n" , skb, proto);return 1 ; }#endif
@@ -176,7 +176,7 @@ static netdev_tx_t bnep_net_xmit(struct sk_buff *skb,struct bnep_session *s =netdev_priv (dev);struct sock *sk = s->sock->sk; -BT_DBG ("skb %p, dev %p" , skb, dev); +pr_debug ("skb %p, dev %p\n" , skb, dev);#ifdef CONFIG_BT_BNEP_MC_FILTER if (bnep_net_mc_filter (skb, s)) {
@@ -202,7 +202,7 @@ static netdev_tx_t bnep_net_xmit(struct sk_buff *skb,wake_up_interruptible (sk_sleep (sk));if (skb_queue_len (&sk->sk_write_queue) >=BNEP_TX_QUEUE_LEN ) { -BT_DBG ("tx queue is full" ); +pr_debug ("tx queue is full\n" );/* Stop queuing. * Session thread will do netif_wake_queue() */
net/bluetooth/bnep/sock.c +3 -3
@@ -50,7 +50,7 @@ static int bnep_sock_release(struct socket *sock) {struct sock *sk = sock->sk; -BT_DBG ("sock %p sk %p" , sock, sk); +pr_debug ("sock %p sk %p\n" , sock, sk);if (!sk)return 0 ;
@@ -70,7 +70,7 @@ static int bnep_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned longvoid __user *argp = (void __user *)arg;int err; -BT_DBG ("cmd %x arg %lx" , cmd, arg); +pr_debug ("cmd %x arg %lx\n" , cmd, arg);switch (cmd) {case BNEPCONNADD :
@@ -201,7 +201,7 @@ static int bnep_sock_create(struct net *net, struct socket *sock, int protocol, {struct sock *sk; -BT_DBG ("sock %p" , sock); +pr_debug ("sock %p\n" , sock);if (sock->type !=SOCK_RAW )return -ESOCKTNOSUPPORT ;
net/bluetooth/cmtp/capi.c +16 -15
@@ -74,7 +74,7 @@ static struct cmtp_application *cmtp_application_add(struct cmtp_session *sessio {struct cmtp_application *app =kzalloc (sizeof (*app),GFP_KERNEL ); -BT_DBG ("session %p application %p appl %d" , session, app, appl); +pr_debug ("session %p application %p appl %d\n" , session, app, appl);if (!app)return NULL ;
@@ -89,7 +89,7 @@ static struct cmtp_application *cmtp_application_add(struct cmtp_session *sessiostatic void cmtp_application_del (struct cmtp_session *session,struct cmtp_application *app) { -BT_DBG ("session %p application %p" , session, app); +pr_debug ("session %p application %p\n" , session, app);if (app) {list_del (&app->list);
@@ -137,7 +137,7 @@ 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); +pr_debug ("session %p skb %p len %d\n" , session, skb, skb->len); scb->id =-1 ; scb->data = (CAPIMSG_COMMAND (skb->data) ==CAPI_DATA_B3 );
@@ -154,7 +154,8 @@ static void cmtp_send_interopmsg(struct cmtp_session *session,struct sk_buff *skb;unsigned char *s; -BT_DBG ("session %p subcmd 0x%02x appl %d msgnum %d" , session, subcmd, appl, msgnum); +pr_debug ("session %p subcmd 0x%02x appl %d msgnum %d\n" , + session, subcmd, appl, msgnum); skb =alloc_skb (CAPI_MSG_BASELEN +6 + len,GFP_ATOMIC );if (!skb) {
@@ -190,7 +191,7 @@ static void cmtp_recv_interopmsg(struct cmtp_session *session, struct sk_buff *s__u16 appl, msgnum, func, info;__u32 controller; -BT_DBG ("session %p skb %p len %d" , session, skb, skb->len); +pr_debug ("session %p skb %p len %d\n" , session, skb, skb->len);switch (CAPIMSG_SUBCOMMAND (skb->data)) {case CAPI_CONF :
@@ -329,7 +330,7 @@ void cmtp_recv_capimsg(struct cmtp_session *session, struct sk_buff *skb)__u16 appl;__u32 contr; -BT_DBG ("session %p skb %p len %d" , session, skb, skb->len); +pr_debug ("session %p skb %p len %d\n" , session, skb, skb->len);if (skb->len <CAPI_MSG_BASELEN )return ;
@@ -373,7 +374,7 @@ void cmtp_recv_capimsg(struct cmtp_session *session, struct sk_buff *skb)static int cmtp_load_firmware (struct capi_ctr *ctrl,capiloaddata *data) { -BT_DBG ("ctrl %p data %p" , ctrl, data); +pr_debug ("ctrl %p data %p\n" , ctrl, data);return 0 ; }
@@ -382,7 +383,7 @@ static void cmtp_reset_ctr(struct capi_ctr *ctrl) {struct cmtp_session *session = ctrl->driverdata; -BT_DBG ("ctrl %p" , ctrl); +pr_debug ("ctrl %p\n" , ctrl);capi_ctr_down (ctrl);
@@ -399,8 +400,8 @@ static void cmtp_register_appl(struct capi_ctr *ctrl, __u16 appl, capi_register_unsigned char buf[8 ];int err =0 , nconn, want = rp->level3cnt; -BT_DBG ("ctrl %p appl %d level3cnt %d datablkcnt %d datablklen %d" , - ctrl, appl, rp->level3cnt, rp->datablkcnt, rp->datablklen); +pr_debug ("ctrl %p appl %d level3cnt %d datablkcnt %d datablklen %d\n" , + ctrl, appl, rp->level3cnt, rp->datablkcnt, rp->datablklen); application =cmtp_application_add (session, appl);if (!application) {
@@ -464,7 +465,7 @@ static void cmtp_release_appl(struct capi_ctr *ctrl, __u16 appl)struct cmtp_session *session = ctrl->driverdata;struct cmtp_application *application; -BT_DBG ("ctrl %p appl %d" , ctrl, appl); +pr_debug ("ctrl %p appl %d\n" , ctrl, appl); application =cmtp_application_get (session,CMTP_APPLID , appl);if (!application) {
@@ -490,7 +491,7 @@ static u16 cmtp_send_message(struct capi_ctr *ctrl, struct sk_buff *skb)__u16 appl;__u32 contr; -BT_DBG ("ctrl %p skb %p" , ctrl, skb); +pr_debug ("ctrl %p skb %p\n" , ctrl, skb); appl =CAPIMSG_APPID (skb->data); contr =CAPIMSG_CONTROL (skb->data);
@@ -555,7 +556,7 @@ int cmtp_attach_device(struct cmtp_session *session)unsigned char buf[4 ];long ret; -BT_DBG ("session %p" , session); +pr_debug ("session %p\n" , session);capimsg_setu32 (buf,0 ,0 );
@@ -598,7 +599,7 @@ int cmtp_attach_device(struct cmtp_session *session) session->num = session->ctrl.cnr; -BT_DBG ("session %p num %d" , session, session->num); +pr_debug ("session %p num %d\n" , session, session->num);capimsg_setu32 (buf,0 ,1 );
@@ -619,7 +620,7 @@ int cmtp_attach_device(struct cmtp_session *session)void cmtp_detach_device (struct cmtp_session *session) { -BT_DBG ("session %p" , session); +pr_debug ("session %p\n" , session);detach_capi_ctr (&session->ctrl); }
net/bluetooth/cmtp/core.c +12 -11
@@ -54,7 +54,7 @@ static struct cmtp_session *__cmtp_get_session(bdaddr_t *bdaddr) {struct cmtp_session *session; -BT_DBG ("" ); +pr_debug ("\n" );list_for_each_entry (session, &cmtp_session_list, list)if (!bacmp (bdaddr, &session->bdaddr))
@@ -108,7 +108,7 @@ static inline void cmtp_add_msgpart(struct cmtp_session *session, int id, conststruct sk_buff *skb = session->reassembly[id], *nskb;int size; -BT_DBG ("session %p buf %p count %d" , session, buf, count); +pr_debug ("session %p buf %p count %d\n" , session, buf, count); size = (skb) ? skb->len + count : count;
@@ -133,7 +133,7 @@ static inline int cmtp_recv_frame(struct cmtp_session *session, struct sk_buff *__u8 hdr, hdrlen, id;__u16 len; -BT_DBG ("session %p skb %p len %d" , session, skb, skb->len); +pr_debug ("session %p skb %p len %d\n" , session, skb, skb->len);while (skb->len >0 ) { hdr = skb->data[0 ];
@@ -155,7 +155,8 @@ static inline int cmtp_recv_frame(struct cmtp_session *session, struct sk_buff * id = (hdr &0x3c ) >>2 ; -BT_DBG ("hdr 0x%02x hdrlen %d len %d id %d" , hdr, hdrlen, len, id); +pr_debug ("hdr 0x%02x hdrlen %d len %d id %d\n" , + hdr, hdrlen, len, id);if (hdrlen + len > skb->len) {bt_err ("Wrong size or header information in CMTP frame\n" );
@@ -196,7 +197,7 @@ static int cmtp_send_frame(struct cmtp_session *session, unsigned char *data, instruct kvec iv = { data, len };struct msghdr msg; -BT_DBG ("session %p data %p len %d" , session, data, len); +pr_debug ("session %p data %p len %d\n" , session, data, len);if (!len)return 0 ;
@@ -212,7 +213,7 @@ static void cmtp_process_transmit(struct cmtp_session *session)unsigned char *hdr;unsigned int size, tail; -BT_DBG ("session %p" , session); +pr_debug ("session %p\n" , session); nskb =alloc_skb (session->mtu,GFP_ATOMIC );if (!nskb) {
@@ -282,7 +283,7 @@ static int cmtp_session(void *arg)struct sk_buff *skb;wait_queue_t wait; -BT_DBG ("session %p" , session); +pr_debug ("session %p\n" , session);set_user_nice (current,-15 );
@@ -332,7 +333,7 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock)struct cmtp_session *session, *s;int i, err; -BT_DBG ("" ); +pr_debug ("\n" ); session =kzalloc (sizeof (struct cmtp_session ),GFP_KERNEL );if (!session)
@@ -351,7 +352,7 @@ int cmtp_add_connection(struct cmtp_connadd_req *req, struct socket *sock) session->mtu =min_t (uint,l2cap_pi (sock->sk)->chan->omtu,l2cap_pi (sock->sk)->chan->imtu); -BT_DBG ("mtu %d" , session->mtu); +pr_debug ("mtu %d\n" , session->mtu);sprintf (session->name,"%s" ,batostr (&bt_sk (sock->sk)->dst));
@@ -409,7 +410,7 @@ int cmtp_del_connection(struct cmtp_conndel_req *req)struct cmtp_session *session;int err =0 ; -BT_DBG ("" ); +pr_debug ("\n" );down_read (&cmtp_session_sem);
@@ -433,7 +434,7 @@ int cmtp_get_connlist(struct cmtp_connlist_req *req)struct cmtp_session *session;int err =0 , n =0 ; -BT_DBG ("" ); +pr_debug ("\n" );down_read (&cmtp_session_sem);
net/bluetooth/cmtp/sock.c +3 -3
@@ -47,7 +47,7 @@ static int cmtp_sock_release(struct socket *sock) {struct sock *sk = sock->sk; -BT_DBG ("sock %p sk %p" , sock, sk); +pr_debug ("sock %p sk %p\n" , sock, sk);if (!sk)return 0 ;
@@ -68,7 +68,7 @@ static int cmtp_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned longvoid __user *argp = (void __user *)arg;int err; -BT_DBG ("cmd %x arg %lx" , cmd, arg); +pr_debug ("cmd %x arg %lx\n" , cmd, arg);switch (cmd) {case CMTPCONNADD :
@@ -195,7 +195,7 @@ static int cmtp_sock_create(struct net *net, struct socket *sock, int protocol, {struct sock *sk; -BT_DBG ("sock %p" , sock); +pr_debug ("sock %p\n" , sock);if (sock->type !=SOCK_RAW )return -ESOCKTNOSUPPORT ;
net/bluetooth/hci_conn.c +29 -29
232 lines not on this page · raw message
net/bluetooth/hci_core.c +78 -73
547 lines not on this page · raw message
net/bluetooth/hci_event.c +144 -138
422 lines not on this page · raw message
net/bluetooth/hidp/core.c +24 -20
44 lines not on this page · raw message
net/bluetooth/l2cap_core.c +99 -90
189 lines not on this page · raw message
net/bluetooth/mgmt.c +45 -44
89 lines not on this page · raw message
net/bluetooth/rfcomm/core.c +84 -80
164 lines not on this page · raw message
net/bluetooth/rfcomm/sock.c +25 -24
49 lines not on this page · raw message
net/bluetooth/rfcomm/tty.c +45 -43
88 lines not on this page · raw message
net/bluetooth/sco.c +35 -34
69 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.8.111.gad25c.dirty
Part of the diff is not shown here. View the raw message.
Marcel Holtmann
maintainerRe: [PATCH V2 3/3] bluetooth: Convert BT_DBG to pr_debug
Hi Joe,
Quoted 35 lines
Add "\n" to uses, align arguments, coalesce formats. Fix a typo and fix a bad format extended by a line continuation.
Signed-off-by Joe Perches <[email protected]>--- drivers/bluetooth/ath3k.c | 10 +- drivers/bluetooth/bcm203x.c | 10 +- drivers/bluetooth/bfusb.c | 35 +++--- drivers/bluetooth/bpa10x.c | 30 ++-- drivers/bluetooth/btmrvl_main.c | 63 +++++----- drivers/bluetooth/btmrvl_sdio.c | 27 ++-- drivers/bluetooth/btsdio.c | 24 ++-- drivers/bluetooth/btusb.c | 48 ++++---- drivers/bluetooth/btwilink.c | 17 +-- drivers/bluetooth/hci_ath.c | 8 +- drivers/bluetooth/hci_bcsp.c | 28 ++-- drivers/bluetooth/hci_h4.c | 10 +- drivers/bluetooth/hci_ldisc.c | 23 ++-- drivers/bluetooth/hci_ll.c | 50 ++++---- include/net/bluetooth/l2cap.h | 2 +- net/bluetooth/af_bluetooth.c | 16 +- net/bluetooth/bnep/core.c | 26 ++-- net/bluetooth/bnep/netdev.c | 12 +- net/bluetooth/bnep/sock.c | 6 +- net/bluetooth/cmtp/capi.c | 31 +++-- net/bluetooth/cmtp/core.c | 23 ++-- net/bluetooth/cmtp/sock.c | 6 +- net/bluetooth/hci_conn.c | 58 ++++---- net/bluetooth/hci_core.c | 151 +++++++++++---------- net/bluetooth/hci_event.c | 282 ++++++++++++++++++++------------------- net/bluetooth/hci_sock.c | 20 ++-- net/bluetooth/hci_sysfs.c | 8 +- net/bluetooth/hidp/core.c | 44 ++++--- net/bluetooth/hidp/sock.c | 6 +- net/bluetooth/l2cap_core.c | 189 ++++++++++++++-------------
Quoted 8 lines
net/bluetooth/l2cap_sock.c | 34 +++--- net/bluetooth/mgmt.c | 89 ++++++------ net/bluetooth/rfcomm/core.c | 164 ++++++++++++----------- net/bluetooth/rfcomm/sock.c | 49 ++++---- net/bluetooth/rfcomm/tty.c | 88 ++++++------ net/bluetooth/sco.c | 69 +++++----- net/bluetooth/smp.c | 33 +++--- 37 files changed, 915 insertions(+), 874 deletions(-)
this one has to wait. You are disturbing multiple developers that are working on core features.
Regards
Marcel