All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Dilan Lee <dilee@nvidia.com>,
	Valdis.Kletnieks@vt.edu, Arnd Bergmann <arnd@arndb.de>,
	"G, Manjunath Kondaiah" <manjugk@ti.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Manjunath GKondaiah <manjunath.gkondaiah@linaro.org>,
	linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/5] drivercore: add new error value for deferred probe
Date: Sun, 9 Oct 2011 18:06:56 -0700	[thread overview]
Message-ID: <20111010010656.GA16537@kroah.com> (raw)
In-Reply-To: <CACxGe6t+PfnNGniYUj3pbK22uqjqkbh2+D=7qvvd_-Yd4yR0dw@mail.gmail.com>

On Sun, Oct 09, 2011 at 04:59:31PM -0600, Grant Likely wrote:
> On Fri, Oct 7, 2011 at 6:12 PM, Greg KH <greg@kroah.com> wrote:
> > On Fri, Oct 07, 2011 at 07:28:33PM -0400, Valdis.Kletnieks@vt.edu wrote:
> >> On Fri, 07 Oct 2011 16:12:45 MDT, Grant Likely said:
> >> > On Fri, Oct 7, 2011 at 12:43 AM, Greg KH <greg@kroah.com> wrote:
> >> > > On Fri, Oct 07, 2011 at 10:33:06AM +0500, G, Manjunath Kondaiah wrote:
> >>
> >> > >> +#define EPROBE_DEFER 517     /* restart probe again after some time */
> >> > >
> >> > > Can we really do this?
> >>
> >> > According to Arnd, yes this is okay.
> >>
> >> > >  Isn't this some user/kernel api here?
> >>
> >> > > What's wrong with just "overloading" on top of an existing error code?
> >> > > Surely one of the other 516 types could be used here, right?
> >>
> >> > overloading makes it really hard to find the users at a later date.
> >>
> >> Would proposing '#define EPROBE_DEFER EAGAIN' be acceptable to everybody? That
> >> would allow overloading EAGAIN, but still make it easy to tell the usages apart
> >> if we need to separate them later...
> >
> > Yes, please do that, it is what USB does for it's internal error code
> > handling.
> 
> Really?  When we've only currently used approximately 2^9 of a 2^31
> numberspace?  I'm fine with making sure that the number doesn't show
> up in the userspace headers, but it makes no sense to overload the
> #defines.  Particularly so in this case where it isn't feasible to
> audit every driver to figure out what probe might possibly return.  It
> is well within the realm of possibility that existing drivers are
> already returning -EAGAIN.

I doubt they are, but you are right, it's really hard to tell.

> Besides; linux/errno.h *already* has linux-internal error codes that
> do not get exported out to userspace.  There is an #ifdef __KERNEL__
> block around ERESTARTSYS through EIOCBRETRY which is filtered out when
> exporting headers.  I can't see any possible reason why we wouldn't
> add Linux internal error codes here.

As long as it stays internal, that's fine, I was worried that this would
be exported to userspace.

Alan, still object to this?

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: greg@kroah.com (Greg KH)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/5] drivercore: add new error value for deferred probe
Date: Sun, 9 Oct 2011 18:06:56 -0700	[thread overview]
Message-ID: <20111010010656.GA16537@kroah.com> (raw)
In-Reply-To: <CACxGe6t+PfnNGniYUj3pbK22uqjqkbh2+D=7qvvd_-Yd4yR0dw@mail.gmail.com>

On Sun, Oct 09, 2011 at 04:59:31PM -0600, Grant Likely wrote:
> On Fri, Oct 7, 2011 at 6:12 PM, Greg KH <greg@kroah.com> wrote:
> > On Fri, Oct 07, 2011 at 07:28:33PM -0400, Valdis.Kletnieks at vt.edu wrote:
> >> On Fri, 07 Oct 2011 16:12:45 MDT, Grant Likely said:
> >> > On Fri, Oct 7, 2011 at 12:43 AM, Greg KH <greg@kroah.com> wrote:
> >> > > On Fri, Oct 07, 2011 at 10:33:06AM +0500, G, Manjunath Kondaiah wrote:
> >>
> >> > >> +#define EPROBE_DEFER 517 ? ? /* restart probe again after some time */
> >> > >
> >> > > Can we really do this?
> >>
> >> > According to Arnd, yes this is okay.
> >>
> >> > > ?Isn't this some user/kernel api here?
> >>
> >> > > What's wrong with just "overloading" on top of an existing error code?
> >> > > Surely one of the other 516 types could be used here, right?
> >>
> >> > overloading makes it really hard to find the users at a later date.
> >>
> >> Would proposing '#define EPROBE_DEFER EAGAIN' be acceptable to everybody? That
> >> would allow overloading EAGAIN, but still make it easy to tell the usages apart
> >> if we need to separate them later...
> >
> > Yes, please do that, it is what USB does for it's internal error code
> > handling.
> 
> Really?  When we've only currently used approximately 2^9 of a 2^31
> numberspace?  I'm fine with making sure that the number doesn't show
> up in the userspace headers, but it makes no sense to overload the
> #defines.  Particularly so in this case where it isn't feasible to
> audit every driver to figure out what probe might possibly return.  It
> is well within the realm of possibility that existing drivers are
> already returning -EAGAIN.

I doubt they are, but you are right, it's really hard to tell.

> Besides; linux/errno.h *already* has linux-internal error codes that
> do not get exported out to userspace.  There is an #ifdef __KERNEL__
> block around ERESTARTSYS through EIOCBRETRY which is filtered out when
> exporting headers.  I can't see any possible reason why we wouldn't
> add Linux internal error codes here.

As long as it stays internal, that's fine, I was worried that this would
be exported to userspace.

Alan, still object to this?

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: Valdis.Kletnieks@vt.edu, "G, Manjunath Kondaiah" <manjugk@ti.com>,
	linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Dilan Lee <dilee@nvidia.com>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Manjunath GKondaiah <manjunath.gkondaiah@linaro.org>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH 1/5] drivercore: add new error value for deferred probe
Date: Sun, 9 Oct 2011 18:06:56 -0700	[thread overview]
Message-ID: <20111010010656.GA16537@kroah.com> (raw)
In-Reply-To: <CACxGe6t+PfnNGniYUj3pbK22uqjqkbh2+D=7qvvd_-Yd4yR0dw@mail.gmail.com>

On Sun, Oct 09, 2011 at 04:59:31PM -0600, Grant Likely wrote:
> On Fri, Oct 7, 2011 at 6:12 PM, Greg KH <greg@kroah.com> wrote:
> > On Fri, Oct 07, 2011 at 07:28:33PM -0400, Valdis.Kletnieks@vt.edu wrote:
> >> On Fri, 07 Oct 2011 16:12:45 MDT, Grant Likely said:
> >> > On Fri, Oct 7, 2011 at 12:43 AM, Greg KH <greg@kroah.com> wrote:
> >> > > On Fri, Oct 07, 2011 at 10:33:06AM +0500, G, Manjunath Kondaiah wrote:
> >>
> >> > >> +#define EPROBE_DEFER 517     /* restart probe again after some time */
> >> > >
> >> > > Can we really do this?
> >>
> >> > According to Arnd, yes this is okay.
> >>
> >> > >  Isn't this some user/kernel api here?
> >>
> >> > > What's wrong with just "overloading" on top of an existing error code?
> >> > > Surely one of the other 516 types could be used here, right?
> >>
> >> > overloading makes it really hard to find the users at a later date.
> >>
> >> Would proposing '#define EPROBE_DEFER EAGAIN' be acceptable to everybody? That
> >> would allow overloading EAGAIN, but still make it easy to tell the usages apart
> >> if we need to separate them later...
> >
> > Yes, please do that, it is what USB does for it's internal error code
> > handling.
> 
> Really?  When we've only currently used approximately 2^9 of a 2^31
> numberspace?  I'm fine with making sure that the number doesn't show
> up in the userspace headers, but it makes no sense to overload the
> #defines.  Particularly so in this case where it isn't feasible to
> audit every driver to figure out what probe might possibly return.  It
> is well within the realm of possibility that existing drivers are
> already returning -EAGAIN.

