mtd: nand: return consistent error codes in ecc.correct() implementations
authorBoris BREZILLON <boris.brezillon@free-electrons.com>
Wed, 30 Dec 2015 19:32:03 +0000 (20:32 +0100)
committerBrian Norris <computersforpeace@gmail.com>
Thu, 7 Jan 2016 02:45:46 +0000 (18:45 -0800)
commit6e9411923b8f4c0e568cbae0f35b7ee4eb989914
treeec7bf6355c95b14fd19794119d7fd5fbfb9e0186
parent6f357de854a6dfb9ce0d5d65f3971cf3d0a4af6f
mtd: nand: return consistent error codes in ecc.correct() implementations

The error code returned by the ecc.correct() are not consistent over the
all implementations.

Document the expected behavior in include/linux/mtd/nand.h and fix
offending implementations.

[Brian: this looks like a bugfix for the ECC reporting in the bf5xx_nand
driver, but we haven't seen any testing results for it]

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Tested-by: Franklin S Cooper Jr. <fcooper@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/atmel_nand.c
drivers/mtd/nand/bf5xx_nand.c
drivers/mtd/nand/davinci_nand.c
drivers/mtd/nand/jz4740_nand.c
drivers/mtd/nand/mxc_nand.c
drivers/mtd/nand/nand_bch.c
drivers/mtd/nand/nand_ecc.c
drivers/mtd/nand/omap2.c
drivers/mtd/nand/r852.c
include/linux/mtd/nand.h
include/linux/mtd/nand_bch.h