[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20231018144735.33085-1-marcel@ziswiler.com>
Date: Wed, 18 Oct 2023 16:47:35 +0200
From: Marcel Ziswiler <marcel@...wiler.com>
To: linux-bluetooth@...r.kernel.org
Cc: Marcel Holtmann <marcel@...tmann.org>,
Luiz Augusto von Dentz <luiz.dentz@...il.com>,
linux-kernel@...r.kernel.org,
Johan Hedberg <johan.hedberg@...il.com>,
Marcel Ziswiler <marcel.ziswiler@...adex.com>
Subject: [PATCH] Bluetooth: hci_sync: Fix Opcode prints in bt_dev_dbg/err
From: Marcel Ziswiler <marcel.ziswiler@...adex.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@...adex.com>
---
net/bluetooth/hci_sync.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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);
}
--
2.36.1
Powered by blists - more mailing lists