diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2017-10-13 14:22:13 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2017-10-13 11:41:06 +0000 |
commit | 7ded743070301ae650fca97f06ace5aeaf901806 (patch) | |
tree | 2c4c83cb9e0a88796fecaa3e54c9498d8e5aefa7 | |
parent | 053d70c4e237a3adfdf449d999559e6fc7622c10 (diff) | |
download | u-boot-artik-tizen.tar.gz u-boot-artik-tizen.tar.bz2 u-boot-artik-tizen.zip |
mmc: fix the compile warning in mmc.ctizen_4.0.m2_releasetizen_4.0.IoT.p2_releasesubmit/tizen_4.0/20171018.060355submit/tizen_4.0/20171018.024233accepted/tizen/4.0/unified/20171018.231717tizen_4.0tizenaccepted/tizen_4.0_unified
There are some compile warnings in mmc.c
This patch is for fixing them.
Change-Id: I1dc5ae6ef4ea6461b4d4635fbc5fecc66939c886
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
-rw-r--r-- | drivers/mmc/mmc.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index e5dce266c..1eff19cc2 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -302,6 +302,7 @@ int mmc_switch(struct mmc *mmc, u8 set, u8 index, u8 value) } +#ifndef CONFIG_S5P_MSHC static ulong mmc_erase_t(struct mmc *mmc, ulong start, lbaint_t blkcnt, int sec) { struct mmc_cmd cmd; @@ -423,21 +424,18 @@ mmc_berase(int dev_num, unsigned long start, lbaint_t blkcnt) return blk; } +#endif #if defined(CONFIG_S5P_MSHC) static unsigned long mmc_erase(int dev_num, unsigned long start, lbaint_t block) { int err; - lbaint_t count, erase_time, dis, blk_hc; + lbaint_t count, erase_time, dis, blk_hc = 0; lbaint_t return_blk = block; struct mmc_cmd cmd; struct mmc *mmc = find_mmc_device(dev_num); - printf("START: %d BLOCK: %d\n", start, block); - printf("high_capacity: %d\n", mmc->high_capacity); - printf("Capacity: %d\n", mmc->capacity); - /* Byte addressing */ if (mmc->high_capacity == 0) { start = start * 512; @@ -536,28 +534,28 @@ mmc_erase(int dev_num, unsigned long start, lbaint_t block) printf("*** High Capacity(higher than 2GB) MMC's erase " "minimum size is 512KB ***\n"); if (block < 2) { - printf("\n %d KB erase Done\n", block*512); + printf("\n %lu KB erase Done\n", block*512); } else if ((block >= 2)&&(block < 2048)){ - printf("\n %d.%d MB erase Done\n", (block/2), + printf("\n %lu.%lu MB erase Done\n", (block/2), (block%2)*5); } else { - printf("\n %d.%d GB erase Done\n", + printf("\n %lu.%lu GB erase Done\n", (block/2048), ((block*1000)/2048) - ((block/2048)*1000)); } } else { if (block < 2) { - printf("\n %d B erase Done\n", block*512); + printf("\n %lu B erase Done\n", block*512); } else if ((block >= 2)&&(block < 2048)){ - printf("\n %d KB erase Done\n", (block/2)); + printf("\n %lu KB erase Done\n", (block/2)); } else if ((block >= 2048)&&(block < (2048 * 1024))){ - printf("\n %d.%d MB erase Done\n", + printf("\n %lu.%lu MB erase Done\n", (block/2048), ((block*1000)/2048) - ((block/2048)*1000)); } else { - printf("\n %d.%d GB erase Done\n", + printf("\n %lu.%lu GB erase Done\n", (block/(2048*1024)), ((block*10)/(2048*1024)) - ((block/(2048*1024))*10)); @@ -1190,7 +1188,6 @@ int mmc_startup(struct mmc *mmc) u64 cmult, csize, capacity; struct mmc_cmd cmd; ALLOC_CACHE_ALIGN_BUFFER(char, ext_csd, 512); - ALLOC_CACHE_ALIGN_BUFFER(char, test_csd, 512); int timeout = 1000; #ifdef CONFIG_MMC_SPI_CRC_ON |