Unclear comment about nand->ecc.read_page ?

Masahiro Yamada yamada.masahiro at socionext.com
Mon Nov 21 16:56:21 PST 2016


Hi.

I have a question about the following comment in
include/linux/mtd/nand.h:

 * @read_page: function to read a page according to the ECC generator
 * requirements; returns maximum number of bitflips corrected in
 * any single ECC step, 0 if bitflips uncorrectable, -EIO hw error



The "0 if bitflips uncorrectable" sounds like
"the read function could not correct bitflips"
(=uncorrectable ECC (EBADMSG) error).


In my understanding, the return value zero means
it read the page successfully and no bitflip correction
happend, right?


If so, is is better to reword like
"0 if no bitflips" or something?

Or remove the "0 if bitflips uncorrectable" entirely?
(because "returns maximum number of bitfilps corrected"
explains the zero case as well)




-- 
Best Regards
Masahiro Yamada



More information about the linux-mtd mailing list