
14 Jul
2010
14 Jul
'10
11:13 p.m.
Dear Kumar Gala,
In message EDA07492-2746-46D4-963A-37F4CAE0B415@kernel.crashing.org 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@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_