From: Simon Glass Date: Sat, 18 Nov 2023 21:04:51 +0000 (-0700) Subject: mmc: env: Unify the U_BOOT_ENV_LOCATION conditions X-Git-Url: http://git.dujemihanovic.xyz/login.html?a=commitdiff_plain;h=f7fac5e7f5a29e6c0e0de61b08caaaa32df0c6fd;p=u-boot.git mmc: env: Unify the U_BOOT_ENV_LOCATION conditions The declaration of U_BOOT_ENV_LOCATION() uses a different #ifdef condition from the code it calls. Use the same condition to avoid a build warning if CONFIG_CMD_SAVEENV is disabled. Signed-off-by: Simon Glass Reviewed-by: Tom Rini Reviewed-by: Ilias Apalodimas --- diff --git a/env/mmc.c b/env/mmc.c index cb14bbb58f..da84cddd74 100644 --- a/env/mmc.c +++ b/env/mmc.c @@ -495,7 +495,7 @@ U_BOOT_ENV_LOCATION(mmc) = { .location = ENVL_MMC, ENV_NAME("MMC") .load = env_mmc_load, -#ifndef CONFIG_SPL_BUILD +#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_SPL_BUILD) .save = env_save_ptr(env_mmc_save), .erase = ENV_ERASE_PTR(env_mmc_erase) #endif