From c1e17ac28466f9ba68cb65daa9d7f8b4b3ae0a25 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 20 Mar 2026 14:53:39 -0600 Subject: [PATCH] env: Make use of IF_ENABLED_INT in spi flash support 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 --- env/sf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/env/sf.c b/env/sf.c index 0e27a020643..14c35324e64 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);