summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/bloblist.h7
-rw-r--r--test/cmd_ut.c2
-rw-r--r--test/lib/kconfig.c10
3 files changed, 15 insertions, 4 deletions
diff --git a/include/bloblist.h b/include/bloblist.h
index ff32d3fecfd..f999391f74b 100644
--- a/include/bloblist.h
+++ b/include/bloblist.h
@@ -357,6 +357,7 @@ int bloblist_new(ulong addr, uint size, uint flags, uint align_log2);
*/
int bloblist_check(ulong addr, uint size);
+#if CONFIG_IS_ENABLED(BLOBLIST)
/**
* bloblist_finish() - Set up the bloblist for the next U-Boot part
*
@@ -366,6 +367,12 @@ int bloblist_check(ulong addr, uint size);
* Return: 0
*/
int bloblist_finish(void);
+#else
+static inline int bloblist_finish(void)
+{
+ return 0;
+}
+#endif /* BLOBLIST */
/**
* bloblist_get_stats() - Get information about the bloblist
diff --git a/test/cmd_ut.c b/test/cmd_ut.c
index 195b7ea50ac..a14dbf4ca5e 100644
--- a/test/cmd_ut.c
+++ b/test/cmd_ut.c
@@ -104,10 +104,12 @@ static struct cmd_tbl cmd_ut_sub[] = {
"", ""),
#endif
#ifdef CONFIG_SANDBOX
+#if CONFIG_IS_ENABLED(BLOBLIST)
U_BOOT_CMD_MKENT(bloblist, CONFIG_SYS_MAXARGS, 1, do_ut_bloblist,
"", ""),
U_BOOT_CMD_MKENT(bootm, CONFIG_SYS_MAXARGS, 1, do_ut_bootm, "", ""),
#endif
+#endif
#ifdef CONFIG_CMD_ADDRMAP
U_BOOT_CMD_MKENT(addrmap, CONFIG_SYS_MAXARGS, 1, do_ut_addrmap, "", ""),
#endif
diff --git a/test/lib/kconfig.c b/test/lib/kconfig.c
index 0c463bb794a..a3645abf946 100644
--- a/test/lib/kconfig.c
+++ b/test/lib/kconfig.c
@@ -21,10 +21,12 @@ static int lib_test_is_enabled(struct unit_test_state *uts)
ut_asserteq(0, CONFIG_IS_ENABLED(OF_PLATDATA));
ut_asserteq(0, CONFIG_IS_ENABLED(_UNDEFINED));
- ut_asserteq(0xb000,
- IF_ENABLED_INT(CONFIG_BLOBLIST_FIXED, CONFIG_BLOBLIST_ADDR));
- ut_asserteq(0xb000,
- CONFIG_IF_ENABLED_INT(BLOBLIST_FIXED, BLOBLIST_ADDR));
+ if (IS_ENABLED(CONFIG_BLOBLIST)) {
+ ut_asserteq(0xb000, IF_ENABLED_INT(CONFIG_BLOBLIST_FIXED,
+ CONFIG_BLOBLIST_ADDR));
+ ut_asserteq(0xb000, CONFIG_IF_ENABLED_INT(BLOBLIST_FIXED,
+ BLOBLIST_ADDR));
+ }
/*
* This fails if CONFIG_TEST_KCONFIG_ENABLE is not enabled, since the