Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mips: fix setup_zero_pages() prototype

setup_zero_pages() has a local declaration in a platform specific header,
but that is not seen in the file it is defined in:

arch/mips/mm/init.c:60:6: error: no previous prototype for 'setup_zero_pages' [-Werror=missing-prototypes]

Move it to the corresponding global header and include that where needed.

Link: https://lkml.kernel.org/r/20231204115710.2247097-11-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Stephen Rothwell <sfr@rothwell.id.au>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Arnd Bergmann and committed by
Andrew Morton
e021227a e9f98feb

+3 -1
-1
arch/mips/include/asm/mach-loongson64/mmzone.h
··· 18 18 19 19 #define NODE_DATA(n) (__node_data[n]) 20 20 21 - extern void setup_zero_pages(void); 22 21 extern void __init prom_init_numa_memory(void); 23 22 24 23 #endif /* _ASM_MACH_MMZONE_H */
+2
arch/mips/include/asm/mmzone.h
··· 20 20 #define nid_to_addrbase(nid) 0 21 21 #endif 22 22 23 + extern void setup_zero_pages(void); 24 + 23 25 #endif /* _ASM_MMZONE_H_ */
+1
arch/mips/mm/init.c
··· 38 38 #include <asm/dma.h> 39 39 #include <asm/maar.h> 40 40 #include <asm/mmu_context.h> 41 + #include <asm/mmzone.h> 41 42 #include <asm/sections.h> 42 43 #include <asm/pgalloc.h> 43 44 #include <asm/tlb.h>