mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: core: log higher level message on malformed LANGID descriptor
@ 2014-09-25 13:56 Scot Doyle
  2014-09-25 14:30 ` Joe Perches
  0 siblings, 1 reply; 2+ messages in thread
From: Scot Doyle @ 2014-09-25 13:56 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Alan Stern, Sarah Sharp, Dan Williams
  Cc: Daniel Mack, linux-usb, linux-kernel

Commit 0cce2eda19923e5e5ccc8b042dec5af87b3ffad0
    USB: fix LANGID=0 regression

defaults to a langid of 0x0409 if it's not properly implemented by the
device. Explain with a higher level error message what this means.

Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
---
 drivers/usb/core/message.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 0c8a7fc..5317081 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -770,9 +770,7 @@ static int usb_get_langid(struct usb_device *dev, unsigned char *tbuf)
 		dev->string_langid = 0x0409;
 		dev->have_langid = 1;
 		dev_err(&dev->dev,
-			"string descriptor 0 malformed (err = %d), "
-			"defaulting to 0x%04x\n",
-				err, dev->string_langid);
+			"language id specifier not provided by device, defaulting to English");
 		return 0;
 	}

-- 
2.1.0


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

* Re: [PATCH] usb: core: log higher level message on malformed LANGID descriptor
  2014-09-25 13:56 [PATCH] usb: core: log higher level message on malformed LANGID descriptor Scot Doyle
@ 2014-09-25 14:30 ` Joe Perches
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2014-09-25 14:30 UTC (permalink / raw)
  To: Scot Doyle
  Cc: Greg Kroah-Hartman, Alan Stern, Sarah Sharp, Dan Williams,
	Daniel Mack, linux-usb, linux-kernel

On Thu, 2014-09-25 at 13:56 +0000, Scot Doyle wrote:
> Commit 0cce2eda19923e5e5ccc8b042dec5af87b3ffad0
>     USB: fix LANGID=0 regression

trivia:

> diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
[]
> @@ -770,9 +770,7 @@ static int usb_get_langid(struct usb_device *dev, unsigned char *tbuf)
>  		dev->string_langid = 0x0409;
>  		dev->have_langid = 1;
>  		dev_err(&dev->dev,
> -			"string descriptor 0 malformed (err = %d), "
> -			"defaulting to 0x%04x\n",
> -				err, dev->string_langid);
> +			"language id specifier not provided by device, defaulting to English");

missing '\n' format termination.




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

end of thread, other threads:[~2014-09-25 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-25 13:56 [PATCH] usb: core: log higher level message on malformed LANGID descriptor Scot Doyle
2014-09-25 14:30 ` Joe Perches

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

all inboxes | Powered by JetHome®