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 8/8] Bluetooth: Add function and line information to bt_dbg
Date: Mon, 18 Aug 2025 16:47:53 -0400	[thread overview]
Message-ID: <20250818204753.1203949-8-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>

When enabling debug via CONFIG_BT_FEATURE_DEBUG include function and
line information by default otherwise it is hard to make any sense of
which function the logs comes from.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 include/net/bluetooth/bluetooth.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index e5751f3070b8..d46ed9011ee5 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -272,7 +272,8 @@ void bt_err_ratelimited(const char *fmt, ...);
 #define BT_ERR(fmt, ...)	bt_err(fmt "\n", ##__VA_ARGS__)
 
 #if IS_ENABLED(CONFIG_BT_FEATURE_DEBUG)
-#define BT_DBG(fmt, ...)	bt_dbg(fmt "\n", ##__VA_ARGS__)
+#define BT_DBG(fmt, ...) \
+	bt_dbg("%s:%d: " fmt "\n", __func__, __LINE__, ##__VA_ARGS__)
 #else
 #define BT_DBG(fmt, ...)	pr_debug(fmt "\n", ##__VA_ARGS__)
 #endif
-- 
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 ` [PATCH v2 4/8] Bluetooth: hci_sock: " Luiz Augusto von Dentz
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 ` Luiz Augusto von Dentz [this message]
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-8-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.