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

m68k: mm: Move paging_init() to common <asm/pgtable.h>

When building with W=1:

arch/m68k/mm/motorola.c:414:13: warning: no previous prototype for ‘paging_init’ [-Wmissing-prototypes]
414 | void __init paging_init(void)
| ^~~~~~~~~~~
arch/m68k/mm/sun3mmu.c:36:13: warning: no previous prototype for ‘paging_init’ [-Wmissing-prototypes]
36 | void __init paging_init(void)
| ^~~~~~~~~~~

Fix this by consolidating the multiple prototypes into the common
<asm/pgtable.h>.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/1b03fde54f205e972e19959b8e335022205d538c.1694613528.git.geert@linux-m68k.org

+9 -3
+9
arch/m68k/include/asm/pgtable.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 + #ifndef __M68K_PGTABLE_H 3 + #define __M68K_PGTABLE_H 4 + 2 5 #ifdef __uClinux__ 3 6 #include <asm/pgtable_no.h> 4 7 #else 5 8 #include <asm/pgtable_mm.h> 6 9 #endif 10 + 11 + #ifndef __ASSEMBLY__ 12 + extern void paging_init(void); 13 + #endif 14 + 15 + #endif /* __M68K_PGTABLE_H */
-1
arch/m68k/include/asm/pgtable_no.h
··· 28 28 #define PAGE_READONLY __pgprot(0) 29 29 #define PAGE_KERNEL __pgprot(0) 30 30 31 - extern void paging_init(void); 32 31 #define swapper_pg_dir ((pgd_t *) 0) 33 32 34 33 /*
-2
arch/m68k/kernel/setup_mm.c
··· 107 107 108 108 #define MASK_256K 0xfffc0000 109 109 110 - extern void paging_init(void); 111 - 112 110 static void __init m68k_parse_bootinfo(const struct bi_record *record) 113 111 { 114 112 const struct bi_record *first_record = record;