Skip to contentSkip to conversation

Bluetooth: hci_sync: Fix Opcode prints in bt_dev_dbg/err

PATCH Applied Marcel Ziswiler 3 participants 3 messages Oct 18, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: hci_sync: Fix Opcode prints in bt_dev_dbg/err

From: Marcel Ziswiler <[email protected]>

Printed Opcodes may be missing leading zeros:

	Bluetooth: hci0: Opcode 0x c03 failed: -110

Fix this by always printing leading zeros:

	Bluetooth: hci0: Opcode 0x0c03 failed: -110
Fixes d0b137062b2d ("Bluetooth: hci_sync: Rework init stages")
Fixes 6a98e3836fa2 ("Bluetooth: Add helper for serialized HCI command execution")

---

 net/bluetooth/hci_sync.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/bluetooth/hci_sync.c +2 -2
index d06e07a0ea5a..2c782b6a274d 100644
@@ -152,7 +152,7 @@ struct sk_buff *__hci_cmd_sync_sk(struct hci_dev *hdev, u16 opcode, u32 plen,
 	struct sk_buff *skb;
 	int err = 0;
 
-	bt_dev_dbg(hdev, "Opcode 0x%4x", opcode);
+	bt_dev_dbg(hdev, "Opcode 0x%4.4x", opcode);
 
 	hci_req_init(&req, hdev);
 
@@ -248,7 +248,7 @@ int __hci_cmd_sync_status_sk(struct hci_dev *hdev, u16 opcode, u32 plen,
 	skb = __hci_cmd_sync_sk(hdev, opcode, plen, param, event, timeout, sk);
 	if (IS_ERR(skb)) {
 		if (!event)
-			bt_dev_err(hdev, "Opcode 0x%4x failed: %ld", opcode,
+			bt_dev_err(hdev, "Opcode 0x%4.4x failed: %ld", opcode,
 				   PTR_ERR(skb));
 		return PTR_ERR(skb);
 	}
Signature · 1 line
2.36.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=794369

---Test result---

Test Summary:

CheckPatch                    PASS      0.84 seconds
GitLint                       FAIL      0.66 seconds
SubjectPrefix                 PASS      0.12 seconds
BuildKernel                   PASS      46.41 seconds
CheckAllWarning               PASS      49.87 seconds
CheckSparse                   PASS      57.26 seconds
CheckSmatch                   PASS      151.64 seconds
BuildKernel32                 PASS      44.24 seconds
TestRunnerSetup               PASS      690.70 seconds
TestRunner_l2cap-tester       PASS      39.70 seconds
TestRunner_iso-tester         PASS      91.10 seconds
TestRunner_bnep-tester        PASS      14.13 seconds
TestRunner_mgmt-tester        PASS      282.73 seconds
TestRunner_rfcomm-tester      PASS      21.92 seconds
TestRunner_sco-tester         PASS      24.93 seconds
TestRunner_ioctl-tester       PASS      24.92 seconds
TestRunner_mesh-tester        PASS      18.06 seconds
TestRunner_smp-tester         PASS      19.46 seconds
TestRunner_userchan-tester    PASS      15.73 seconds
IncrementalBuild              PASS      42.57 seconds

Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
Bluetooth: hci_sync: Fix Opcode prints in bt_dev_dbg/err

WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
7: B3 Line contains hard tab characters (\t): " Bluetooth: hci0: Opcode 0x c03 failed: -110"
11: B3 Line contains hard tab characters (\t): " Bluetooth: hci0: Opcode 0x0c03 failed: -110"

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Marcel Ziswiler
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 9 lines · On Wed, 18 Oct 2023 16:47:35 +0200 you wrote:

From: Marcel Ziswiler <[email protected]>

Printed Opcodes may be missing leading zeros:

	Bluetooth: hci0: Opcode 0x c03 failed: -110

Fix this by always printing leading zeros:

[...]

Here is the summary with links:
- Bluetooth: hci_sync: Fix Opcode prints in bt_dev_dbg/err

    https://git.kernel.org/bluetooth/bluetooth-next/c/8a589c6d138e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html