From: Brian Norris <computersforpeace@gmail.com>
To: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Cc: Jingoo Han <jg1.han@samsung.com>, "Gupta, Pekon" <pekon@ti.com>,
Wei Yongjun <weiyj.lk@gmail.com>,
"tony@atomide.com" <tony@atomide.com>,
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Daniel Mack <zonque@gmail.com>,
yongjun_wei@trendmicro.com.cn, avinashphilip@ti.com,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
David Woodhouse <dwmw2@infradead.org>
Subject: Re: [PATCH -next] mtd: nand: omap: fix error return code in omap_nand_probe()
Date: Wed, 6 Nov 2013 23:18:07 -0800 [thread overview]
Message-ID: <20131107071807.GA3805@norris.computersforpeace.net> (raw)
In-Reply-To: <20131105224526.GA11759@localhost>
On Tue, Nov 05, 2013 at 07:45:27PM -0300, Ezequiel Garcia wrote:
> On Tue, Nov 05, 2013 at 01:59:25PM -0800, Brian Norris wrote:
> > On Thu, Oct 31, 2013 at 7:18 PM, Jingoo Han <jg1.han@samsung.com> wrote:
> > > On Friday, November 01, 2013 9:16 AM, Wei Yongjun wrote:
> > >>
> > >> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> > >>
> > >> Fix to return a negative error code from the error handling
> > >> case instead of 0, as done elsewhere in this function.
> > >
> > > Commit message is right? :-(
> >
> > It sounds OK by my reading. Unless you're having trouble parsing what
> > "as done elsewhere in this function" is being applied to. (IOW, is the
> > rest of the function returning a negative error code on the error
> > paths, or is it returning 0? Of course the answer is the former, but
> > it's possible to misread it.) If it helps, I can try to tweak the
> > wording a bit when applying this patch.
> >
> > Pekon, can I get an Acked-by?
> >
>
> I guess you'd prefer Pekon's ack than mine, but anyway:
Eh, this patch was pretty small anyway. But extra eyes are good.
> Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Thanks.
> I'd like to point out this driver has other "mis-behaviors" in returning codes
> in some other places.
>
> In particular, this pattern can be found repeatedly:
>
> if (do_something()) {
> err = -ENXIO;
> goto some_other_place;
> }
>
> Which should probably be:
>
> err = do_something();
> if (err)
> goto some_other_place;
Yeah, these could be made more consistent. If the callee is choosing
good error codes, then we can just return them. But this is mostly
cosmetic.
> Wei: maybe you'd like to prepare some more patches?
Brian
next prev parent reply other threads:[~2013-11-07 7:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 0:16 [PATCH -next] mtd: nand: omap: fix error return code in omap_nand_probe() Wei Yongjun
2013-11-01 2:18 ` Jingoo Han
2013-11-05 21:59 ` Brian Norris
2013-11-05 22:45 ` Ezequiel Garcia
2013-11-07 7:18 ` Brian Norris [this message]
2013-11-06 18:06 ` Gupta, Pekon
2013-11-07 7:19 ` Brian Norris
2013-11-07 8:19 ` Jingoo Han
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=20131107071807.GA3805@norris.computersforpeace.net \
--to=computersforpeace@gmail.com \
--cc=artem.bityutskiy@linux.intel.com \
--cc=avinashphilip@ti.com \
--cc=dwmw2@infradead.org \
--cc=ezequiel.garcia@free-electrons.com \
--cc=jg1.han@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=pekon@ti.com \
--cc=tony@atomide.com \
--cc=weiyj.lk@gmail.com \
--cc=yongjun_wei@trendmicro.com.cn \
--cc=zonque@gmail.com \
/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