[PATCH] Test for multi-bit error correction

Iwo Mergler Iwo.Mergler at netcommwireless.com
Thu Aug 30 04:05:29 EDT 2012


On Thu, 30 Aug 2012 17:00:33 +1000
Artem Bityutskiy <dedekind1 at gmail.com> wrote:

> On Wed, 2012-08-29 at 17:26 +1000, Iwo Mergler wrote:
> > This tests ECC biterror recovery on a single NAND page. Mostly intended
> > to test ECC hardware and low-level NAND driver.
> > 
> > There are two test modes:
> > 
> >     0 - artificially inserting bit errors until the ECC fails
> >         This is the default method and fairly quick. It should
> >         be independent of the quality of the FLASH.
> > 
> >     1 - re-writing the same pattern repeatedly until the ECC fails.
> >         This method relies on the physics of NAND FLASH to eventually
> >         generate '0' bits if '1' has been written sufficient times. Depending
> >         on the NAND, the first bit errors will appear after 1000 or
> >         more writes and then will usually snowball, reaching the limits
> >         of the ECC quickly.
> 
> Aiaiai! [1] [2]
> 
> drivers/mtd/tests/mtd_nandbiterrs.c: In function 'rewrite_page':
> drivers/mtd/tests/mtd_nandbiterrs.c:152:18: error: 'MTD_OOB_RAW' undeclared (first use in this function)
> drivers/mtd/tests/mtd_nandbiterrs.c:152:18: note: each undeclared identifier is reported only once for each function it
> appears in make[4]: *** [drivers/mtd/tests/mtd_nandbiterrs.o] Error 1

Sorry about that. It should be MTD_OPS_RAW instead.

> --------------------------------------------------------------------------------
> 
> checkpatch.pl has some complaints:
> 
> --------------------------------------------------------------------------------
> 
> checkpatch.pl results for patch "[PATCH] Test for multi-bit error correction"
> 
> WARNING:LONG_LINE: line over 80 characters
> #320: FILE: drivers/mtd/tests/mtd_nandbiterrs.c:270:
> +                       msg("After %d biterrors per subpage, read reported error %d\n",
> 
> WARNING:LONG_LINE: line over 80 characters
> #328: FILE: drivers/mtd/tests/mtd_nandbiterrs.c:278:
> +                       msg("ECC failure, read data is incorrect despite read success\n");
> 
> WARNING:LONG_LINE: line over 80 characters
> #382: FILE: drivers/mtd/tests/mtd_nandbiterrs.c:332:
> +                               msg("Implausible number of bit errors corrected\n");
> 
> WARNING:LONG_LINE: line over 80 characters
> #401: FILE: drivers/mtd/tests/mtd_nandbiterrs.c:351:
> +                       msg("ECC failure, read data is incorrect despite read success\n");
> 
> total: 0 errors, 4 warnings, 464 lines checked
> 

I'm not sure what to do about this. Checkpatch.pl also complains if I split the strings.
I could declare the format strings as const char * somewhere else, but I consider the
resulting code being less readable. Any suggestions?

I'll re-submit the fixed patch as soon as I know what to do.


Best regards,

Iwo

______________________________________________________________________
This communication contains information which may be confidential or privileged. The information is intended solely for the use of the individual or entity named above.  If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited.  If you have received this communication in error, please notify me by telephone immediately.
______________________________________________________________________



More information about the linux-mtd mailing list