Skip to contentSkip to conversation

spl: fix debug print in spl_common_init()

PATCH In review Simon Goldschmidt 3 participants 3 messages Aug 13, 2018 – Aug 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spl: fix debug print in spl_common_init()

spl_common_init() debug-prints "spl_early_init()\n" but it is called both from spl_early_init() and spl_init().

Fix this by moving the debug() statement to the calling functions which now print their name.

---

 common/spl/spl.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
common/spl/spl.c +4 -2
index eda84d0c74..19508c7168 100644
@@ -317,8 +317,6 @@ static int spl_common_init(bool setup_malloc)
 {
 	int ret;
 
-	debug("spl_early_init()\n");
-
 #if CONFIG_VAL(SYS_MALLOC_F_LEN)
 	if (setup_malloc) {
 #ifdef CONFIG_MALLOC_F_ADDR
@@ -366,6 +364,8 @@ int spl_early_init(void)
 {
 	int ret;
 
+	debug("%s\n", __func__);
+
 	ret = spl_common_init(true);
 	if (ret)
 		return ret;
@@ -380,6 +380,8 @@ int spl_init(void)
 	bool setup_malloc = !(IS_ENABLED(CONFIG_SPL_STACK_R) &&
 			IS_ENABLED(CONFIG_SPL_SYS_MALLOC_SIMPLE));
 
+	debug("%s\n", __func__);
+
 	if (!(gd->flags & GD_FLG_SPL_EARLY_INIT)) {
 		ret = spl_common_init(setup_malloc);
 		if (ret)
Signature · 1 line
2.17.1
#2 lore raw
In reply to Simon Goldschmidt
Quoted 8 lines · Simon Goldschmidt

spl_common_init() debug-prints "spl_early_init()\n" but it is called both from spl_early_init() and spl_init().

Fix this by moving the debug() statement to the calling functions which now print their name.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180820/b8fd908d/attachment.sig>