mtd: nand: fix 512 byte software ecc support
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Jun 5 14:59:08 EDT 2009
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=260dc003e9fd41a6cac64308e63dea37ea5de13f
Commit: 260dc003e9fd41a6cac64308e63dea37ea5de13f
Parent: 6a4123e581b3112ff4ea7439ab9ae5cb271a9dbd
Author: Vimal Singh <vimalsingh at ti.com>
AuthorDate: Mon Feb 23 13:46:08 2009 +0530
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Jun 5 17:40:14 2009 +0100
mtd: nand: fix 512 byte software ecc support
Type of 'byte_addr' needes to be 'unsigned int' for 512 byte
ECC support.
Signed-off-by: Vimal Singh <vimalsingh at ti.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/nand_ecc.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/nand_ecc.c
index 868147a..c0cb87d 100644
--- a/drivers/mtd/nand/nand_ecc.c
+++ b/drivers/mtd/nand/nand_ecc.c
@@ -428,8 +428,8 @@ EXPORT_SYMBOL(nand_calculate_ecc);
int nand_correct_data(struct mtd_info *mtd, unsigned char *buf,
unsigned char *read_ecc, unsigned char *calc_ecc)
{
- unsigned char b0, b1, b2;
- unsigned char byte_addr, bit_addr;
+ unsigned char b0, b1, b2, bit_addr;
+ unsigned int byte_addr;
/* 256 or 512 bytes/ecc */
const uint32_t eccsize_mult =
(((struct nand_chip *)mtd->priv)->ecc.size) >> 8;
More information about the linux-mtd-cvs
mailing list