]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
env: common: Drop env_get_char_memory()
authorSimon Glass <sjg@chromium.org>
Thu, 3 Aug 2017 18:21:55 +0000 (12:21 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 15 Aug 2017 12:18:47 +0000 (08:18 -0400)
This function is the same as env_get_char_spec() apart from dropping the
brackets. Drop the brackets from env_get_char_spec() and use that instead
of env_get_char_memory().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
env/common.c

index f0ffe4ed738a0315b510847c13d81855f8f321d7..842c0f7fd14c591f1834aec3e347c33cb3741434 100644 (file)
@@ -28,11 +28,6 @@ struct hsearch_data env_htab = {
 };
 
 __weak uchar env_get_char_spec(int index)
-{
-       return *((uchar *)(gd->env_addr + index));
-}
-
-static uchar env_get_char_memory(int index)
 {
        return *(uchar *)(gd->env_addr + index);
 }
@@ -42,8 +37,6 @@ uchar env_get_char(int index)
        /* if env is not set up, or crc was bad, use the default environment */
        if (!gd->env_valid)
                return default_environment[index];
-       else if (gd->flags & GD_FLG_RELOC)  /* if relocated to RAM */
-               return env_get_char_memory(index);
        else
                return env_get_char_spec(index);
 }