Linux USB
 help / color / mirror / Atom feed
From: Martin Rys <martin@archlinux.org>
To: linux-usb@vger.kernel.org
Subject: [PATCH v2] USB: Improve "New device found" printout message
Date: Sat, 29 Aug 2026 20:38:04 +0200	[thread overview]
Message-ID: <6323ed34-7954-4f0b-b6c5-8e1b1ffc1648@archlinux.org> (raw)

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

             reply	other threads:[~2026-08-29 18:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-29 18:38 Martin Rys [this message]
2026-08-30  6:21 ` [PATCH v2] USB: Improve "New device found" printout message Greg KH
2026-08-30  7:56   ` Martin Rys
2026-08-30  8:14     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6323ed34-7954-4f0b-b6c5-8e1b1ffc1648@archlinux.org \
    --to=martin@archlinux.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox