linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [spi-devel-general] [PATCH] spi: driver for the Synopsys  DesignWare SPI controller
       [not found]   ` <20090531080434.GA16463@jasper.tkos.co.il>
@ 2009-05-31 19:27     ` Linus Walleij
  2009-06-03 21:13       ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Linus Walleij @ 2009-05-31 19:27 UTC (permalink / raw)
  To: gregkh, Baruch Siach; +Cc: spi-devel-general, David Brownell, linux-kernel

2009/5/31 Baruch Siach <baruch@tkos.co.il>:

>> > +       r = platform_get_resource(dev, IORESOURCE_MEM, 0);
>> > +       if (r == NULL) {
>> > +               ret = -ENODEV;
>>
>> -ENOENT
>
> A quick search in the drivers tree showed no -ENOENT in this situation. Of the
> 10 first results of grep -ENODEV is the most popular as follows:
[The other: 3x -EINVAL one -ENXIO]

Wowsers! And I felt -ENOENT was so intuitive, well if I'm going against
common practice, no good. So let's ask the maintainer of the platform bus
what shall be returned in this situation:

Greg (or some other wise person from linux-kernel) what would you return if
platform_get_resource() returns NULL for an expected resource?

Linus Walleij

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

* Re: [spi-devel-general] [PATCH] spi: driver for the Synopsys DesignWare SPI controller
  2009-05-31 19:27     ` [spi-devel-general] [PATCH] spi: driver for the Synopsys DesignWare SPI controller Linus Walleij
@ 2009-06-03 21:13       ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2009-06-03 21:13 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Baruch Siach, spi-devel-general, David Brownell, linux-kernel

On Sun, May 31, 2009 at 09:27:56PM +0200, Linus Walleij wrote:
> 2009/5/31 Baruch Siach <baruch@tkos.co.il>:
> 
> >> > +       r = platform_get_resource(dev, IORESOURCE_MEM, 0);
> >> > +       if (r == NULL) {
> >> > +               ret = -ENODEV;
> >>
> >> -ENOENT
> >
> > A quick search in the drivers tree showed no -ENOENT in this situation. Of the
> > 10 first results of grep -ENODEV is the most popular as follows:
> [The other: 3x -EINVAL one -ENXIO]
> 
> Wowsers! And I felt -ENOENT was so intuitive, well if I'm going against
> common practice, no good. So let's ask the maintainer of the platform bus
> what shall be returned in this situation:
> 
> Greg (or some other wise person from linux-kernel) what would you return if
> platform_get_resource() returns NULL for an expected resource?

I really have no idea, sorry.

Pick something :)

thanks,

greg k-h

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

end of thread, other threads:[~2009-06-03 21:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1243338914-7811-1-git-send-email-baruch@tkos.co.il>
     [not found] ` <63386a3d0905271416u4b2cee48k40c12e91e1796f83@mail.gmail.com>
     [not found]   ` <20090531080434.GA16463@jasper.tkos.co.il>
2009-05-31 19:27     ` [spi-devel-general] [PATCH] spi: driver for the Synopsys DesignWare SPI controller Linus Walleij
2009-06-03 21:13       ` Greg KH

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).