diff options
| author | Simon Glass <[email protected]> | 2023-09-26 08:14:31 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2023-10-06 14:38:12 -0400 |
| commit | 2003a83cc8b3937cda09e712c75f50f579eed3fa (patch) | |
| tree | 0ee4fca536adb59c2862affa0cc240666cc1cfb1 /common | |
| parent | 7907a7b99a582f511f93071896c6f8e9163f81d1 (diff) | |
spl: Avoid an #ifdef when printing gd->malloc_ptr
Use an accessor in the header file to avoid this.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'common')
| -rw-r--r-- | common/spl/spl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c index 9b0276cbdb5..d676a0312af 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -860,10 +860,11 @@ void board_init_r(gd_t *dummy1, ulong dummy2) } else { debug("Unsupported OS image.. Jumping nevertheless..\n"); } -#if CONFIG_IS_ENABLED(SYS_MALLOC_F) && !defined(CONFIG_SPL_SYS_MALLOC_SIZE) - debug("SPL malloc() used 0x%lx bytes (%ld KB)\n", gd->malloc_ptr, - gd->malloc_ptr / 1024); -#endif + if (CONFIG_IS_ENABLED(SYS_MALLOC_F) && + !IS_ENABLED(CONFIG_SPL_SYS_MALLOC_SIZE)) + debug("SPL malloc() used 0x%lx bytes (%ld KB)\n", + gd_malloc_ptr(), gd_malloc_ptr() / 1024); + bootstage_mark_name(get_bootstage_id(false), "end phase"); #ifdef CONFIG_BOOTSTAGE_STASH ret = bootstage_stash((void *)CONFIG_BOOTSTAGE_STASH_ADDR, |
