Re: [PATCH u-boot-marvell 5/8] arm: mvebu: turris_omnia: Allow to configure mSATA slot via env variable

Marek Behún
2022-03-02T12:36:37Z

> {
> - if (omnia_detect_sata()) {
> +#ifdef CONFIG_SPL_ENV_SUPPORT
> + /* Do not use env_load() as malloc() pool is too small at this stage */
> + bool has_env = (env_init() == 0);
> +#endif
> + const char *env_value = NULL;
> +
> +#ifdef CONFIG_SPL_ENV_SUPPORT
> + /* beware that env_get() returns static allocated memory */
> + env_value = has_env ? env_get("omnia_msata_slot") : NULL;
> +#endif

Can we use
if (IS_ENABLED(CONFIG_SPL_ENV_SUPPORT))
instead of macros here?

Marek