From: Chin Liang See <clsee@altera.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/2] nand/denali: Adding Denali NAND driver support
Date: Wed, 5 Mar 2014 17:21:57 -0600 [thread overview]
Message-ID: <1394061717.2574.1.camel@clsee-VirtualBox.altera.com> (raw)
In-Reply-To: <1394061092.2697.205.camel@snotra.buserror.net>
On Wed, 2014-03-05 at 17:11 -0600, Scott Wood wrote:
> On Wed, 2014-03-05 at 17:09 -0600, Chin Liang See wrote:
> > On Wed, 2014-03-05 at 17:04 -0600, Scott Wood wrote:
> > > On Wed, 2014-03-05 at 17:01 -0600, Chin Liang See wrote:
> > > > On Wed, 2014-03-05 at 12:23 -0600, Scott Wood wrote:
> > > > > On Wed, 2014-03-05 at 11:34 -0600, Chin Liang See wrote:
> > > > > > On Mon, 2014-03-03 at 18:03 -0600, Scott Wood wrote:
> > > > > > > On Fri, 2014-02-21 at 14:51 -0600, Chin Liang See wrote:
> > > > > > > > Why PASS/FAIL rather than normal "0 on success, negative error code on
> > > > > > > error"? Why uint16_t?
> > > > > > >
> > > > > >
> > > > > >
> > > > > > Fixed by returning 0 when pass. Also changed uint16_t to uint32_t
> > > > >
> > > > > Why uint32_t and not int? Is that return value somewhere used in a
> > > > > context that expects a NAND hardware status?
> > > > >
> > > >
> > > >
> > > > Nope, the return value is not used to compare against > 0 or < 0
> > >
> > > Why not?
> > >
> >
> > We just check whether 0 or not as success will return 0.
>
> The standard error idiom in Linux and U-Boot is negative values for
> errors. That's why I asked if there was a reason for this, such as
> passing the value to something that expects status values as would be
> returned by hardware.
>
Yup, there are function which return the register value. From there,
there will be a check for whether certain bit is set or not.
Thanks
Chin Liang
> -Scott
>
>
>
next prev parent reply other threads:[~2014-03-05 23:21 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 20:51 [U-Boot] [PATCH v2 1/2] nand/denali: Adding Denali NAND driver support Chin Liang See
2014-02-24 7:48 ` Michal Simek
2014-02-24 8:06 ` Masahiro Yamada
2014-02-24 8:16 ` Michal Simek
2014-02-27 17:04 ` Chin Liang See
2014-02-28 10:37 ` Michal Simek
2014-03-04 23:57 ` Chin Liang See
2014-03-05 6:22 ` Michal Simek
2014-02-27 14:35 ` Masahiro Yamada
2014-02-27 21:02 ` Chin Liang See
2014-02-27 22:32 ` Scott Wood
2014-02-27 23:03 ` Chin Liang See
2014-02-28 12:57 ` Masahiro Yamada
2014-03-05 0:24 ` Chin Liang See
2014-03-04 0:03 ` Scott Wood
2014-03-04 10:31 ` Masahiro Yamada
2014-03-04 18:44 ` Scott Wood
2014-03-05 17:40 ` Chin Liang See
2014-03-05 17:34 ` Chin Liang See
2014-03-05 18:23 ` Scott Wood
2014-03-05 23:01 ` Chin Liang See
2014-03-05 23:04 ` Scott Wood
2014-03-05 23:09 ` Chin Liang See
2014-03-05 23:11 ` Scott Wood
2014-03-05 23:21 ` Chin Liang See [this message]
2014-05-30 10:50 ` Rik Smith
2014-05-30 11:36 ` Masahiro Yamada
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=1394061717.2574.1.camel@clsee-VirtualBox.altera.com \
--to=clsee@altera.com \
--cc=u-boot@lists.denx.de \
/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