Skip to contentSkip to conversation

common: board_r: print error if binman_init fails

PATCH In review Tim Harvey 2 participants 3 messages Jul 16, 2021 – Jul 24, 2021

lore
Share & tools
lore

Tim Harvey

author
#0 lore raw

PATCH 1/1 common: board_r: print error if binman_init fails

Display an error if binman_init fails.

---
 common/board_r.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
common/board_r.c +7 -1
index 3f82404772..e3e6248a1f 100644
@@ -323,10 +323,16 @@ static int initr_manual_reloc_cmdtable(void)
 
 static int initr_binman(void)
 {
+	int ret;
+
 	if (!CONFIG_IS_ENABLED(BINMAN_FDT))
 		return 0;
 
-	return binman_init();
+	ret = binman_init();
+	if (ret)
+		printf("binman_init failed:%d\n", ret);
+
+	return ret;
 }
 
 #if defined(CONFIG_MTD_NOR_FLASH)
Signature · 1 line
2.17.1
#1 lore raw

Hi Tim,

Quoted 15 lines · Tim Harvey

Display an error if binman_init fails.

---
 common/board_r.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
common/board_r.c +0 -0
index 3f82404772..e3e6248a1f 100644
@@ -323,10 +323,16 @@ static int initr_manual_reloc_cmdtable(void)
 
 static int initr_binman(void)

common/board_r.c static int initr_manual_reloc_cmdtable(void) · line 333

Quoted 10 lines
common/board_r.c +5 -1
 {
+       int ret;
+
        if (!CONFIG_IS_ENABLED(BINMAN_FDT))
                return 0;
 
-       return binman_init();
+       ret = binman_init();
+       if (ret)
+               printf("binman_init failed:%d\n", ret);

How about log_err() instead of printf() ?

Quoted 8 lines
common/board_r.c +2 -1
+
+       return ret;
 }
 
 #if defined(CONFIG_MTD_NOR_FLASH)
--

2.17.1

Regards,
Simon

#2 lore raw

Hi Tim,

Quoted 8 lines · Tim Harvey

Display an error if binman_init fails.

---
 common/board_r.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Applied to u-boot-dm, thanks!