From ac98459ce0897021e5073ce5dc31ef15bcf5a322 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 5 Jun 2023 08:29:37 +0200 Subject: MIPS: boot: main_entry: use malloc_end instead of _stext GCC is not fond of subtracting from array base address. The code already defines and uses a malloc_end pointer, so let's use that instead to rid us of the warning. Signed-off-by: Ahmad Fatoum Link: https://lore.barebox.org/20230605062939.242063-5-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- arch/mips/boot/main_entry.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/mips') diff --git a/arch/mips/boot/main_entry.c b/arch/mips/boot/main_entry.c index 2c18bc81c3..73082adb3f 100644 --- a/arch/mips/boot/main_entry.c +++ b/arch/mips/boot/main_entry.c @@ -89,7 +89,7 @@ void __bare_init main_entry(void *fdt, u32 fdt_size) pr_debug("initializing malloc pool at 0x%08lx (size 0x%08lx)\n", malloc_start, malloc_end - malloc_start); - mem_malloc_init((void *)malloc_start, (void *)_stext - 1); + mem_malloc_init((void *)malloc_start, (void *)malloc_end - 1); mips_stack_top = malloc_start; glob_fdt = fdt; -- cgit v1.2.3