Skip to contentSkip to conversation

adapter: Introduce BTD_ADAPTER_DBG

RFC In review Luiz Augusto von Dentz 2 participants 2 messages Mar 23, 2022 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

RFC 1/1 adapter: Introduce BTD_ADAPTER_DBG

From: Luiz Augusto von Dentz <[email protected]>

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(+)
src/adapter.h +4 -0
index 35deb1d11..515be3210 100644
@@ -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;
src/device.h +4 -0
index 071576d6b..4d40d1d22 100644
@@ -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,
Signature · 1 line
2.35.1
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=625859

---Test result---

Test Summary:

CheckPatch                    FAIL      0.69 seconds
GitLint                       PASS      0.46 seconds
Prep - Setup ELL              PASS      49.83 seconds
Build - Prep                  PASS      0.62 seconds
Build - Configure             PASS      9.65 seconds
Build - Make                  PASS      1651.60 seconds
Make Check                    PASS      13.21 seconds
Make Check w/Valgrind         PASS      525.62 seconds
Make Distcheck                PASS      270.47 seconds
Build w/ext ELL - Configure   PASS      9.85 seconds
Build w/ext ELL - Make        PASS      1716.04 seconds
Incremental Build with patchesPASS      0.00 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script with rule in .checkpatch.conf Output:
[RFC,BlueZ] adapter: Introduce BTD_ADAPTER_DBG ERROR:SPACING: space prohibited before that ',' (ctx:WxW) #99: FILE: src/adapter.h:28:
+ __func__ , ## arg)
^

ERROR:SPACING: space prohibited before that ',' (ctx:WxW) #114: FILE: src/device.h:16:
+ __func__ , ## arg)
^

/github/workspace/src/12790144.patch total: 2 errors, 0 warnings, 20 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/12790144.patch has style problems, please review.

NOTE: Ignored message types: COMMIT_MESSAGE COMPLEX_MACRO CONST_STRUCT FILE_PATH_CHANGES MISSING_SIGN_OFF PREFER_PACKED SPDX_LICENSE_TAG SPLIT_STRING SSCANF_TO_KSTRTO

NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.

---
Regards,
Linux Bluetooth