mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
env: common: Drop env_get_addr()
This function is not used anywhere other than env_get_char(). Move the code into that function. Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
13
env/common.c
vendored
13
env/common.c
vendored
@ -41,17 +41,12 @@ static uchar env_get_char_init(int index)
|
||||
return default_environment[index];
|
||||
}
|
||||
|
||||
static const uchar *env_get_addr(int index)
|
||||
{
|
||||
if (gd->env_valid)
|
||||
return (uchar *)(gd->env_addr + index);
|
||||
else
|
||||
return &default_environment[index];
|
||||
}
|
||||
|
||||
static uchar env_get_char_memory(int index)
|
||||
{
|
||||
return *env_get_addr(index);
|
||||
if (gd->env_valid)
|
||||
return *(uchar *)(gd->env_addr + index);
|
||||
else
|
||||
return default_environment[index];
|
||||
}
|
||||
|
||||
uchar env_get_char(int index)
|
||||
|
Reference in New Issue
Block a user