From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Mon, 23 Mar 2009 17:22:17 -0500 Subject: [U-Boot] [PATCH 1/2] Fix OneNAND ipl to read CONFIG_SYS_MONITOR_LEN In-Reply-To: <20090323220948.DCC74832E406@gemini.denx.de> References: <20090323212514.GA30976@ld0162-tx32.am.freescale.net> <20090323220948.DCC74832E406@gemini.denx.de> Message-ID: <49C80B99.5010808@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > Dear Scott Wood, > > In message <20090323212514.GA30976@ld0162-tx32.am.freescale.net> you wrote: >>> + /* Check for invalid block mark */ >>> + if (page < 2 && (onenand_readw(ONENAND_SPARERAM) != 0xffff)) >>> + return 1; >> Unnecessary parens. > > Where? I find them pretty useful. Around the second comparison. Why "if (a < b && (c != d))" and not "if (a < b && c != d)", or if the parens are preferred, "if ((a < b) && (c != d))"? Is it because "c" is a function call? > Please keep! OK -- I guess this is another of the unwritten points on which U-boot's style deviates from that which is typical in Linux. -Scott