[PATCH 02/14] env: sf: Use ENV_VALID enum names instead of literals

Marek Behún kabel at kernel.org
Fri Oct 22 15:47:13 CEST 2021


From: Marek Behún <marek.behun at nic.cz>

The function env_sf_init_addr() assigns number literals (1) instead of
ENV_VALID to gd->env_valid. Fix this.

Signed-off-by: Marek Behún <marek.behun at nic.cz>
---
 env/sf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/env/sf.c b/env/sf.c
index 4096e18387..c251d076d7 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -339,10 +339,10 @@ static int env_sf_init_addr(void)
 
 	if (crc32(0, env_ptr->data, ENV_SIZE) == env_ptr->crc) {
 		gd->env_addr = (ulong)&(env_ptr->data);
-		gd->env_valid = 1;
+		gd->env_valid = ENV_VALID;
 	} else {
 		gd->env_addr = (ulong)&default_environment[0];
-		gd->env_valid = 1;
+		gd->env_valid = ENV_VALID;
 	}
 
 	return 0;
-- 
2.32.0



More information about the U-Boot mailing list