mtd: fsmc: fixed data abort inside change_bit()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Mar 26 20:59:15 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=a612c2ae483ee7e4d40c31d5374edf8a8b025f2a
Commit:     a612c2ae483ee7e4d40c31d5374edf8a8b025f2a
Parent:     02bfc4ebbd2532440fadd78076f3a51e0ae89f7f
Author:     Armando Visconti <armando.visconti at st.com>
AuthorDate: Wed Mar 7 17:00:53 2012 +0530
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Tue Mar 27 00:47:55 2012 +0100

    mtd: fsmc: fixed data abort inside change_bit()
    
    Since change_bit() requires a (unsigned int *) as second arg,
    the correct definition of err_idx[] array declared as
    local variable of fsmc_correct_data() is the following:
    
    	u32 err_idx[8];
    
    Signed-off-by: Armando Visconti <armando.visconti at st.com>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/fsmc_nand.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 4dda9bb..cfe15a6 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -604,7 +604,7 @@ static int fsmc_correct_data(struct mtd_info *mtd, uint8_t *dat,
 	struct nand_chip *chip = mtd->priv;
 	struct fsmc_regs *regs = host->regs_va;
 	unsigned int bank = host->bank;
-	uint16_t err_idx[8];
+	uint32_t err_idx[8];
 	uint64_t ecc_data[2];
 	uint32_t num_err, i;
 



More information about the linux-mtd-cvs mailing list