[PATCH master 5/7] MIPS: boot: main_entry: use malloc_end instead of _stext

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <a.fatoum@xxxxxxxxxxxxxx>
---
 arch/mips/boot/main_entry.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/boot/main_entry.c b/arch/mips/boot/main_entry.c
index 2c18bc81c3ff..73082adb3fba 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;
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux