From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Brian Norris <computersforpeace@gmail.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: Tue, 5 Nov 2013 19:45:27 -0300 [thread overview]
Message-ID: <20131105224526.GA11759@localhost> (raw)
In-Reply-To: <CAN8TOE9Eac0LDA+Ke_OCPc_AQGnyYB806pO8JP-qOB1Dr8N2pg@mail.gmail.com>
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:
Acked-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
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;
Wei: maybe you'd like to prepare some more patches?
--
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com
next prev parent reply other threads:[~2013-11-05 22:45 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 [this message]
2013-11-07 7:18 ` Brian Norris
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=20131105224526.GA11759@localhost \
--to=ezequiel.garcia@free-electrons.com \
--cc=artem.bityutskiy@linux.intel.com \
--cc=avinashphilip@ti.com \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--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