[U-Boot] [PATCH v2 18/34] env: common: Drop env_get_char_memory()
Simon Glass
sjg at chromium.org
Mon Jul 24 03:19:53 UTC 2017
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 at chromium.org>
---
Changes in v2: None
env/common.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/env/common.c b/env/common.c
index e919269c7f..7ed4bb28dd 100644
--- a/env/common.c
+++ b/env/common.c
@@ -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);
}
--
2.14.0.rc0.284.gd933b75aa4-goog
More information about the U-Boot
mailing list