diff options
author | Wolfgang Denk <wd@denx.de> | 2011-10-05 22:48:12 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2011-10-09 23:24:49 +0200 |
commit | 419a1fe95497688cf2129472acf3158c24e96ad4 (patch) | |
tree | 5cb3036fc7d42fcaab448feb3184abb760898b71 /drivers/mtd/cfi_mtd.c | |
parent | 80c6abc306ad8baebcd02486167dbb557d90b2e3 (diff) | |
download | u-boot-imx-419a1fe95497688cf2129472acf3158c24e96ad4.zip u-boot-imx-419a1fe95497688cf2129472acf3158c24e96ad4.tar.gz u-boot-imx-419a1fe95497688cf2129472acf3158c24e96ad4.tar.bz2 |
CFI: fix warning: variable ... set but not used
Fix:
cfi_mtd.c: In function 'cfi_mtd_init':
cfi_mtd.c:226:19: warning: variable 'mtd_list' set but not used [-Wunused-but-set-variable]
cfi_mtd.c: In function 'cfi_mtd_init':
cfi_mtd.c:225:6: warning: unused variable 'devices_found'
cfi_mtd.c: In function 'cfi_mtd_init':
cfi_mtd.c:226:19: warning: variable 'mtd_list' set but not used [-Wunused-but-set-variable]
[-Wunused-variable]
Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/mtd/cfi_mtd.c')
-rw-r--r-- | drivers/mtd/cfi_mtd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mtd/cfi_mtd.c b/drivers/mtd/cfi_mtd.c index cbcc165..8d74fa9 100644 --- a/drivers/mtd/cfi_mtd.c +++ b/drivers/mtd/cfi_mtd.c @@ -222,8 +222,10 @@ int cfi_mtd_init(void) struct mtd_info *mtd; flash_info_t *fi; int error, i; +#ifdef CONFIG_MTD_CONCAT int devices_found = 0; struct mtd_info *mtd_list[CONFIG_SYS_MAX_FLASH_BANKS]; +#endif for (i = 0; i < CONFIG_SYS_MAX_FLASH_BANKS; i++) { fi = &flash_info[i]; @@ -253,7 +255,9 @@ int cfi_mtd_init(void) if (add_mtd_device(mtd)) return -ENOMEM; +#ifdef CONFIG_MTD_CONCAT mtd_list[devices_found++] = mtd; +#endif } #ifdef CONFIG_MTD_CONCAT |