]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
env: common: Make env_get_addr/get_char_memory() static
authorSimon Glass <sjg@chromium.org>
Thu, 3 Aug 2017 18:21:51 +0000 (12:21 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 15 Aug 2017 12:18:46 +0000 (08:18 -0400)
These functions are not used outside this file. Make them static and order
them to avoid forward declarations.

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

index d9c0c4e3f347453e704d0682df743349009bdb47..5a17e5261541c380eaa155a7546cd35e882de701 100644 (file)
@@ -41,7 +41,15 @@ static uchar env_get_char_init(int index)
                return default_environment[index];
 }
 
-uchar env_get_char_memory(int 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);
 }
@@ -55,14 +63,6 @@ uchar env_get_char(int index)
                return env_get_char_init(index);
 }
 
-const uchar *env_get_addr(int index)
-{
-       if (gd->env_valid)
-               return (uchar *)(gd->env_addr + index);
-       else
-               return &default_environment[index];
-}
-
 /*
  * Read an environment variable as a boolean
  * Return -1 if variable does not exist (default to true)
index d86230a2e927e311b4e44d44c3f9dae481e778f8..5f2064bf23303020649078b79d3fb21d9681b1b5 100644 (file)
@@ -202,10 +202,6 @@ extern struct hsearch_data env_htab;
 /* Function that returns a character from the environment */
 unsigned char env_get_char(int);
 
-/* Function that returns a pointer to a value from the environment */
-const unsigned char *env_get_addr(int);
-unsigned char env_get_char_memory(int index);
-
 /* Function that updates CRC of the enironment */
 void env_crc_update(void);