summaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-03 18:22:16 (GMT)
committerTom Rini <trini@konsulko.com>2017-08-16 12:31:24 (GMT)
commit21f639446d6bccb6cc550140d36bd3ebd74fcee8 (patch)
treece0d9c8f4f27a05d86ab42bb727221b6fe4046df /env
parent723806cc5bea9f8b37323dfd7568603f99af6a06 (diff)
downloadu-boot-21f639446d6bccb6cc550140d36bd3ebd74fcee8.tar.xz
env: Adjust the get_char() method to return an int
In principle this can fail, e.g. if the index is out of range. Adjust the driver signature to allow returning an error code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'env')
-rw-r--r--env/dataflash.c2
-rw-r--r--env/eeprom.c2
-rw-r--r--env/nvram.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/env/dataflash.c b/env/dataflash.c
index 28dcf6f..afa08f8 100644
--- a/env/dataflash.c
+++ b/env/dataflash.c
@@ -14,7 +14,7 @@
DECLARE_GLOBAL_DATA_PTR;
-static unsigned char env_dataflash_get_char(int index)
+static int env_dataflash_get_char(int index)
{
uchar c;
diff --git a/env/eeprom.c b/env/eeprom.c
index 39adcca..fbe4fd4 100644
--- a/env/eeprom.c
+++ b/env/eeprom.c
@@ -61,7 +61,7 @@ static int eeprom_bus_write(unsigned dev_addr, unsigned offset,
return rcode;
}
-static uchar env_eeprom_get_char(int index)
+static int env_eeprom_get_char(int index)
{
uchar c;
unsigned int off = CONFIG_ENV_OFFSET;
diff --git a/env/nvram.c b/env/nvram.c
index ac389ac..85af37d 100644
--- a/env/nvram.c
+++ b/env/nvram.c
@@ -41,7 +41,7 @@ env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
#endif
#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
-static uchar env_nvram_get_char(int index)
+static int env_nvram_get_char(int index)
{
uchar c;