From: Wolfgang Denk Date: Wed, 14 Jul 2010 23:13:44 +0200 Subject: [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001 In-Reply-To: References: <1276143535-22532-1-git-send-email-galak@kernel.crashing.org> <1276143535-22532-2-git-send-email-galak@kernel.crashing.org> <20100714193057.923BE160696@gemini.denx.de> Message-ID: <20100714211344.BE918160696@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 Kumar Gala, In message you wrote: > > >> +#if defined(CONFIG_FSL_SATA_V2) && > defined(CONFIG_FSL_SATA_ERRATUM_A001) > >> + if (IS_SVR_REV(svr, 1, 0) && > >> + ((SVR_SOC_VER(svr) == SVR_P1022) || > >> + (SVR_SOC_VER(svr) == SVR_P1022_E) || > >> + (SVR_SOC_VER(svr) == SVR_P1013) || > >> + (SVR_SOC_VER(svr) == SVR_P1013_E))) { > > > > Please use a switch(). > > Really? There is only 1 case, you want: > > switch(SVR_SOC_VER(svr)) { > case SVR_P1022: > case SVR_P1022_E: > case SVR_P1013: > case SVR_P1013_E: > .... > break; > } Yes - don't you think it's much easier to write and to read? Also it shows clearly that you are missing a default: case... BTW: your indentation is wrong, and please sort the list... 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 "He only drinks when he gets depressed." "Why does he get depressed?" "Sometimes it's because he hasn't had a drink." - Terry Pratchett, _Men at Arms_