mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: ratelimit ecc error message
@ 2016-05-12  9:52 Roger Quadros
  0 siblings, 0 replies; only message in thread
From: Roger Quadros @ 2016-05-12  9:52 UTC (permalink / raw)
  To: boris.brezillon; +Cc: dwmw2, nm, linux-kernel, Roger Quadros

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

Reported-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/mtd/nand/nand_bch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/nand_bch.c b/drivers/mtd/nand/nand_bch.c
index b585bae..321dc0d 100644
--- a/drivers/mtd/nand/nand_bch.c
+++ b/drivers/mtd/nand/nand_bch.c
@@ -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;
-- 
2.7.4

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-12  9:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-12  9:52 [PATCH] mtd: nand: ratelimit ecc error message Roger Quadros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®