Skip to contentSkip to conversation

mtd: atmel_nand: fix pmecc selction for ecc requirement typo

PATCH New Josh Wu 2 participants 2 messages Jul 3, 2013 – Aug 5, 2013

Subsystems (3)
lore
Share & tools
lore

Josh Wu

author
#0 lore raw

PATCH 1/1 mtd: atmel_nand: fix pmecc selction for ecc requirement typo

Atmel PMECC support 2, 4, 8, 12, 24 bit error correction. So if the ecc requirement in ONFI is <= 2, 4, 8, 12, 24. We will use 2, 4, 8, 12, 24.

This patch fix the typo. Use '<=' replace '<'.

---
 drivers/mtd/nand/atmel_nand.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mtd/nand/atmel_nand.c +3 -3
index 7e50ed8..2a42aa8 100644
@@ -960,11 +960,11 @@ static int pmecc_choose_ecc(struct atmel_nand_host *host,
 			host->pmecc_corr_cap = 2;
 		else if (*cap <= 4)
 			host->pmecc_corr_cap = 4;
-		else if (*cap < 8)
+		else if (*cap <= 8)
 			host->pmecc_corr_cap = 8;
-		else if (*cap < 12)
+		else if (*cap <= 12)
 			host->pmecc_corr_cap = 12;
-		else if (*cap < 24)
+		else if (*cap <= 24)
 			host->pmecc_corr_cap = 24;
 		else
 			return -EINVAL;
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 mtd: atmel_nand: fix pmecc selction for ecc requirement typo

Quoted 8 lines · Josh Wu

Atmel PMECC support 2, 4, 8, 12, 24 bit error correction. So if the ecc requirement in ONFI is <= 2, 4, 8, 12, 24. We will use 2, 4, 8, 12, 24.

This patch fix the typo. Use '<=' replace '<'.

Pushed to l2-mtd.git, thanks!

Signature · 2 lines
Best Regards,
Artem Bityutskiy