[PATCH] env: Make use of IF_ENABLED_INT in spi flash support
Tom Rini
trini at konsulko.com
Fri Mar 20 21:53:39 CET 2026
In order to build the spi flash environment driver, but with
CONFIG_ENV_REDUNDANT disabled we must make use of IF_ENABLED_INT to
check for a value in CONFIG_ENV_OFFSET_REDUND otherwise we will fail to
build.
Signed-off-by: Tom Rini <trini at konsulko.com>
---
env/sf.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/env/sf.c b/env/sf.c
index 0e27a020643e..14c35324e641 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -396,7 +396,8 @@ static int env_sf_init_early(void)
if (IS_ENABLED(CONFIG_ENV_REDUNDANT)) {
read2_fail = spi_flash_read(env_flash,
- CONFIG_ENV_OFFSET_REDUND,
+ IF_ENABLED_INT(CONFIG_ENV_REDUNDANT,
+ CONFIG_ENV_OFFSET_REDUND),
CONFIG_ENV_SIZE, tmp_env2);
ret = env_check_redund((char *)tmp_env1, read1_fail,
(char *)tmp_env2, read2_fail);
--
2.43.0
More information about the U-Boot
mailing list