mtd: nand: sunxi: avoid retrieving data before ECC pass

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Nov 6 10:59:29 PST 2015


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=28ec8a864f4b67bb801aede7919391531612c7dd
Commit:     28ec8a864f4b67bb801aede7919391531612c7dd
Parent:     74eb9ff54e21dbeefa04ff30e6aaf780b91dd261
Author:     Boris BREZILLON <boris.brezillon at free-electrons.com>
AuthorDate: Tue Oct 20 22:16:01 2015 +0200
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Mon Nov 2 12:54:37 2015 -0800

    mtd: nand: sunxi: avoid retrieving data before ECC pass
    
    The in-band data are copied twice: before ECC correction and after the
    ECC engine has fixed all the fixable bitflips.
    Drop the useless memcpy_fromio operation by passing a NULL pointer when
    calling sunxi_nfc_read_buf().
    
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/sunxi_nand.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c
index 96f7370..8247118 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/sunxi_nand.c
@@ -586,7 +586,7 @@ static int sunxi_nfc_hw_ecc_read_chunk(struct mtd_info *mtd,
 	if (*cur_off != data_off)
 		nand->cmdfunc(mtd, NAND_CMD_RNDOUT, data_off, -1);
 
-	sunxi_nfc_read_buf(mtd, data, ecc->size);
+	sunxi_nfc_read_buf(mtd, NULL, ecc->size);
 
 	if (data_off + ecc->size != oob_off)
 		nand->cmdfunc(mtd, NAND_CMD_RNDOUT, oob_off, -1);



More information about the linux-mtd-cvs mailing list