Skip to content
Snippets Groups Projects
Commit 613ab32c authored by Prabhakar Kushwaha's avatar Prabhakar Kushwaha Committed by York Sun
Browse files

driver/mmc: fix compile warnings


Fix following compile warnings
fsl_esdhc_spl.c: In function 'mmc_boot':
fsl_esdhc_spl.c:35:10: warning: unused variable 'byte_num' [-Wunused-variable]
fsl_esdhc_spl.c:35:7: warning: unused variable 'i' [-Wunused-variable]
fsl_esdhc_spl.c:34:8: warning: unused variable 'val' [-Wunused-variable]
fsl_esdhc_spl.c:33:6: warning: unused variable 'blklen' [-Wunused-variable]
fsl_esdhc_spl.c:105:7: warning: 'tmp_buf' may be used uninitialized in this
function [-Wuninitialized]

Signed-off-by: default avatarPrabhakar Kushwaha <prabhakar@freescale.com>
Reviewed-by: default avatarYork Sun <yorksun@freescale.com>
parent c3678b09
No related branches found
No related tags found
No related merge requests found
...@@ -29,10 +29,12 @@ void __noreturn mmc_boot(void) ...@@ -29,10 +29,12 @@ void __noreturn mmc_boot(void)
{ {
__attribute__((noreturn)) void (*uboot)(void); __attribute__((noreturn)) void (*uboot)(void);
uint blk_start, blk_cnt, err; uint blk_start, blk_cnt, err;
u32 blklen; #ifndef CONFIG_FSL_CORENET
uchar *tmp_buf; uchar *tmp_buf;
u32 blklen;
uchar val; uchar val;
uint i, byte_num; uint i, byte_num;
#endif
u32 offset, code_len; u32 offset, code_len;
struct mmc *mmc; struct mmc *mmc;
...@@ -102,7 +104,9 @@ void __noreturn mmc_boot(void) ...@@ -102,7 +104,9 @@ void __noreturn mmc_boot(void)
(uchar *)CONFIG_SYS_MMC_U_BOOT_DST); (uchar *)CONFIG_SYS_MMC_U_BOOT_DST);
if (err != blk_cnt) { if (err != blk_cnt) {
puts("spl: mmc read failed!!\n"); puts("spl: mmc read failed!!\n");
#ifndef CONFIG_FSL_CORENET
free(tmp_buf); free(tmp_buf);
#endif
hang(); hang();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment