From: Chin Liang See Date: Wed, 5 Mar 2014 17:21:57 -0600 Subject: [U-Boot] [PATCH v2 1/2] nand/denali: Adding Denali NAND driver support In-Reply-To: <1394061092.2697.205.camel@snotra.buserror.net> References: <1393015864-7957-1-git-send-email-clsee@altera.com> <1393891391.2697.159.camel@snotra.buserror.net> <1394040853.3307.7.camel@clsee-VirtualBox.altera.com> <1394043807.2697.203.camel@snotra.buserror.net> <1394061092.2697.205.camel@snotra.buserror.net> Message-ID: <1394061717.2574.1.camel@clsee-VirtualBox.altera.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > > >