Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: Add function and line information to bt_dbg

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>

+2 -1
+2 -1
include/net/bluetooth/bluetooth.h
··· 272 272 #define BT_ERR(fmt, ...) bt_err(fmt "\n", ##__VA_ARGS__) 273 273 274 274 #if IS_ENABLED(CONFIG_BT_FEATURE_DEBUG) 275 - #define BT_DBG(fmt, ...) bt_dbg(fmt "\n", ##__VA_ARGS__) 275 + #define BT_DBG(fmt, ...) \ 276 + bt_dbg("%s:%d: " fmt "\n", __func__, __LINE__, ##__VA_ARGS__) 276 277 #else 277 278 #define BT_DBG(fmt, ...) pr_debug(fmt "\n", ##__VA_ARGS__) 278 279 #endif