I doubt they are, but you are right, it's really hard to tell.

> Besides; linux/errno.h *already* has linux-internal error codes that
> do not get exported out to userspace.  There is an #ifdef __KERNEL__
> block around ERESTARTSYS through EIOCBRETRY which is filtered out when
> exporting headers.  I can't see any possible reason why we wouldn't
> add Linux internal error codes here.

As long as it stays internal, that's fine, I was worried that this would
be exported to userspace.

Alan, still object to this?

greg k-h

  reply	other threads:[~2011-10-10  1:06 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07  5:33 [PATCH 0/5] Driver Probe Deferral Mechanism G, Manjunath Kondaiah
2011-10-07  5:33 ` [PATCH 1/5] drivercore: add new error value for deferred probe G, Manjunath Kondaiah
2011-10-07  6:43   ` Greg KH
2011-10-07  6:43     ` Greg KH
2011-10-07 10:00     ` Mark Brown
2011-10-07 10:00       ` Mark Brown
2011-10-07 22:12     ` Grant Likely
2011-10-07 22:12       ` Grant Likely
2011-10-07 23:28       ` Valdis.Kletnieks
2011-10-07 23:28         ` Valdis.Kletnieks
2011-10-07 23:28         ` Valdis.Kletnieks at vt.edu
2011-10-08  0:12         ` Greg KH
2011-10-08  0:12           ` Greg KH
2011-10-09 22:59           ` Grant Likely
2011-10-09 22:59             ` Grant Likely
2011-10-09 22:59             ` Grant Likely
2011-10-10  1:06             ` Greg KH [this message]
2011-10-10  1:06               ` Greg KH
2011-10-10  1:06               ` Greg KH
2011-10-12  6:18               ` G, Manjunath Kondaiah
2011-10-12  6:18                 ` G, Manjunath Kondaiah
2011-10-13  4:10                 ` Grant Likely
2011-10-13  4:10                   ` Grant Likely
2011-10-07  5:33 ` [PATCH 2/5] drivercore: Add driver probe deferral mechanism G, Manjunath Kondaiah
2011-10-07  6:49   ` Greg KH
2011-10-07  6:49     ` Greg KH
2011-10-07 20:57     ` Josh Triplett
2011-10-07 20:57       ` Josh Triplett
2011-10-07 21:23       ` Greg KH
2011-10-07 21:23         ` Greg KH
2011-10-08  4:03         ` Josh Triplett
2011-10-08  4:03           ` Josh Triplett
2011-10-08 15:55           ` Greg KH
2011-10-08 15:55             ` Greg KH
2011-10-08 18:18             ` Josh Triplett
2011-10-08 18:18               ` Josh Triplett
2011-10-10 17:37             ` Andrei Warkentin
2011-10-10 17:37               ` Andrei Warkentin
2011-10-11 12:29               ` Ming Lei
2011-10-11 12:29                 ` Ming Lei
2011-10-13  4:09                 ` Grant Likely
2011-10-13  4:09                   ` Grant Likely
2011-10-13 14:18                   ` Ming Lei
2011-10-13 14:18                     ` Ming Lei
2011-10-13 14:31                     ` Alan Stern
2011-10-13 14:31                       ` Alan Stern
2011-10-13 14:31                       ` Alan Stern
2011-10-13 15:21                       ` Ming Lei
2011-10-13 15:21                         ` Ming Lei
2011-10-13 16:04                         ` Alan Stern
2011-10-13 16:04                           ` Alan Stern
2011-10-13 16:04                           ` Alan Stern
2011-10-14  0:13                           ` Ming Lei
2011-10-14  0:13                             ` Ming Lei
2011-10-13 17:15                       ` Grant Likely
2011-10-13 17:15                         ` Grant Likely
2011-10-13 18:16                         ` Alan Stern
2011-10-13 18:16                           ` Alan Stern
2011-10-13 18:16                           ` Alan Stern
2011-10-13 18:28                           ` Grant Likely
2011-10-13 18:28                             ` Grant Likely
2011-10-14 15:39                             ` Alan Stern
2011-10-14 15:39                               ` Alan Stern
2011-10-14 15:39                               ` Alan Stern
2011-10-14 16:17                               ` Grant Likely
2011-10-14 16:17                                 ` Grant Likely
2011-10-14 16:33                                 ` Alan Stern
2011-10-14 16:33                                   ` Alan Stern
2011-10-14 16:33                                   ` Alan Stern
2011-10-14 17:20                                   ` Grant Likely
2011-10-14 17:20                                     ` Grant Likely
2011-10-14 17:33                                     ` Alan Stern
2011-10-14 17:33                                       ` Alan Stern
2011-10-14 17:33                                       ` Alan Stern
2011-10-14 18:25                                       ` Grant Likely
2011-10-14 18:25                                         ` Grant Likely
2011-10-14 18:39                                         ` Alan Stern
2011-10-14 18:39                                           ` Alan Stern
2011-10-14 18:39                                           ` Alan Stern
2011-10-14 19:07                                           ` Grant Likely
2011-10-14 19:07                                             ` Grant Likely
2011-10-14 18:56                                     ` David Daney
2011-10-14 18:56                                       ` David Daney
2011-10-14 19:03                                       ` Grant Likely
2011-10-14 19:03                                         ` Grant Likely
2011-10-14 19:03                                         ` Grant Likely
2011-10-14 19:09                                         ` David Daney
2011-10-14 19:09                                           ` David Daney
2011-10-14 15:37                         ` Alan Stern
2011-10-14 15:37                           ` Alan Stern
2011-10-14 15:37                           ` Alan Stern
2011-10-12  7:04               ` G, Manjunath Kondaiah
2011-10-12  7:04                 ` G, Manjunath Kondaiah
2011-10-07 21:28     ` Grant Likely
2011-10-07 21:28       ` Grant Likely
2011-10-07 21:28       ` Grant Likely
2011-10-07  5:33 ` [PATCH 3/5] regulator: Support driver probe deferral G, Manjunath Kondaiah
2011-10-07  5:33 ` [PATCH 4/5] gpiolib: handle deferral probe error G, Manjunath Kondaiah
2011-10-07 10:06   ` Alan Cox
2011-10-07 10:06     ` Alan Cox
2011-10-07 10:06     ` Alan Cox
2011-10-07 22:09     ` Grant Likely
2011-10-07 22:09       ` Grant Likely
2011-10-12  6:14       ` G, Manjunath Kondaiah
2011-10-12  6:14         ` G, Manjunath Kondaiah
2011-10-12  6:14         ` G, Manjunath Kondaiah
2011-10-13  4:12         ` Grant Likely
2011-10-13  4:12           ` Grant Likely
2011-10-07  5:33 ` [PATCH 5/5] omap: hsmmc: use platform_driver_register G, Manjunath Kondaiah
2011-10-07  6:50 ` [PATCH 0/5] Driver Probe Deferral Mechanism Greg KH
2011-10-07  6:50   ` Greg KH
2011-10-07  6:50   ` Greg KH
2011-10-07  7:37   ` G, Manjunath Kondaiah
2011-10-07  7:37     ` G, Manjunath Kondaiah
2011-10-07  7:37     ` G, Manjunath Kondaiah
  -- strict thread matches above, loose matches on Subject: below --
2011-10-07  5:05 G, Manjunath Kondaiah
2011-10-07  5:05 ` [PATCH 1/5] drivercore: add new error value for deferred probe G, Manjunath Kondaiah

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=20111010010656.GA16537@kroah.com \
    --to=greg@kroah.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=arnd@arndb.de \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dilee@nvidia.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=manjugk@ti.com \
    --cc=manjunath.gkondaiah@linaro.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.