spl: Avoid an #ifdef when printing gd->malloc_ptr

Use an accessor in the header file to avoid this.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-09-26 08:14:31 -06:00
committed by Tom Rini
parent 7907a7b99a
commit 2003a83cc8
2 changed files with 11 additions and 4 deletions

View File

@@ -588,6 +588,12 @@ static_assert(sizeof(struct global_data) == GD_SIZE);
#define gd_set_pci_ram_top(val)
#endif
#if CONFIG_VAL(SYS_MALLOC_F_LEN)
#define gd_malloc_ptr() gd->malloc_ptr
#else
#define gd_malloc_ptr() 0L
#endif
/**
* enum gd_flags - global data flags
*