All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Bluetooth: hci_sync: Fix opcode format in debug message
@ 2022-08-03  9:49 Ismael Luceno
  2022-08-03 11:07 ` [v2] " bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Ismael Luceno @ 2022-08-03  9:49 UTC (permalink / raw)
  To: linux-kernel, linux-bluetooth
  Cc: Ismael Luceno, Johan Hedberg, Luiz Augusto von Dentz,
	Marcel Holtmann

Pad with zeros instead of spaces. Before:

        Bluetooth: hci1: Opcode 0x c01 failed: -110

After:

        Bluetooth: hci1: Opcode 0x0c01 failed: -110

Signed-off-by: Ismael Luceno <ismael@iodev.co.uk>
---

Changes since v1:
* Fixed another message
* Added description

 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 c17021642234..e5ad6607470e 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -150,7 +150,7 @@
 	struct sk_buff *skb;
 	int err = 0;
 
-	bt_dev_dbg(hdev, "Opcode 0x%4x", opcode);
+	bt_dev_dbg(hdev, "Opcode 0x%04x", opcode);
 
 	hci_req_init(&req, hdev);
 
@@ -245,7 +245,7 @@ EXPORT_SYMBOL(__hci_cmd_sync_ev);
 
 	skb = __hci_cmd_sync_sk(hdev, opcode, plen, param, event, timeout, sk);
 	if (IS_ERR(skb)) {
-		bt_dev_err(hdev, "Opcode 0x%4x failed: %ld", opcode,
+		bt_dev_err(hdev, "Opcode 0x%04x failed: %ld", opcode,
 			   PTR_ERR(skb));
 		return PTR_ERR(skb);
 	}
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-03 11:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-03  9:49 [PATCH v2] Bluetooth: hci_sync: Fix opcode format in debug message Ismael Luceno
2022-08-03 11:07 ` [v2] " bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.