Bluetooth: Enable per-module dynamic debug messages
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>
This commit is contained in:
@@ -41,11 +41,6 @@
|
||||
|
||||
#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;
|
||||
|
@@ -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;
|
||||
|
@@ -52,11 +52,6 @@
|
||||
|
||||
#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;
|
||||
|
@@ -41,11 +41,6 @@
|
||||
|
||||
#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)
|
||||
|
@@ -46,11 +46,6 @@
|
||||
|
||||
#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;
|
||||
|
@@ -42,11 +42,6 @@
|
||||
|
||||
#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)
|
||||
|
@@ -44,11 +44,6 @@
|
||||
|
||||
#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);
|
||||
|
@@ -43,11 +43,6 @@
|
||||
|
||||
#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;
|
||||
|
@@ -45,11 +45,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
|
||||
|
||||
void hci_acl_connect(struct hci_conn *conn)
|
||||
{
|
||||
struct hci_dev *hdev = conn->hdev;
|
||||
|
@@ -48,11 +48,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
|
||||
|
||||
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);
|
||||
|
@@ -45,11 +45,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
|
||||
|
||||
/* Handle HCI Event packets */
|
||||
|
||||
static void hci_cc_inquiry_cancel(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
|
@@ -49,11 +49,6 @@
|
||||
#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)
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -47,11 +47,6 @@
|
||||
|
||||
#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);
|
||||
|
@@ -39,11 +39,6 @@
|
||||
|
||||
#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;
|
||||
|
@@ -50,11 +50,6 @@
|
||||
#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;
|
||||
|
@@ -46,11 +46,6 @@
|
||||
#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;
|
||||
|
@@ -50,11 +50,6 @@
|
||||
#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);
|
||||
|
||||
|
@@ -39,11 +39,6 @@
|
||||
#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 */
|
||||
|
@@ -48,11 +48,6 @@
|
||||
#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;
|
||||
|
Reference in New Issue
Block a user