Linux USB
 help / color / mirror / Atom feed
* [PATCH v2] USB: Improve "New device found" printout message
@ 2026-08-29 18:38 Martin Rys
  2026-08-30  6:21 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Rys @ 2026-08-29 18:38 UTC (permalink / raw)
  To: linux-usb

From c5b92273e0b7e2f095cab876603d37a1f4530175 Mon Sep 17 00:00:00 2001
From: Martin Rys <martin@archlinux.org>
Date: Sat, 29 Aug 2026 20:26:44 +0200
Subject: [PATCH v2] USB: Improve "New device found" printout message

Use a colon instead of a comma, like the debug message after this one does.

Do not print a space after `bcdDevice=` - this was introduced as the formatting was copied from `lsusb -v` printout, but lsusb output has preceding spaces, this message does not, so it ends up looking odd.

Previously the output ended up looking like `idProduct=a000, bcdDevice= 1.00` if the first hex character of bcdDevice was 0.

Signed-off-by: Martin Rys <martin@archlinux.org>
---
v1 -> v2: No code changes, only amended commit message and hopefully sending it proper now.

 drivers/usb/core/hub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 3345b3298daf..c382215a1177 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2411,7 +2411,7 @@ static void announce_device_ids(struct usb_device *udev)
 	u16 bcdDevice = le16_to_cpu(udev->descriptor.bcdDevice);

 	dev_info(&udev->dev,
-		"New USB device found, idVendor=%04x, idProduct=%04x, bcdDevice=%2x.%02x\n",
+		"New USB device found: idVendor=%04x, idProduct=%04x, bcdDevice=%x.%02x\n",
 		le16_to_cpu(udev->descriptor.idVendor),
 		le16_to_cpu(udev->descriptor.idProduct),
 		bcdDevice >> 8, bcdDevice & 0xff);
--
2.55.0

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

end of thread, other threads:[~2026-08-30  8:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-29 18:38 [PATCH v2] USB: Improve "New device found" printout message Martin Rys
2026-08-30  6:21 ` Greg KH
2026-08-30  7:56   ` Martin Rys
2026-08-30  8:14     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox