All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC BlueZ] adapter: Introduce BTD_ADAPTER_DBG
@ 2022-03-23 22:39 Luiz Augusto von Dentz
  2022-03-23 22:39 ` [PATCH BlueZ v4 1/9] log: Don't log __FILE__ and __func__ with DBG_IDX Luiz Augusto von Dentz
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Luiz Augusto von Dentz @ 2022-03-23 22:39 UTC (permalink / raw)
  To: linux-bluetooth

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

This introduces BTD_ADAPTER_DBG which includes the controller index
when using DBG_IDX, in addition to it also add similar macro for
devices in the form of BTD_DEVICE_DBG which resolves the adapter and
before calling BTD_ADAPTER_DBG.
---
 src/adapter.h | 4 ++++
 src/device.h  | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/src/adapter.h b/src/adapter.h
index 35deb1d11..515be3210 100644
--- a/src/adapter.h
+++ b/src/adapter.h
@@ -23,6 +23,10 @@
 /* Invalid SSP passkey value used to indicate negative replies */
 #define INVALID_PASSKEY		0xffffffff
 
+#define BTD_ADAPTER_DBG(adapter, fmt, arg...) \
+	DBG_IDX(btd_adapter_get_index(adapter), "%s:%s() " fmt, __FILE__, \
+							__func__ , ## arg)
+
 struct btd_adapter;
 struct btd_device;
 struct queue;
diff --git a/src/device.h b/src/device.h
index 071576d6b..4d40d1d22 100644
--- a/src/device.h
+++ b/src/device.h
@@ -11,6 +11,10 @@
 
 #define DEVICE_INTERFACE	"org.bluez.Device1"
 
+#define BTD_DEVICE_DBG(device, fmt, arg...) \
+	BTD_ADAPTER_DBG(device_get_adapter(device), "%s:%s() " fmt, __FILE__, \
+							__func__ , ## arg)
+
 struct btd_device;
 
 struct btd_device *device_create(struct btd_adapter *adapter,
-- 
2.35.1


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

end of thread, other threads:[~2022-03-25 15:04 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-23 22:39 [RFC BlueZ] adapter: Introduce BTD_ADAPTER_DBG Luiz Augusto von Dentz
2022-03-23 22:39 ` [PATCH BlueZ v4 1/9] log: Don't log __FILE__ and __func__ with DBG_IDX Luiz Augusto von Dentz
2022-03-23 23:39   ` [BlueZ,v4,1/9] " bluez.test.bot
2022-03-24 20:11     ` Luiz Augusto von Dentz
2022-03-24 19:50   ` [PATCH BlueZ v4 1/9] " patchwork-bot+bluetooth
2022-03-25 14:57   ` Marcel Holtmann
2022-03-23 22:39 ` [PATCH BlueZ v4 2/9] mgmt: Add DBG macro Luiz Augusto von Dentz
2022-03-23 22:39 ` [PATCH BlueZ v4 3/9] mgmt: Introduce mgmt_set_verbose Luiz Augusto von Dentz
2022-03-25 15:00   ` Marcel Holtmann
2022-03-23 22:39 ` [PATCH BlueZ v4 4/9] adapter: Don't use DBG in mgmt_debug Luiz Augusto von Dentz
2022-03-25 15:04   ` Marcel Holtmann
2022-03-23 22:39 ` [PATCH BlueZ v4 5/9] att: Log file and function names Luiz Augusto von Dentz
2022-03-23 22:40 ` [PATCH BlueZ v4 6/9] gatt-client: Add DBG macro Luiz Augusto von Dentz
2022-03-23 22:40 ` [PATCH BlueZ v4 7/9] gatt-server: " Luiz Augusto von Dentz
2022-03-23 22:40 ` [PATCH BlueZ v4 8/9] att: Rename att_debug and att_verbose to DBG and VERBOSE Luiz Augusto von Dentz
2022-03-23 22:40 ` [PATCH BlueZ v4 9/9] device: Don't use DBG in gatt_debug Luiz Augusto von Dentz
2022-03-24  2:49 ` [RFC,BlueZ] adapter: Introduce BTD_ADAPTER_DBG bluez.test.bot
2022-03-24 19:50 ` [RFC BlueZ] " 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.