From: Wolfgang Denk Date: Wed, 18 Nov 2009 22:18:24 +0100 Subject: [U-Boot] [PATCH] Davinci: Configurable NAND chip selects In-Reply-To: <20091118202216.GA15517@loki.buserror.net> References: <4B0190C3.3060007@gefanuc.com> <20091118202216.GA15517@loki.buserror.net> Message-ID: <20091118211824.253773F6C2@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Scott Wood, In message <20091118202216.GA15517@loki.buserror.net> you wrote: > On Mon, Nov 16, 2009 at 05:49:55PM +0000, Nick Thompson wrote: > > static void nand_davinci_enable_hwecc(struct mtd_info *mtd, int mode) > > { > > - int dummy; > > + u_int32_t val; > > > > - dummy = emif_regs->NANDF1ECC; > > + val = readl(&emif_regs->NANDF1ECC); > > "val =" can be omitted, which would keep it clear that it is a dummy read. For a little more emphasis one can even write (void)readl(&emif_regs->NANDF1ECC); which really makes it clear that the return value is ignored intentionally. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de The software required `Windows 95 or better', so I installed Linux.