[U-Boot] [PATCH 12/25] spl: Correct malloc debugging in board_init_r()

Simon Glass sjg at chromium.org
Tue Nov 6 22:21:29 UTC 2018


SPL does not support %#x in printf() strings so we must write out the 0x
explicitly. Update the code for this.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 common/spl/spl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 292e659c9ac..c855bb7ca4a 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -554,7 +554,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
 		debug("Unsupported OS image.. Jumping nevertheless..\n");
 	}
 #if CONFIG_VAL(SYS_MALLOC_F_LEN) && !defined(CONFIG_SYS_SPL_MALLOC_SIZE)
-	debug("SPL malloc() used %#lx bytes (%ld KB)\n", gd->malloc_ptr,
+	debug("SPL malloc() used 0x%lx bytes (%ld KB)\n", gd->malloc_ptr,
 	      gd->malloc_ptr / 1024);
 #endif
 #ifdef CONFIG_BOOTSTAGE_STASH
-- 
2.19.1.930.g4563a0d9d0-goog



More information about the U-Boot mailing list