[PATCH 16/39] mtd: nand: denali: rename handle_ecc() to denali_sw_ecc_fixup()

Masahiro Yamada yamada.masahiro at socionext.com
Sat Nov 26 10:06:02 PST 2016


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 at socionext.com>
---

 drivers/mtd/nand/denali.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index b577560..271b41a 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -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) {
-- 
2.7.4




More information about the linux-mtd mailing list