From: York Sun Date: Thu, 28 Sep 2017 15:42:11 +0000 (-0700) Subject: cmd: spl: fix compiling error when CONFIG_CMD_SPL_WRITE_SIZE not defined X-Git-Tag: v2017.11-rc2~56^2~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b65ac633f52da596cfa573bb4a597e2edd2318c8;p=u-boot cmd: spl: fix compiling error when CONFIG_CMD_SPL_WRITE_SIZE not defined CONFIG_CMD_SPL_WRITE_SIZE is used for writing parameters to non-volatile storage. So far it is only used for NAND. Fix compiling error when this macro is not used for SD. Signed-off-by: York Sun CC: Anatolij Gustschin --- diff --git a/cmd/spl.c b/cmd/spl.c index 4d84492346..3b8992a163 100644 --- a/cmd/spl.c +++ b/cmd/spl.c @@ -121,9 +121,11 @@ static int spl_export(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) (void *)images.ft_addr); env_set_addr("fdtargsaddr", images.ft_addr); env_set_hex("fdtargslen", fdt_totalsize(images.ft_addr)); +#ifdef CONFIG_CMD_SPL_WRITE_SIZE if (fdt_totalsize(images.ft_addr) > CONFIG_CMD_SPL_WRITE_SIZE) puts("WARN: FDT size > CMD_SPL_WRITE_SIZE\n"); +#endif break; #endif case SPL_EXPORT_ATAGS: