diff mbox series

[U-Boot,v3,2/7] cmd: spl: fix compiling error when CONFIG_CMD_SPL_WRITE_SIZE not defined

Message ID 1506613337-19467-3-git-send-email-york.sun@nxp.com
State Accepted
Delegated to: York Sun
Headers show
Series Enable falcon boot for LS1043ARDB | expand

Commit Message

York Sun Sept. 28, 2017, 3:42 p.m. UTC
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 <york.sun@nxp.com>
CC: Anatolij Gustschin <agust@denx.de>

---

Changes in v3: None
Changes in v2:
New patch to fix compiling error after rebasing to latest mater.

 cmd/spl.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/cmd/spl.c b/cmd/spl.c
index 4d84492..3b8992a 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: