From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sun, 9 Jul 2017 14:52:56 -0600 Subject: [U-Boot] [PATCH 13/30] env: common: Drop env_get_addr() In-Reply-To: <20170709205313.116174-1-sjg@chromium.org> References: <20170709205313.116174-1-sjg@chromium.org> Message-ID: <20170709205313.116174-14-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This function is not used anywhere other than env_get_char(). Move the code into that function. Signed-off-by: Simon Glass --- env/common.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/env/common.c b/env/common.c index ff3f47e536..ce6b5f927a 100644 --- a/env/common.c +++ b/env/common.c @@ -41,17 +41,12 @@ static uchar env_get_char_init(int index) return default_environment[index]; } -static const uchar *env_get_addr(int index) +static uchar env_get_char_memory(int index) { if (gd->env_valid) - return (uchar *)(gd->env_addr + index); + return *(uchar *)(gd->env_addr + index); else - return &default_environment[index]; -} - -static uchar env_get_char_memory(int index) -{ - return *env_get_addr(index); + return default_environment[index]; } uchar env_get_char(int index) -- 2.13.2.725.g09c95d1e9-goog