Skip to content

Commit

Permalink
spl: fix debug print in spl_common_init()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Philipp Tomsich <[email protected]>
  • Loading branch information
goldsimon authored and trini committed Aug 20, 2018
1 parent 09d8411 commit 94cb986
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions common/spl/spl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -366,6 +364,8 @@ int spl_early_init(void)
{
int ret;

debug("%s\n", __func__);

ret = spl_common_init(true);
if (ret)
return ret;
Expand All @@ -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)
Expand Down

0 comments on commit 94cb986

Please sign in to comment.