mips: fix setup_zero_pages() prototype
authorArnd Bergmann <arnd@arndb.de>
Mon, 4 Dec 2023 11:57:00 +0000 (12:57 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 11 Dec 2023 01:21:40 +0000 (17:21 -0800)
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>
arch/mips/include/asm/mach-loongson64/mmzone.h
arch/mips/include/asm/mmzone.h
arch/mips/mm/init.c

index ebb1deaa77b9d512e5436edf0c75fd51d025ec10..a3d65d37b8b5d5188d30cbf91d7c4615ae4db5e2 100644 (file)
@@ -18,7 +18,6 @@ extern struct pglist_data *__node_data[];
 
 #define NODE_DATA(n)           (__node_data[n])
 
-extern void setup_zero_pages(void);
 extern void __init prom_init_numa_memory(void);
 
 #endif /* _ASM_MACH_MMZONE_H */
index 602a21aee9d4c97483d087c14d9c9d7091383a13..14226ea420361cb4f1edc705a91f26adc29ef934 100644 (file)
@@ -20,4 +20,6 @@
 #define nid_to_addrbase(nid) 0
 #endif
 
+extern void setup_zero_pages(void);
+
 #endif /* _ASM_MMZONE_H_ */
index 5dcb525a89954322730a5bccfb02b27587c827dc..c2e0e5aebe903199dfcd144b46e4e6c2b798c26d 100644 (file)
@@ -38,6 +38,7 @@
 #include <asm/dma.h>
 #include <asm/maar.h>
 #include <asm/mmu_context.h>
+#include <asm/mmzone.h>
 #include <asm/sections.h>
 #include <asm/pgalloc.h>
 #include <asm/tlb.h>