From: Linus Walleij <linus.ml.walleij@gmail.com>
To: gregkh@suse.de, Baruch Siach <baruch@tkos.co.il>
Cc: spi-devel-general@lists.sourceforge.net,
David Brownell <dbrownell@users.sourceforge.net>,
linux-kernel@vger.kernel.org
Subject: Re: [spi-devel-general] [PATCH] spi: driver for the Synopsys DesignWare SPI controller
Date: Sun, 31 May 2009 21:27:56 +0200 [thread overview]
Message-ID: <63386a3d0905311227v5bb5c278r306e8ae429e77691@mail.gmail.com> (raw)
In-Reply-To: <20090531080434.GA16463@jasper.tkos.co.il>
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
next parent reply other threads:[~2009-05-31 19:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 ` Linus Walleij [this message]
2009-06-03 21:13 ` Greg KH
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=63386a3d0905311227v5bb5c278r306e8ae429e77691@mail.gmail.com \
--to=linus.ml.walleij@gmail.com \
--cc=baruch@tkos.co.il \
--cc=dbrownell@users.sourceforge.net \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=spi-devel-general@lists.sourceforge.net \
/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®