cmd/nfsdown: fix recently introduced type mismatch issues
When u-boot is configured from odroid-xu3_defconfig, the compiler reports following warnings:
In file included from include/config.h:5:0,
from include/common.h:23,
from cmd/nfsdown.c:11:
cmd/nfsdown.c: In function ‘do_nfs_down’:
include/configs/odroid_xu3.h:16:32: warning: passing argument 1 of ‘do_nfs_to_fat’ makes pointer from integer without a cast [-Wint-conversion]
#define CONFIG_SYS_SDRAM_BASE 0x40000000
^
cmd/nfsdown.c:24:27: note: in expansion of macro ‘CONFIG_SYS_SDRAM_BASE’
#define NFS_DOWNLOAD_ADDR CONFIG_SYS_SDRAM_BASE
^~~~~~~~~~~~~~~~~~~~~
cmd/nfsdown.c:429:25: note: in expansion of macro ‘NFS_DOWNLOAD_ADDR’
size = do_nfs_to_fat(NFS_DOWNLOAD_ADDR, src_path,
^~~~~~~~~~~~~~~~~
cmd/nfsdown.c:328:12: note: expected ‘void *’ but argument is of type ‘int’
static int do_nfs_to_fat(void *addr, char *file_path, char *file_name,
^~~~~~~~~~~~~
In file included from include/config.h:5:0,
from include/common.h:23,
from cmd/nfsdown.c:11:
include/configs/odroid_xu3.h:16:32: warning: passing argument 2 of ‘do_nfs_to_mmc’ makes pointer from integer without a cast [-Wint-conversion]
#define CONFIG_SYS_SDRAM_BASE 0x40000000
^
cmd/nfsdown.c:24:27: note: in expansion of macro ‘CONFIG_SYS_SDRAM_BASE’
#define NFS_DOWNLOAD_ADDR CONFIG_SYS_SDRAM_BASE
^~~~~~~~~~~~~~~~~~~~~
cmd/nfsdown.c:433:30: note: in expansion of macro ‘NFS_DOWNLOAD_ADDR’
size = do_nfs_to_mmc(mmc, NFS_DOWNLOAD_ADDR, src_path,
^~~~~~~~~~~~~~~~~
cmd/nfsdown.c:282:12: note: expected ‘void *’ but argument is of type ‘int’
static int do_nfs_to_mmc(struct mmc *mmc, void *addr, char *file_path,
^~~~~~~~~~~~~
Fix this by changing addr to unsigned long and adding needed casts.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: Ia78da10d04a0daf3301ddc6fa4c7b73000d33c22