Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932710AbdIHPij (ORCPT ); Fri, 8 Sep 2017 11:38:39 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:32879 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932354AbdIHPgX (ORCPT ); Fri, 8 Sep 2017 11:36:23 -0400 X-Google-Smtp-Source: AOwi7QAPmTBwCM2ylwBS1zB/di7sfuTkXBL3yv9TVmHEUUtM7a0C/wcHzMOvnLgQB8Nsst69REa9ag== From: Romain Izard To: Nicolas Ferre , Boris Brezillon , Michael Turquette , Stephen Boyd , Ludovic Desroches , Jonathan Cameron , Wenyou Yang , Josh Wu , David Woodhouse , Brian Norris , Marek Vasut , Cyrille Pitchen , Thierry Reding , Richard Genoud , Greg Kroah-Hartman , Alan Stern Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pwm@vger.kernel.org, linux-serial@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Romain Izard Subject: [PATCH v1 05/10] mtd: nand: atmel: Report PMECC failures as errors Date: Fri, 8 Sep 2017 17:35:59 +0200 Message-Id: <20170908153604.28383-6-romain.izard.pro@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170908153604.28383-1-romain.izard.pro@gmail.com> References: <20170908153604.28383-1-romain.izard.pro@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1050 Lines: 32 It is not normal for the PMECC to fail when trying to fix ECC errors. Report these cases as errors. Signed-off-by: Romain Izard --- drivers/mtd/nand/atmel/pmecc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mtd/nand/atmel/pmecc.c b/drivers/mtd/nand/atmel/pmecc.c index 8d1208f38025..2a23f1ff945f 100644 --- a/drivers/mtd/nand/atmel/pmecc.c +++ b/drivers/mtd/nand/atmel/pmecc.c @@ -687,6 +687,8 @@ static int atmel_pmecc_err_location(struct atmel_pmecc_user *user) * Number of roots does not match the degree of smu * unable to correct error. */ + dev_err(pmecc->dev, + "PMECC: Impossible to calculate error location.\n"); return -EBADMSG; } @@ -729,7 +731,7 @@ int atmel_pmecc_correct_sector(struct atmel_pmecc_user *user, int sector, ptr = ecc + byte - sectorsize; area = "ECC"; } else { - dev_dbg(pmecc->dev, + dev_err(pmecc->dev, "Invalid errpos value (%d, max is %d)\n", errpos, (sectorsize + eccbytes) * 8); return -EINVAL; -- 2.11.0