diff mbox series

[U-Boot] spl: fix debug print in spl_common_init()

Message ID 20180813092405.3563-1-simon.k.r.goldschmidt@gmail.com
State Accepted
Commit 94cb986e5e7f3bea9bb8fd09223f2ae0a6545563
Delegated to: Tom Rini
Headers show
Series [U-Boot] spl: fix debug print in spl_common_init() | expand

Commit Message

Simon Goldschmidt Aug. 13, 2018, 9:24 a.m. UTC
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.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

---

 common/spl/spl.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Philipp Tomsich Aug. 13, 2018, 10:45 a.m. UTC | #1
> On 13 Aug 2018, at 11:24, Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> wrote:
> 
> 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.
> 
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tom Rini Aug. 20, 2018, 5:40 p.m. UTC | #2
On Mon, Aug 13, 2018 at 11:24:05AM +0200, Simon Goldschmidt wrote:

> 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.
> 
> Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/common/spl/spl.c b/common/spl/spl.c
index eda84d0c74..19508c7168 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -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)