All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/3] Bluetooth: Add function and line information to bt_dbg
@ 2025-08-27 16:05 Luiz Augusto von Dentz
  2025-08-27 16:05 ` [PATCH v1 2/3] Bluetooth: hci_core: Print number of packets in conn->data_q Luiz Augusto von Dentz
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Luiz Augusto von Dentz @ 2025-08-27 16:05 UTC (permalink / raw)
  To: linux-bluetooth

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-08-27 19:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 16:05 [PATCH v1 1/3] Bluetooth: Add function and line information to bt_dbg Luiz Augusto von Dentz
2025-08-27 16:05 ` [PATCH v1 2/3] Bluetooth: hci_core: Print number of packets in conn->data_q Luiz Augusto von Dentz
2025-08-27 16:05 ` [PATCH v1 3/3] Bluetooth: hci_core: Print information of hcon on hci_low_sent Luiz Augusto von Dentz
2025-08-27 16:39 ` [v1,1/3] Bluetooth: Add function and line information to bt_dbg bluez.test.bot
2025-08-27 19:10 ` [PATCH v1 1/3] " patchwork-bot+bluetooth

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.