From: Greg KH <greg@kroah.com>
To: Martin Rys <martin@archlinux.org>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] USB: Improve "New device found" printout message
Date: Fri, 28 Aug 2026 07:43:31 +0200 [thread overview]
Message-ID: <2026082855-repave-condition-9f2c@gregkh> (raw)
In-Reply-To: <c9fb1eaa-9c88-4942-b6c5-9f7efbe1a133@archlinux.org>
On Thu, Aug 27, 2026 at 05:38:35PM +0200, Martin Rys wrote:
> Hi,
>
> it's my first time posting on any Linux mailing list, hopefully am doing
> everything right.
>
> While checking out dmesg I saw that there's an extra space after
> "bcdDevice=":
> usb 1-5.2: New USB device found, idVendor=0583, idProduct=a000,
> bcdDevice= 1.00
> usb 1-5.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
>
> Turns out that was introduced in
> https://github.com/torvalds/linux/commit/73c6d3b284cf7b31c03fdaa2476f48f8da0932f8
> (USB: announce bcdDevice as well as idVendor, idProduct.), as it was
> trying to keep the same formatting as `lsusb -v`:
>
> idProduct 0x0276 GXT 165 Gaming Mouse
> bcdDevice 1.00
> iManufacturer 1 SINOWEALTH
>
> but lsusb presumably uses %2x to have a fixed-width text, so the number
> of spacing it needs to do so it all lines up under a monospace font is
> predictable.
>
> In dmesg, it just causes it to look odd if there's no character in the
> first hex slot, as "12.00" looks fine, but " 1.00" does not.
>
> While staring at this I've also noticed that there's a comma instead of
> a colon after the first message, so I've fixed that up too.
Cool, but this all doesn't belong here, the patch changelog should
contain enough information for us to understand this.
>
> Martin
>
>
>
> >From a0bc389b6bf4641fbd894f8acd4c1c5709728862 Mon Sep 17 00:00:00 2001
> From: Martin Rys <martin@archlinux.org>
> Date: Thu, 27 Aug 2026 17:05:45 +0200
> Subject: [PATCH] USB: Improve "New device found" printout message
The patch shouldn't be part of the middle of the email, just send it on
it's own. See lots of examples on the mailing list for how that looks.
>
> Use colon instead of comma like the later message does.
>
> Do not print a useless space after `bcdDevice=` - this was introduced as
> the formatting was copied from `lsusb -v` printout, but that one has
> preceding spaces, this one does not.
>
> Signed-off-by: Martin Rys <martin@archlinux.org>
> ---
> 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
The patch is line-wrapped and whitespace damaged and can't be applied.
Perhaps use a tool like git send-email or b4 to send it?
thanks,
greg k-h
next prev parent reply other threads:[~2026-08-28 5:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 15:38 [PATCH] USB: Improve "New device found" printout message Martin Rys
2026-08-28 5:43 ` Greg KH [this message]
2026-08-29 18:46 ` Martin Rys
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=2026082855-repave-condition-9f2c@gregkh \
--to=greg@kroah.com \
--cc=linux-usb@vger.kernel.org \
--cc=martin@archlinux.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 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.