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

From: Artem Bityutskiy
Date: Fri Feb 25 2011 - 06:00:37 EST


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

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


> 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 (ÐÑÑÑÐ ÐÐÑÑÑÐÐÐ)

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/