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

Artem Bityutskiy dedekind1 at gmail.com
Fri Feb 25 05:59:09 EST 2011


On Tue, 2011-02-22 at 11:50 +0100, John Ogness wrote:
> From: John Ogness <john.ogness at 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 at linutronix.de>

Hi, could you please CC the OMAP mailing List
(linux-omap at vger.kernel.org) and probably TI people who seem to take
care about the NAND driver nowadays, like "Sukumar Ghorai
<s-ghorai at 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 (Артём Битюцкий)




More information about the linux-mtd mailing list