diff mbox series

Bluetooth: hci_sync: Fix Opcode prints in bt_dev_dbg/err

Message ID 20231018144735.33085-1-marcel@ziswiler.com (mailing list archive)
State Accepted
Commit 8a589c6d138e0f9d63d3adc49b8f80fe059d8274
Headers show
Series Bluetooth: hci_sync: Fix Opcode prints in bt_dev_dbg/err | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint fail 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"
tedd_an/SubjectPrefix success Gitlint PASS
tedd_an/BuildKernel success BuildKernel PASS
tedd_an/CheckAllWarning success CheckAllWarning PASS
tedd_an/CheckSparse success CheckSparse PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/BuildKernel32 success BuildKernel32 PASS
tedd_an/TestRunnerSetup success TestRunnerSetup PASS
tedd_an/TestRunner_l2cap-tester success TestRunner PASS
tedd_an/TestRunner_iso-tester success TestRunner PASS
tedd_an/TestRunner_bnep-tester success TestRunner PASS
tedd_an/TestRunner_mgmt-tester success TestRunner PASS
tedd_an/TestRunner_rfcomm-tester success TestRunner PASS
tedd_an/TestRunner_sco-tester success TestRunner PASS
tedd_an/TestRunner_ioctl-tester success TestRunner PASS
tedd_an/TestRunner_mesh-tester success TestRunner PASS
tedd_an/TestRunner_smp-tester success TestRunner PASS
tedd_an/TestRunner_userchan-tester success TestRunner PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

Marcel Ziswiler Oct. 18, 2023, 2:47 p.m. UTC
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

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")

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

 net/bluetooth/hci_sync.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

bluez.test.bot@gmail.com Oct. 18, 2023, 3:45 p.m. UTC | #1
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
patchwork-bot+bluetooth@kernel.org Oct. 18, 2023, 8:30 p.m. UTC | #2
Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 18 Oct 2023 16:47:35 +0200 you wrote:
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
> 
> 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!
diff mbox series

Patch

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index d06e07a0ea5a..2c782b6a274d 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -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);
 	}