From patchwork Thu May 12 09:52:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 67629 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp661911qge; Thu, 12 May 2016 02:52:41 -0700 (PDT) X-Received: by 10.66.138.16 with SMTP id qm16mr12447410pab.28.1463046760948; Thu, 12 May 2016 02:52:40 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id co4si16643111pad.101.2016.05.12.02.52.40; Thu, 12 May 2016 02:52:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752656AbcELJwj (ORCPT + 29 others); Thu, 12 May 2016 05:52:39 -0400 Received: from arroyo.ext.ti.com ([198.47.19.12]:50694 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751713AbcELJwh (ORCPT ); Thu, 12 May 2016 05:52:37 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id u4C9q80R005384; Thu, 12 May 2016 04:52:08 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u4C9q6xf029716; Thu, 12 May 2016 04:52:07 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Thu, 12 May 2016 04:52:06 -0500 Received: from lta0400828d.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u4C9q4h0003913; Thu, 12 May 2016 04:52:05 -0500 From: Roger Quadros To: CC: , , , Roger Quadros Subject: [PATCH] mtd: nand: ratelimit ecc error message Date: Thu, 12 May 2016 12:52:03 +0300 Message-ID: <1463046723-12950-1-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Roger Quadros --- drivers/mtd/nand/nand_bch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 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;