aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek BehĂșn <marek.behun@nic.cz>2021-10-22 15:47:13 +0200
committerSimon Glass <sjg@chromium.org>2021-10-31 12:26:44 -0600
commit87221bd66c2646671450ca8eb97007f2d6e01c5c (patch)
treea1f396fb2262366289da10ed86fe60d4028fd2c7
parent9ab30d2bafa0ee98e9048afcb575b6013f933f3c (diff)
downloadu-boot-87221bd66c2646671450ca8eb97007f2d6e01c5c.zip
u-boot-87221bd66c2646671450ca8eb97007f2d6e01c5c.tar.gz
u-boot-87221bd66c2646671450ca8eb97007f2d6e01c5c.tar.bz2
env: sf: Use ENV_VALID enum names instead of literals
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@nic.cz> Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r--env/sf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/env/sf.c b/env/sf.c
index 4096e18..c251d07 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;