From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754268AbaIXIGq (ORCPT ); Wed, 24 Sep 2014 04:06:46 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42392 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754008AbaIXIGl (ORCPT ); Wed, 24 Sep 2014 04:06:41 -0400 Date: Tue, 23 Sep 2014 22:18:51 -0700 From: Greg Kroah-Hartman To: Scot Doyle Cc: Alan Stern , Sarah Sharp , Dan Williams , Daniel Mack , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] usb: core: downgrade log severity to info when descriptor unavailable Message-ID: <20140924051851.GA6519@kroah.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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? 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. thanks, greg k-h