diff mbox series

[01/17] env: Avoid checking ENV_IS_IN when env disabled

Message ID 20210917161741.1275871-2-sjg@chromium.org
State RFC
Delegated to: Tom Rini
Headers show
Series RFC: Split configs between U-Boot proper and SPL builds | expand

Commit Message

Simon Glass Sept. 17, 2021, 4:17 p.m. UTC
This check is not needed when the environment is not enabled, e.g. in
SPL. Add a condition to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 cmd/nvedit.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/cmd/nvedit.c b/cmd/nvedit.c
index ddc715b4f91..1c8d49646e5 100644
--- a/cmd/nvedit.c
+++ b/cmd/nvedit.c
@@ -62,11 +62,13 @@  DECLARE_GLOBAL_DATA_PTR;
 
 #endif
 
+#if CONFIG_IS_ENABLED(ENV_SUPPORT)
 #if	!defined(ENV_IS_IN_DEVICE)		&& \
 	!defined(CONFIG_ENV_IS_NOWHERE)
 # error Define one of CONFIG_ENV_IS_IN_{EEPROM|FLASH|MMC|FAT|EXT4|\
 NAND|NVRAM|ONENAND|SATA|SPI_FLASH|REMOTE|UBI} or CONFIG_ENV_IS_NOWHERE
 #endif
+#endif /* ENV_SUPPORT */
 
 /*
  * Maximum expected input data size for import command