m68k: mm: Move paging_init() to common <asm/pgtable.h>
authorGeert Uytterhoeven <geert@linux-m68k.org>
Wed, 13 Sep 2023 14:08:02 +0000 (16:08 +0200)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Fri, 6 Oct 2023 08:03:02 +0000 (10:03 +0200)
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
arch/m68k/include/asm/pgtable.h
arch/m68k/include/asm/pgtable_no.h
arch/m68k/kernel/setup_mm.c

index ad15d655a9bfb3b5a8234ada9d97f62cd66fe207..27525c6a12fd0c7fcf0477a159a7d50d1005afde 100644 (file)
@@ -1,6 +1,15 @@
 /* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __M68K_PGTABLE_H
+#define __M68K_PGTABLE_H
+
 #ifdef __uClinux__
 #include <asm/pgtable_no.h>
 #else
 #include <asm/pgtable_mm.h>
 #endif
+
+#ifndef __ASSEMBLY__
+extern void paging_init(void);
+#endif
+
+#endif /* __M68K_PGTABLE_H */
index fc044df52b96c149d2bae6e5ef2f5bce07fca638..1a86c15b9008f03dd551ee212aa6d2b97a5254ea 100644 (file)
@@ -28,7 +28,6 @@
 #define PAGE_READONLY  __pgprot(0)
 #define PAGE_KERNEL    __pgprot(0)
 
-extern void paging_init(void);
 #define swapper_pg_dir ((pgd_t *) 0)
 
 /*
index 6f1ae01f322cf2316ef9789e0e95ac3f8ce1a22b..10310b04f77d8d79bec858c6989c2cf21d0af557 100644 (file)
@@ -107,8 +107,6 @@ EXPORT_SYMBOL(isa_sex);
 
 #define MASK_256K 0xfffc0000
 
-extern void paging_init(void);
-
 static void __init m68k_parse_bootinfo(const struct bi_record *record)
 {
        const struct bi_record *first_record = record;