[PATCH v3 03/32] mmc: env: Unify the U_BOOT_ENV_LOCATION conditions

Ilias Apalodimas ilias.apalodimas at linaro.org
Mon Nov 20 21:46:24 CET 2023


On Sat, 18 Nov 2023 at 23:05, Simon Glass <sjg at chromium.org> wrote:
>
> 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 <sjg at chromium.org>
> Reviewed-by: Tom Rini <trini at konsulko.com>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas at linaro.org>

> ---
>
> (no changes since v1)
>
>  env/mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/env/mmc.c b/env/mmc.c
> index cb14bbb58f13..da84cddd74f0 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
> --
> 2.43.0.rc0.421.g78406f8d94-goog
>


More information about the U-Boot mailing list