Re: [PATCH 1/1] omap3: nand: report corrected ecc errors

Artem Bityutskiy
2011-02-25T11:00:34Z

On Tue, 2011-02-22 at 11:50 +0100, John Ogness wrote:
> From: John Ogness <john.ogness@linutronix.de>
>
> The number of corrected ECC errors should be reported since other MTD
> systems make use of this information (such as UBI data scrubbing).
>
> Signed-off-by: John Ogness <john.ogness@linutronix.de>

Hi, could you please CC the OMAP mailing List
(linux-omap@vger.kernel.org) and probably TI people who seem to take
care about the NAND driver nowadays, like "Sukumar Ghorai
<s-ghorai@ti.com>"

> diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
> index 4e33972..a58465c 100644
> --- a/drivers/mtd/nand/omap2.c
> +++ b/drivers/mtd/nand/omap2.c
> @@ -773,7 +773,7 @@ static int omap_compare_ecc(u8 *ecc_data1, /* read from NAND memory */
>
> page_data[find_byte] ^= (1 << find_bit);
>
> - return 0;
> + return 1;

Could you please also improve the comment of this function and document
the error codes - it was obvious when the codes were 0 and -1, and
becomes less obvious when they are -1, 0, and 1.

Thanks!

--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)