diff options
author | Anatolij Gustschin <agust@denx.de> | 2011-12-03 06:46:08 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2011-12-07 22:01:56 (GMT) |
commit | 18b89072f6194411517597678d680255ee94a7b2 (patch) | |
tree | 87abff7567b8cdfc6ca020008160e36e01d222cd | |
parent | c786f54b9ace5d7b20a0404a7deb1bae683cd4e8 (diff) | |
download | u-boot-18b89072f6194411517597678d680255ee94a7b2.tar.xz |
drivers/mtd/nand/nand_spl_simple.c: Fix GCC 4.6 warnings
Fix warnings for both cases:
definded CONFIG_SYS_NAND_HW_ECC_OOBFIRST:
nand_spl_simple.c: In function 'nand_read_page':
nand_spl_simple.c:156:6: warning: variable 'stat' set but not used
[-Wunused-but-set-variable]
not definded CONFIG_SYS_NAND_HW_ECC_OOBFIRST:
nand_spl_simple.c: In function 'nand_read_page':
nand_spl_simple.c:196:6: warning: variable 'stat' set but not used
[-Wunused-but-set-variable]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Heiko Schocher <hs@denx.de>
Cc: Scott Wood <scottwood@freescale.com>
Acked-by: Heiko Schocher <hs@denx.de>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
-rw-r--r-- | drivers/mtd/nand/nand_spl_simple.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mtd/nand/nand_spl_simple.c b/drivers/mtd/nand/nand_spl_simple.c index ed821f2..7eb08a3 100644 --- a/drivers/mtd/nand/nand_spl_simple.c +++ b/drivers/mtd/nand/nand_spl_simple.c @@ -153,7 +153,6 @@ static int nand_read_page(int block, int page, uchar *dst) int eccbytes = CONFIG_SYS_NAND_ECCBYTES; int eccsteps = CONFIG_SYS_NAND_ECCSTEPS; uint8_t *p = dst; - int stat; /* * No malloc available for now, just use some temporary locations @@ -176,7 +175,7 @@ static int nand_read_page(int block, int page, uchar *dst) this->ecc.hwctl(&mtd, NAND_ECC_READ); this->read_buf(&mtd, p, eccsize); this->ecc.calculate(&mtd, p, &ecc_calc[i]); - stat = this->ecc.correct(&mtd, p, &ecc_code[i], &ecc_calc[i]); + this->ecc.correct(&mtd, p, &ecc_code[i], &ecc_calc[i]); } return 0; @@ -193,7 +192,6 @@ static int nand_read_page(int block, int page, void *dst) int eccbytes = CONFIG_SYS_NAND_ECCBYTES; int eccsteps = CONFIG_SYS_NAND_ECCSTEPS; uint8_t *p = dst; - int stat; nand_command(block, page, 0, NAND_CMD_READ0); @@ -224,7 +222,7 @@ static int nand_read_page(int block, int page, void *dst) * from correct_data(). We just hope that all possible errors * are corrected by this routine. */ - stat = this->ecc.correct(&mtd, p, &ecc_code[i], &ecc_calc[i]); + this->ecc.correct(&mtd, p, &ecc_code[i], &ecc_calc[i]); } return 0; |