@@ -903,8 +903,8 @@ static bool is_erased(u8 *buf, int len)
#define ECC_ERR_DEVICE(x) (((x) & ERR_CORRECTION_INFO__DEVICE_NR) >> 8)
#define ECC_LAST_ERR(x) ((x) & ERR_CORRECTION_INFO__LAST_ERR_INFO)
-static bool handle_ecc(struct denali_nand_info *denali, u8 *buf,
- u32 irq_status, unsigned int *max_bitflips)
+static bool denali_sw_ecc_fixup(struct denali_nand_info *denali, u8 *buf,
+ u32 irq_status, unsigned int *max_bitflips)
{
bool check_erased_page = false;
unsigned int bitflips = 0;
@@ -1139,7 +1139,8 @@ static int denali_read_page(struct mtd_info *mtd, struct nand_chip *chip,
memcpy(buf, denali->buf.buf, mtd->writesize);
- check_erased_page = handle_ecc(denali, buf, irq_status, &max_bitflips);
+ check_erased_page = denali_sw_ecc_fixup(denali, buf, irq_status,
+ &max_bitflips);
denali_enable_dma(denali, false);
if (check_erased_page) {
I am going to add HW_ECC_FIXUP capability in the next commit. Rename the software ECC handling function to denali_sw_ecc_fixup() for clarification. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> --- drivers/mtd/nand/denali.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.7.4