From 2003a83cc8b3937cda09e712c75f50f579eed3fa Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Tue, 26 Sep 2023 08:14:31 -0600 Subject: spl: Avoid an #ifdef when printing gd->malloc_ptr Use an accessor in the header file to avoid this. Signed-off-by: Simon Glass --- include/asm-generic/global_data.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include') diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index f8fc87f1e46..937fb12516c 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -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 * -- cgit v1.2.3