
8 Oct
2013
8 Oct
'13
7:28 p.m.
On Mon, 2013-09-30 at 19:43 +0530, Pekon Gupta wrote:
- /* ECC scheme specific syndrome customizations */
- switch (bch->ecc_scheme) {
- case OMAP_ECC_HAM1_CODE_HW:
break;
- case OMAP_ECC_BCH8_CODE_HW_DETECTION_SW:
+#ifdef CONFIG_BCH
for (i = 0; i < chip->ecc.bytes; i++)
*(ecc_code + i) = *(ecc_code + i) ^
bch8_polynomial[i];
+#endif
break;
- case OMAP_ECC_BCH8_CODE_HW:
ecc_code[chip->ecc.bytes - 1] = 0x00;
break;
- default:
}return -EINVAL;
Shouldn't "case OMAP_ECC_BCH8_CODE_HW_DETECTION_SW:" be inside the "#ifdef CONFIG_BCH" so that you get -EINVAL if the implementation isn't there?
-Scott