]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
env: sf: Use ENV_VALID enum names instead of literals
authorMarek Behún <marek.behun@nic.cz>
Fri, 22 Oct 2021 13:47:13 +0000 (15:47 +0200)
committerSimon Glass <sjg@chromium.org>
Sun, 31 Oct 2021 18:26:44 +0000 (12:26 -0600)
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>
env/sf.c

index 4096e183874012025459f8530d88d56432d46f0d..c251d076d7f796c63b07b5e8bb1a3becd5920dd7 100644 (file)
--- 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;