mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq@ti.com>
To: <boris.brezillon@free-electrons.com>
Cc: <dwmw2@infradead.org>, <nm@ti.com>,
	<linux-kernel@vger.kernel.org>, Roger Quadros <rogerq@ti.com>
Subject: [PATCH] mtd: nand: ratelimit ecc error message
Date: Thu, 12 May 2016 12:52:03 +0300	[thread overview]
Message-ID: <1463046723-12950-1-git-send-email-rogerq@ti.com> (raw)

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

                 reply	other threads:[~2016-05-12  9:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463046723-12950-1-git-send-email-rogerq@ti.com \
    --to=rogerq@ti.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nm@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®