Skip to contentSkip to conversation

bootstd: fix build error when CONFIG_MMC is disabled

PATCH In review Dan Carpenter 2 participants 2 messages Feb 21, 2024 – Mar 4, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bootstd: fix build error when CONFIG_MMC is disabled

This code assumes that CONFIG_MMC and it causes a build error when the config is disabled.

aarch64-linux-gnu-ld.bfd: test/boot/bootstd_common.o: in function `bootstd_test_check_mmc_hunter':
test/boot/bootstd_common.c:83:(.text.bootstd_test_check_mmc_hunter+0x70):
undefined reference to `_u_boot_list_2_bootdev_hunter_2_mmc_bootdev_hunter'

Fixes 66e3dce78750 ("bootstd: Allow hunting for a bootdev by label")
---
 test/boot/bootstd_common.c | 3 +++
 1 file changed, 3 insertions(+)
test/boot/bootstd_common.c +3 -0
index e71a2975c53c..cc97e255e5cb 100644
@@ -74,6 +74,9 @@ int bootstd_test_check_mmc_hunter(struct unit_test_state *uts)
 	struct bootstd_priv *std;
 	uint seq;
 
+	if (!IS_ENABLED(CONFIG_MMC))
+		return 0;
+
 	/* get access to the used hunters */
 	ut_assertok(bootstd_get_priv(&std));
 
Signature · 1 line
2.43.0
#1 lore raw
Quoted 9 lines · Dan Carpenter

This code assumes that CONFIG_MMC and it causes a build error when the config is disabled.

aarch64-linux-gnu-ld.bfd: test/boot/bootstd_common.o: in function `bootstd_test_check_mmc_hunter':
test/boot/bootstd_common.c:83:(.text.bootstd_test_check_mmc_hunter+0x70):
undefined reference to `_u_boot_list_2_bootdev_hunter_2_mmc_bootdev_hunter'

Fixes 66e3dce78750 ("bootstd: Allow hunting for a bootdev by label")

Applied to u-boot/next, thanks!

Signature · 1 line
Tom