]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Bluetooth: Enable per-module dynamic debug messages
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 30 Nov 2008 11:17:28 +0000 (12:17 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 30 Nov 2008 11:17:28 +0000 (12:17 +0100)
With the introduction of CONFIG_DYNAMIC_PRINTK_DEBUG it is possible to
allow debugging without having to recompile the kernel. This patch turns
all BT_DBG() calls into pr_debug() to support dynamic debug messages.

As a side effect all CONFIG_BT_*_DEBUG statements are now removed and
some broken debug entries have been fixed.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
31 files changed:
drivers/bluetooth/bcm203x.c
drivers/bluetooth/bfusb.c
drivers/bluetooth/bpa10x.c
drivers/bluetooth/btsdio.c
drivers/bluetooth/btusb.c
drivers/bluetooth/hci_bcsp.c
drivers/bluetooth/hci_h4.c
drivers/bluetooth/hci_ldisc.c
drivers/bluetooth/hci_ll.c
drivers/bluetooth/hci_vhci.c
include/net/bluetooth/bluetooth.h
net/bluetooth/af_bluetooth.c
net/bluetooth/bnep/bnep.h
net/bluetooth/bnep/core.c
net/bluetooth/bnep/netdev.c
net/bluetooth/bnep/sock.c
net/bluetooth/cmtp/capi.c
net/bluetooth/cmtp/core.c
net/bluetooth/cmtp/sock.c
net/bluetooth/hci_conn.c
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c
net/bluetooth/hci_sock.c
net/bluetooth/hci_sysfs.c
net/bluetooth/hidp/core.c
net/bluetooth/hidp/sock.c
net/bluetooth/l2cap.c
net/bluetooth/rfcomm/core.c
net/bluetooth/rfcomm/sock.c
net/bluetooth/rfcomm/tty.c
net/bluetooth/sco.c

index ee40201c7278ad94aadf43ac220c1cedfd67c49e..eafd4af0746e7bb2a6004e48604cf86e6ab1c109 100644 (file)
 
 #include <net/bluetooth/bluetooth.h>
 
-#ifndef CONFIG_BT_HCIBCM203X_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "1.2"
 
 static struct usb_device_id bcm203x_table[] = {
@@ -199,7 +194,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
                return -EIO;
        }
 
-       BT_DBG("minidrv data %p size %d", firmware->data, firmware->size);
+       BT_DBG("minidrv data %p size %zu", firmware->data, firmware->size);
 
        size = max_t(uint, firmware->size, 4096);
 
@@ -227,7 +222,7 @@ static int bcm203x_probe(struct usb_interface *intf, const struct usb_device_id
                return -EIO;
        }
 
-       BT_DBG("firmware data %p size %d", firmware->data, firmware->size);
+       BT_DBG("firmware data %p size %zu", firmware->data, firmware->size);
 
        data->fw_data = kmalloc(firmware->size, GFP_KERNEL);
        if (!data->fw_data) {
index 90a0946346303c4d654afd215bfbcda2c9e66f1b..d3f14bee0f1939fcb1ff0261e6018b0f99e1689e 100644 (file)
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 
-#ifndef CONFIG_BT_HCIBFUSB_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "1.2"
 
 static struct usb_driver bfusb_driver;
@@ -221,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", bfusb, urb);
+       BT_DBG("bfusb %p urb %p", data, urb);
 
        if (!urb && !(urb = usb_alloc_urb(0, GFP_ATOMIC)))
                return -ENOMEM;
@@ -354,7 +349,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", bfusb, urb, skb, skb->len);
+       BT_DBG("bfusb %p urb %p skb %p len %d", data, urb, skb, skb->len);
 
        read_lock(&data->lock);
 
@@ -691,7 +686,7 @@ static int bfusb_probe(struct usb_interface *intf, const struct usb_device_id *i
                goto error;
        }
 
-       BT_DBG("firmware data %p size %d", firmware->data, firmware->size);
+       BT_DBG("firmware data %p size %zu", firmware->data, firmware->size);
 
        if (bfusb_load_firmware(data, firmware->data, firmware->size) < 0) {
                BT_ERR("Firmware loading failed");
index 4f0a57236d23d16264ecbfe85c2cd97e3742e2c3..c115285867c3010495b74da4b7eccfd910e518cb 100644 (file)
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 
-#ifndef CONFIG_BT_HCIBPA10X_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "0.10"
 
 static struct usb_device_id bpa10x_table[] = {
index f2ada0c6548622d1be2c6c6cc5746fc601e127b8..7e298275c8f663b45fc04f57e5499c9f372b62d5 100644 (file)
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 
-#ifndef CONFIG_BT_HCIBTSDIO_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "0.1"
 
 static const struct sdio_device_id btsdio_table[] = {
index 7f7526c186d07cb0f884b8c618fbc488520e64bb..b5fbda6d490a4a142e5a11936b3e14260a09d3de 100644 (file)
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 
-//#define CONFIG_BT_HCIBTUSB_DEBUG
-#ifndef CONFIG_BT_HCIBTUSB_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "0.4"
 
 static int ignore_dga;
index 7938062c1cc7a13daf1306baa659c6cf477782be..894b2cb11ea6caf808ff55b6c3135d42e9ad33b5 100644 (file)
 
 #include "hci_uart.h"
 
-#ifndef CONFIG_BT_HCIUART_DEBUG
-#undef  BT_DBG
-#define BT_DBG( A... )
-#endif
-
 #define VERSION "0.3"
 
 static int txcrc = 1;
index bfbae14cf93d0fe388fc879ff5ca5ed69b99a5f9..b0fafb0559964762ee7db79a32dd336d34e2017b 100644 (file)
 
 #include "hci_uart.h"
 
-#ifndef CONFIG_BT_HCIUART_DEBUG
-#undef  BT_DBG
-#define BT_DBG( A... )
-#endif
-
 #define VERSION "1.2"
 
 struct h4_struct {
index cb46bf52a19ac6476cb476b8514b9dfa5750500e..af761dc434f638e9ab869a8e8d8508a98adbd175 100644 (file)
 
 #include "hci_uart.h"
 
-#ifndef CONFIG_BT_HCIUART_DEBUG
-#undef  BT_DBG
-#define BT_DBG( A... )
-#endif
-
 #define VERSION "2.2"
 
 static int reset = 0;
index 2d2f66e17fea65c6baed390a4129639fc0e0e7f2..b91d45a41b2f6b7e88716626b392a33124b789d8 100644 (file)
 
 #include "hci_uart.h"
 
-#ifndef CONFIG_BT_HCIUART_DEBUG
-#undef  BT_DBG
-#define BT_DBG( A... )
-#endif
-
 /* HCILL commands */
 #define HCILL_GO_TO_SLEEP_IND  0x30
 #define HCILL_GO_TO_SLEEP_ACK  0x31
index 7320a71b63685403c9972766c4eb716ba9b05791..0bbefba6469cee659e7b114e961a677e3fa65fa0 100644 (file)
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 
-#ifndef CONFIG_BT_HCIVHCI_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "1.2"
 
 static int minor = MISC_DYNAMIC_MINOR;
index 996d12df75940f1ac722b52d764e5cd6c6d9a4c5..a04f8463ac7eec813cba0f9dfcb23e0e484036a5 100644 (file)
@@ -54,8 +54,8 @@
 #define SOL_RFCOMM     18
 
 #define BT_INFO(fmt, arg...) printk(KERN_INFO "Bluetooth: " fmt "\n" , ## arg)
-#define BT_DBG(fmt, arg...)  printk(KERN_INFO "%s: " fmt "\n" , __func__ , ## arg)
-#define BT_ERR(fmt, arg...)  printk(KERN_ERR  "%s: " fmt "\n" , __func__ , ## arg)
+#define BT_ERR(fmt, arg...)  printk(KERN_ERR "%s: " fmt "\n" , __func__ , ## arg)
+#define BT_DBG(fmt, arg...)  pr_debug("%s: " fmt "\n" , __func__ , ## arg)
 
 /* Connection and socket states */
 enum {
index f6f216e57aa39460443d13e394f750ee7023bf98..744ed3f07ef38374f6c1b0480d56954d4cf77eac 100644 (file)
 
 #include <net/bluetooth/bluetooth.h>
 
-#ifndef CONFIG_BT_SOCK_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "2.14"
 
 /* Bluetooth sockets */
@@ -245,7 +240,7 @@ int bt_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
        size_t copied;
        int err;
 
-       BT_DBG("sock %p sk %p len %d", sock, sk, len);
+       BT_DBG("sock %p sk %p len %zu", sock, sk, len);
 
        if (flags & (MSG_OOB))
                return -EOPNOTSUPP;
index b69bf4e7c48b8f8ab9d874ba691d6f21397f531e..d20f8a40f36e735ff6073b680e2b41793168386e 100644 (file)
@@ -161,7 +161,7 @@ struct bnep_session {
        struct msghdr msg;
 
        struct bnep_proto_filter proto_filter[BNEP_MAX_PROTO_FILTERS];
-       u64    mc_filter;
+       unsigned long long mc_filter;
 
        struct socket    *sock;
        struct net_device *dev;
index f8efaf35293c6a7e2808c0e9db91314a7bb851f8..70fea8bdb4e51d7d20b616a91a9753e93317433f 100644 (file)
 
 #include "bnep.h"
 
-#ifndef CONFIG_BT_BNEP_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "1.3"
 
 static int compress_src = 1;
index 47e179f62e820a72d28e5539da96ad55210f9346..f897da6e044490e58904256ba67b07f246094b7f 100644 (file)
 
 #include "bnep.h"
 
-#ifndef CONFIG_BT_BNEP_DEBUG
-#undef  BT_DBG
-#define BT_DBG( A... )
-#endif
-
 #define BNEP_TX_QUEUE_LEN 20
 
 static int bnep_net_open(struct net_device *dev)
index 8ffb57f2303a5124d93d405c083b32b419bd7ecb..e857628b0b27e61234102dc843ab0cc84a5f5c42 100644 (file)
 
 #include "bnep.h"
 
-#ifndef CONFIG_BT_BNEP_DEBUG
-#undef  BT_DBG
-#define BT_DBG( A... )
-#endif
-
 static int bnep_sock_release(struct socket *sock)
 {
        struct sock *sk = sock->sk;
index 3e9d5bb3fefb6de364353c62684efd5b7629e9d4..78958c0f9a40a8e7e04e15c41074c1e47e959398 100644 (file)
 
 #include "cmtp.h"
 
-#ifndef CONFIG_BT_CMTP_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define CAPI_INTEROPERABILITY          0x20
 
 #define CAPI_INTEROPERABILITY_REQ      CAPICMD(CAPI_INTEROPERABILITY, CAPI_REQ)
index ca60a4517fd34c86061f99a7a6bde51cfef35b44..c9cac7719efe757ddcbd5567f1d464ee4cf12f47 100644 (file)
 
 #include "cmtp.h"
 
-#ifndef CONFIG_BT_CMTP_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "1.0"
 
 static DECLARE_RWSEM(cmtp_session_sem);
index 8c7f7bc4e0bacbbed7ef05daae6aacb0af34a8e3..16b0fad74f6e82d6a9ec0f5c98725a50fd89757a 100644 (file)
 
 #include "cmtp.h"
 
-#ifndef CONFIG_BT_CMTP_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 static int cmtp_sock_release(struct socket *sock)
 {
        struct sock *sk = sock->sk;
index b7002429f1525311053f14171a1d94a25bf1ff04..a4a789f24c8d4668d7b54997654f8a516d62898a 100644 (file)
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 
-#ifndef CONFIG_BT_HCI_CORE_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 void hci_acl_connect(struct hci_conn *conn)
 {
        struct hci_dev *hdev = conn->hdev;
index fa7c5370b556619b33dcd0a13e5499bcf459e14c..ba78cc1eb8d9aaa8973c3a2395af86a98e71d4d6 100644 (file)
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 
-#ifndef CONFIG_BT_HCI_CORE_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 static void hci_cmd_task(unsigned long arg);
 static void hci_rx_task(unsigned long arg);
 static void hci_tx_task(unsigned long arg);
@@ -290,7 +285,7 @@ static void hci_linkpol_req(struct hci_dev *hdev, unsigned long opt)
 {
        __le16 policy = cpu_to_le16(opt);
 
-       BT_DBG("%s %x", hdev->name, opt);
+       BT_DBG("%s %x", hdev->name, policy);
 
        /* Default link policy */
        hci_send_cmd(hdev, HCI_OP_WRITE_DEF_LINK_POLICY, 2, &policy);
index ad7a553d77131c469bf4c9ebc3bc8bbfe84d1a33..f91ba690f5d29cfc932deb3cf0ae810ce6993ae5 100644 (file)
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 
-#ifndef CONFIG_BT_HCI_CORE_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 /* Handle HCI Event packets */
 
 static void hci_cc_inquiry_cancel(struct hci_dev *hdev, struct sk_buff *skb)
index d62579b67959cd935f1f20c8c128dcabd9436f37..4f9621f759a010d7e2403660103a780341f77e14 100644 (file)
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 
-#ifndef CONFIG_BT_HCI_SOCK_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 /* ----- HCI socket interface ----- */
 
 static inline int hci_test_bit(int nr, void *addr)
index f2bbb2f654349445a13bc03a57cf48acd2c31ed9..6490bf8402f367493ff50178601907ab0326ff06 100644 (file)
@@ -6,11 +6,6 @@
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 
-#ifndef CONFIG_BT_HCI_CORE_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 struct class *bt_class = NULL;
 EXPORT_SYMBOL_GPL(bt_class);
 
index acdeab3d980707fbd7740344abd4f7ffe335c75d..b18676870d5500e0fff1ece30654b060f373db2d 100644 (file)
 
 #include "hidp.h"
 
-#ifndef CONFIG_BT_HIDP_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "1.2"
 
 static DECLARE_RWSEM(hidp_session_sem);
index f4dd02ca9a96d9acd1c73872aac795b6de68575b..37c9d7d2e688ba35279f310707597c04f26d96b9 100644 (file)
 
 #include "hidp.h"
 
-#ifndef CONFIG_BT_HIDP_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 static int hidp_sock_release(struct socket *sock)
 {
        struct sock *sk = sock->sk;
index 9610a9c85b9896e69cd6c62712cb5f8376a33040..b93748e224ff1505bd0f8c2448f1070f3854a796 100644 (file)
 #include <net/bluetooth/hci_core.h>
 #include <net/bluetooth/l2cap.h>
 
-#ifndef CONFIG_BT_L2CAP_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "2.11"
 
 static u32 l2cap_feat_mask = 0x0000;
index ba537fae0a4ca653b4a7eedb7b941deb8aef613b..37c640d1c3fd9d103a86f0445d40d0b220a833a2 100644 (file)
 #include <net/bluetooth/l2cap.h>
 #include <net/bluetooth/rfcomm.h>
 
-#ifndef CONFIG_BT_RFCOMM_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "1.10"
 
 static int disable_cfc = 0;
index bc0d4a7ce6aea91346829d91d06d61f83baf302d..ad00cbf449cb609f3c61cef9a94accae81454d2f 100644 (file)
 #include <net/bluetooth/l2cap.h>
 #include <net/bluetooth/rfcomm.h>
 
-#ifndef CONFIG_BT_RFCOMM_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 static const struct proto_ops rfcomm_sock_ops;
 
 static struct bt_sock_list rfcomm_sk_list = {
@@ -644,7 +639,7 @@ static int rfcomm_sock_recvmsg(struct kiocb *iocb, struct socket *sock,
 
        msg->msg_namelen = 0;
 
-       BT_DBG("sk %p size %d", sk, size);
+       BT_DBG("sk %p size %zu", sk, size);
 
        lock_sock(sk);
 
index d3340dd52bcffd778f6604ed716cebf8f1577a42..1e4100bb0b65cc27414bc312ad9ec3ef52c6391f 100644 (file)
 #include <net/bluetooth/hci_core.h>
 #include <net/bluetooth/rfcomm.h>
 
-#ifndef CONFIG_BT_RFCOMM_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define RFCOMM_TTY_MAGIC 0x6d02                /* magic number for rfcomm struct */
 #define RFCOMM_TTY_PORTS RFCOMM_MAX_DEV        /* whole lotta rfcomm devices */
 #define RFCOMM_TTY_MAJOR 216           /* device node major id of the usb/bluetooth.c driver */
index 0cc91e6da76d7f9d16983985f176ab1d7319eaab..46fd8bf9a69056fcf69d2aa6d5f7617768bb8ef1 100644 (file)
 #include <net/bluetooth/hci_core.h>
 #include <net/bluetooth/sco.h>
 
-#ifndef CONFIG_BT_SCO_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "0.6"
 
 static int disable_esco = 0;