mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Scot Doyle <lkml14@scotdoyle.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	Sarah Sharp <sarah.a.sharp@linux.intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Daniel Mack <daniel@caiaq.de>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usb: core: downgrade log severity to info when descriptor unavailable
Date: Wed, 24 Sep 2014 17:56:52 +0000 (UTC)	[thread overview]
Message-ID: <alpine.DEB.2.11.1409241736520.2919@localhost.localdomain> (raw)
In-Reply-To: <20140924051851.GA6519@kroah.com>

On Tue, 23 Sep 2014, Greg Kroah-Hartman wrote:
> On Tue, Sep 23, 2014 at 07:12:40PM +0000, Scot Doyle wrote:
>> According to commit 0cce2eda19923e5e5ccc8b042dec5af87b3ffad0
>>     USB: fix LANGID=0 regression
>>
>> usb devices are not required to report string descriptors. Since they are
>> optional, log an info message instead of an error message.
>>
>> Signed-off-by: Scot Doyle <lkml14@scotdoyle.com>
>> ---
>>  drivers/usb/core/message.c | 8 ++++++--
>>  1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
>> index 0c8a7fc..da2f1f2 100644
>> --- a/drivers/usb/core/message.c
>> +++ b/drivers/usb/core/message.c
>> @@ -780,8 +780,12 @@ static int usb_get_langid(struct usb_device *dev, unsigned char *tbuf)
>>  	 * deal with strings at all. Set string_langid to -1 in order to
>>  	 * prevent any string to be retrieved from the device */
>>  	if (err < 0) {
>> -		dev_err(&dev->dev, "string descriptor 0 read error: %d\n",
>> -					err);
>> +		if (err == -EPIPE)
>> +			dev_info(&dev->dev,
>> +				 "string descriptor 0 read error: -EPIPE\n");
>> +		else
>> +			dev_err(&dev->dev,
>> +				"string descriptor 0 read error: %d\n", err);
>
> What real difference does this patch make?  What would a user do with
> -EPIPE?

Not much difference, except e.g. a log line that isn't red.

> And USB devices _are_ required to provide a string descriptor if they
> provide a string id, so your changelog body doesn't make much sense.  I
> suggest rewriting it to say they aren't required to provide a string
> descriptor for string "0".
>
> But even then, I don't understand the goal of this patch.

I'm happy to drop this patch request, since in my case the return value is 
-ENODATA, which is covered by the other patch: "[RFC PATCH] usb: core: log 
more general message on malformed LANGID descriptor"


      reply	other threads:[~2014-09-24 17:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 20:20 [PATCH] usb: core: downgrade log severity to info when descriptor missing Scot Doyle
2014-09-23 14:26 ` Alan Stern
2014-09-23 19:06   ` Scot Doyle
2014-09-23 19:12     ` [PATCH v2] usb: core: downgrade log severity to info when descriptor unavailable Scot Doyle
2014-09-24  5:18       ` Greg Kroah-Hartman
2014-09-24 17:56         ` Scot Doyle [this message]

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=alpine.DEB.2.11.1409241736520.2919@localhost.localdomain \
    --to=lkml14@scotdoyle.com \
    --cc=dan.j.williams@intel.com \
    --cc=daniel@caiaq.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sarah.a.sharp@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    /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

all inboxes | Powered by JetHome®