Skip to content

Commit 5308868

Browse files
ziswilerVudentz
authored andcommitted
Bluetooth: hci_sync: Fix Opcode prints in bt_dev_dbg/err
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: d0b1370 ("Bluetooth: hci_sync: Rework init stages") Fixes: 6a98e38 ("Bluetooth: Add helper for serialized HCI command execution") Signed-off-by: Marcel Ziswiler <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent a85fb91 commit 5308868

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/bluetooth/hci_sync.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ struct sk_buff *__hci_cmd_sync_sk(struct hci_dev *hdev, u16 opcode, u32 plen,
152152
struct sk_buff *skb;
153153
int err = 0;
154154

155-
bt_dev_dbg(hdev, "Opcode 0x%4x", opcode);
155+
bt_dev_dbg(hdev, "Opcode 0x%4.4x", opcode);
156156

157157
hci_req_init(&req, hdev);
158158

@@ -248,7 +248,7 @@ int __hci_cmd_sync_status_sk(struct hci_dev *hdev, u16 opcode, u32 plen,
248248
skb = __hci_cmd_sync_sk(hdev, opcode, plen, param, event, timeout, sk);
249249
if (IS_ERR(skb)) {
250250
if (!event)
251-
bt_dev_err(hdev, "Opcode 0x%4x failed: %ld", opcode,
251+
bt_dev_err(hdev, "Opcode 0x%4.4x failed: %ld", opcode,
252252
PTR_ERR(skb));
253253
return PTR_ERR(skb);
254254
}

0 commit comments

Comments
 (0)