Skip to contentSkip to conversation

mtd: nand: ratelimit ecc error message

PATCH New Roger Quadros 1 participant 1 message May 12, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: nand: ratelimit ecc error message

If NAND has gone bad or filesystem gets corrupted then the console can get flooded with ecc error messages. Ratelimit the error message.

---
 drivers/mtd/nand/nand_bch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mtd/nand/nand_bch.c +1 -1
index b585bae..321dc0d 100644
@@ -97,7 +97,7 @@ int nand_bch_correct_data(struct mtd_info *mtd, unsigned char *buf,
 					errloc[i]);
 		}
 	} else if (count < 0) {
-		printk(KERN_ERR "ecc unrecoverable error\n");
+		pr_err_ratelimited("ecc unrecoverable error\n");
 		count = -EBADMSG;
 	}
 	return count;
Signature · 1 line
2.7.4