summaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2018-03-22 23:21:48 -0700
committerYe Li <ye.li@nxp.com>2020-04-26 23:24:14 -0700
commit73c8ddd02ca01fbaf0823716134409cad0daf7cf (patch)
tree03e074101fb8d912973cced243eb4b79c5d634d5 /env
parentcb4ac402f263b9834d8fb9c4ed2f92fe46810804 (diff)
MLK-18141-1 env: sata: Fix build warning and break
Fix below build warning and errors: env/sata.c: In function ‘env_sata_save’: env/sata.c:59:9: warning: implicit declaration of function ‘sata_get_dev’ [-Wimplicit-function-declaration] sata = sata_get_dev(env_sata); ^~~~~~~~~~~~ env/sata.c:59:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion] sata = sata_get_dev(env_sata); ^ env/sata.c: In function ‘env_sata_load’: env/sata.c:101:10: warning: ‘return’ with a value, in function returning void return -EIO; ^ env/sata.c:94:13: note: declared here static void env_sata_load(void) ^~~~~~~~~~~~~ env/sata.c:105:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion] sata = sata_get_dev(env_sata); ^ env/sata.c:108:10: warning: ‘return’ with a value, in function returning void return -EIO; ^ env/sata.c:94:13: note: declared here static void env_sata_load(void) ^~~~~~~~~~~~~ env/sata.c:113:10: warning: ‘return’ with a value, in function returning void return -EIO; ^ env/sata.c:94:13: note: declared here static void env_sata_load(void) ^~~~~~~~~~~~~ env/sata.c:116:9: warning: ‘return’ with a value, in function returning void return env_import(buf, 1); ^~~~~~~~~~~~~~~~~~ env/sata.c:94:13: note: declared here static void env_sata_load(void) ^~~~~~~~~~~~~ env/sata.c: At top level: env/sata.c:120:14: error: ‘ENVL_ESATA’ undeclared here (not in a function) .location = ENVL_ESATA, ^~~~~~~~~~ env/sata.c:122:11: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types] .load = env_sata_load, Signed-off-by: Ye Li <ye.li@nxp.com> (cherry picked from commit ffdc4c02e0a3eb18c7fddf307887265aa97699a6)
Diffstat (limited to 'env')
-rw-r--r--env/sata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/env/sata.c b/env/sata.c
index 8bfcc94306..23ed3decb5 100644
--- a/env/sata.c
+++ b/env/sata.c
@@ -89,7 +89,7 @@ static inline int read_env(struct blk_desc *sata, unsigned long size,
return (n == blk_cnt) ? 0 : -1;
}
-static void env_sata_load(void)
+static int env_sata_load(void)
{
ALLOC_CACHE_ALIGN_BUFFER(char, buf, CONFIG_ENV_SIZE);
struct blk_desc *sata = NULL;