
2 Mar
2022
2 Mar
'22
1:36 p.m.
{
- 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