All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH v2 4/8] Bluetooth: hci_sock: Convert instances of BT_DBG to bt_dev_dbg
Date: Mon, 18 Aug 2025 16:47:49 -0400	[thread overview]
Message-ID: <20250818204753.1203949-4-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20250818204753.1203949-1-luiz.dentz@gmail.com>

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

This converts instances of BT_DBG to bt_dev_dbg when logging to a
specific hci_dev this is preferable since it does prints the name by
default.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 net/bluetooth/hci_sock.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index fc866759910d..486ca9254688 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -205,7 +205,7 @@ void hci_send_to_sock(struct hci_dev *hdev, struct sk_buff *skb)
 	struct sock *sk;
 	struct sk_buff *skb_copy = NULL;
 
-	BT_DBG("hdev %p len %d", hdev, skb->len);
+	bt_dev_dbg(hdev, "skb %p len %d", skb, skb->len);
 
 	read_lock(&hci_sk_list.lock);
 
@@ -365,7 +365,7 @@ void hci_send_to_monitor(struct hci_dev *hdev, struct sk_buff *skb)
 	if (!atomic_read(&monitor_promisc))
 		return;
 
-	BT_DBG("hdev %p len %d", hdev, skb->len);
+	bt_dev_dbg(hdev, "skb %p len %d", skb, skb->len);
 
 	switch (hci_skb_pkt_type(skb)) {
 	case HCI_COMMAND_PKT:
@@ -810,7 +810,7 @@ static void hci_si_event(struct hci_dev *hdev, int type, int dlen, void *data)
 
 void hci_sock_dev_event(struct hci_dev *hdev, int event)
 {
-	BT_DBG("hdev %s event %d", hdev->name, event);
+	bt_dev_dbg(hdev, "event %d", event);
 
 	if (atomic_read(&monitor_promisc)) {
 		struct sk_buff *skb;
@@ -1625,7 +1625,7 @@ static int hci_mgmt_cmd(struct hci_mgmt_chan *chan, struct sock *sk,
 	bool var_len, no_hdev;
 	int err;
 
-	BT_DBG("got %d bytes", skb->len);
+	BT_DBG("sk %p skb %p len %u", sk, skb, skb->len);
 
 	if (skb->len < sizeof(*hdr))
 		return -EINVAL;
@@ -1655,7 +1655,7 @@ static int hci_mgmt_cmd(struct hci_mgmt_chan *chan, struct sock *sk,
 
 	if (opcode >= chan->handler_count ||
 	    chan->handlers[opcode].func == NULL) {
-		BT_DBG("Unknown op %u", opcode);
+		bt_dev_dbg(hdev, "Unknown op %u", opcode);
 		err = mgmt_cmd_status(sk, index, opcode,
 				      MGMT_STATUS_UNKNOWN_COMMAND);
 		goto done;
@@ -2200,7 +2200,7 @@ static int hci_sock_create(struct net *net, struct socket *sock, int protocol,
 {
 	struct sock *sk;
 
-	BT_DBG("sock %p", sock);
+	BT_DBG("sock %p protocol %d kern %d", sock, protocol, kern);
 
 	if (sock->type != SOCK_RAW)
 		return -ESOCKTNOSUPPORT;
-- 
2.50.1


  parent reply	other threads:[~2025-08-18 20:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18 20:47 [PATCH v2 1/8] Bluetooth: hci_core: Convert instances of BT_DBG to bt_dev_dbg Luiz Augusto von Dentz
2025-08-18 20:47 ` [PATCH v2 2/8] Bluetooth: hci_conn: " Luiz Augusto von Dentz
2025-08-18 20:57   ` Paul Menzel
2025-08-18 20:47 ` [PATCH v2 3/8] Bluetooth: hci_event: " Luiz Augusto von Dentz
2025-08-18 20:47 ` Luiz Augusto von Dentz [this message]
2025-08-18 20:47 ` [PATCH v2 5/8] Bluetooth: hci_sync: " Luiz Augusto von Dentz
2025-08-18 20:47 ` [PATCH v2 6/8] Bluetooth: hci: Add hci_conn_set_state Luiz Augusto von Dentz
2025-08-18 20:47 ` [PATCH v2 7/8] Bluetooth: hci_conn: Add bt_conn_dbg Luiz Augusto von Dentz
2025-08-18 20:47 ` [PATCH v2 8/8] Bluetooth: Add function and line information to bt_dbg Luiz Augusto von Dentz
2025-08-18 20:56 ` [PATCH v2 1/8] Bluetooth: hci_core: Convert instances of BT_DBG to bt_dev_dbg Paul Menzel
2025-08-18 21:34 ` [v2,1/8] " bluez.test.bot
2025-08-27 19:10 ` [PATCH v2 1/8] " patchwork-bot+bluetooth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250818204753.1203949-4-luiz.dentz@gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.