env: Make use of IF_ENABLED_INT in spi flash support
PATCH 1/1 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 <[email protected]>
--- env/sf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
env/sf.c +2 -1
@@ -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);
Signature · 1 line
2.43.0
Quoted 6 lines · Tom Rini
In order to build the spi flash environment driver, but with
CONFIG_ENV_REDUNDANTdisabled we must make use ofIF_ENABLED_INTto check for a value inCONFIG_ENV_OFFSET_REDUNDotherwise we will fail to build.
Applied to u-boot/next, thanks!
[1/1] env: Make use of IF_ENABLED_INT in spi flash support
commit: c1e17ac28466f9ba68cb65daa9d7f8b4b3ae0a25
Signature · 1 line
Tom