]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Bluetooth: Add function and line information to bt_dbg
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 18 Aug 2025 20:43:53 +0000 (16:43 -0400)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Sat, 27 Sep 2025 15:37:01 +0000 (11:37 -0400)
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

index e5751f3070b8e34fc0bd8ea7a0d9fe134c29e5f4..d46ed9011ee5d0decba05f324b94609ce6c8a805 100644 (file)
@@ -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