From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Joe Perches <joe@perches.com>,
linux-usb@vger.kernel.org
Subject: Re: [PATCH 6/7] usb: core: reuse kbasename()
Date: Wed, 3 Oct 2012 08:08:12 -0700 [thread overview]
Message-ID: <20121003150812.GC8460@kroah.com> (raw)
In-Reply-To: <CAHp75VeFNVnKiggLLtKnkpiLpTStQh45Ws+DOq+AZq0FOhp4Cg@mail.gmail.com>
On Wed, Oct 03, 2012 at 11:27:27AM +0300, Andy Shevchenko wrote:
> On Tue, Oct 2, 2012 at 6:00 PM, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
>
> > --- a/drivers/usb/core/file.c
> > +++ b/drivers/usb/core/file.c
>
> > @@ -200,14 +200,9 @@ int usb_register_dev(struct usb_interface *intf,
> >
> > /* create a usb class device for this usb interface */
> > snprintf(name, sizeof(name), class_driver->name, minor - minor_base);
> > - temp = strrchr(name, '/');
> > - if (temp && (temp[1] != '\0'))
> I have checked current linux-next, the drivers define .name in the
> usb_class_driver structure as '...%d'.
> So, what is the reason to check for trailing '/' here? Historical
> reasons or there is a (broken/3rd party/etc) driver with it?
I really do not remember why it was done this way, sorry. I have no
problem not doing it anymore, as long as you are willing to fix any
potential bugs that might pop up :)
And no, I don't worry about 3rd party drivers, that shouldn't be an
issue at all here.
greg k-h
next prev parent reply other threads:[~2012-10-03 15:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-02 15:00 [PATCH 1/7] string: introduce helper to get base file name from given path Andy Shevchenko
2012-10-02 15:00 ` [PATCH 2/7] lib: dynamic_debug: reuse kbasename() Andy Shevchenko
2012-10-02 15:00 ` [PATCH 3/7] staging: rts_pstor: " Andy Shevchenko
2012-10-03 0:30 ` Ryan Mallon
2012-10-03 0:33 ` Ryan Mallon
2012-10-02 15:00 ` [PATCH 4/7] mm: reuse kbasename() functionality Andy Shevchenko
2012-10-02 15:00 ` [PATCH 5/7] procfs: " Andy Shevchenko
2012-10-02 15:00 ` [PATCH 6/7] usb: core: reuse kbasename() Andy Shevchenko
2012-10-03 8:27 ` Andy Shevchenko
2012-10-03 15:08 ` Greg Kroah-Hartman [this message]
2012-10-17 7:42 ` Andy Shevchenko
2012-10-02 15:01 ` [PATCH 7/7] trace: reuse kbasename() functionality Andy Shevchenko
2012-10-02 17:34 ` [PATCH 1/7] string: introduce helper to get base file name from given path Greg KH
2012-10-02 17:52 ` Andy Shevchenko
2012-10-02 18:12 ` Greg KH
2012-10-03 18:39 ` Nick Bowler
2012-10-04 8:19 ` Andy Shevchenko
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=20121003150812.GC8460@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).