diff mbox series

[v5,01/11] spl: Make SHOW_ERRORS depend on LIBCOMMON

Message ID 20230731224304.111081-2-sean.anderson@seco.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series spl: Use common function for loading/parsing images | expand

Commit Message

Sean Anderson July 31, 2023, 10:42 p.m. UTC
The purpose of SHOW_ERRORS is to print extra information. Make it depend
on LIBCOMMON to avoid having to check for two configs.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
---

Changes in v5:
- New

 common/spl/Kconfig | 1 +
 common/spl/spl.c   | 3 +--
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Tom Rini Aug. 2, 2023, 7:21 p.m. UTC | #1
On Mon, Jul 31, 2023 at 06:42:53PM -0400, Sean Anderson wrote:

> The purpose of SHOW_ERRORS is to print extra information. Make it depend
> on LIBCOMMON to avoid having to check for two configs.
> 
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox series

Patch

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index bee231b583..ce3efeb0ce 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -183,6 +183,7 @@  config SPL_SYS_REPORT_STACK_F_USAGE
 
 config SPL_SHOW_ERRORS
 	bool "Show more information when something goes wrong"
+	depends on SPL_LIBCOMMON_SUPPORT
 	help
 	  This enabled more verbose error messages and checking when something
 	  goes wrong in SPL. For example, it shows the error code when U-Boot
diff --git a/common/spl/spl.c b/common/spl/spl.c
index d74acec10b..b98a9a062a 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -820,8 +820,7 @@  void board_init_r(gd_t *dummy1, ulong dummy2)
 	ret = boot_from_devices(&spl_image, spl_boot_list,
 				ARRAY_SIZE(spl_boot_list));
 	if (ret) {
-		if (CONFIG_IS_ENABLED(SHOW_ERRORS) &&
-		    CONFIG_IS_ENABLED(LIBCOMMON_SUPPORT))
+		if (CONFIG_IS_ENABLED(SHOW_ERRORS))
 			printf(SPL_TPL_PROMPT "failed to boot from all boot devices (err=%d)\n",
 			       ret);
 		else