diff mbox series

[v6,22/25] fdt: Use if() for fdtcontroladdr check

Message ID 20211202155919.2429190-23-sjg@chromium.org
State Changes Requested
Delegated to: Tom Rini
Headers show
Series fdt: Make OF_BOARD a boolean option | expand

Commit Message

Simon Glass Dec. 2, 2021, 3:59 p.m. UTC
Change this to use if() instead of #if

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 lib/fdtdec.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 299a2c3a32f..659aeffd82e 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1634,12 +1634,11 @@  int fdtdec_setup(void)
 	if (ret)
 		return ret;
 # endif
-# ifndef CONFIG_SPL_BUILD
-	/* Allow the early environment to override the fdt address */
-	gd->fdt_blob = map_sysmem
-		(env_get_ulong("fdtcontroladdr", 16,
+	if (!IS_ENABLED(CONFIG_SPL_BUILD)) {
+		/* Allow the early environment to override the fdt address */
+		gd->fdt_blob = map_sysmem(env_get_ulong("fdtcontroladdr", 16,
 			       (unsigned long)map_to_sysmem(gd->fdt_blob)), 0);
-# endif
+	}
 
 	if (CONFIG_IS_ENABLED(MULTI_DTB_FIT))
 		setup_multi_dtb_fit();