mips: move build_tlb_refill_handler() prototype
authorArnd Bergmann <arnd@arndb.de>
Mon, 4 Dec 2023 11:56:57 +0000 (12:56 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 11 Dec 2023 01:21:39 +0000 (17:21 -0800)
Instead of having a declaration for each caller, have one that is shared
with the function definition, which avoids a warning:

arch/mips/mm/tlbex.c:2547:6: error: no previous prototype for 'build_tlb_refill_handler' [-Werror=missing-prototypes]

Link: https://lkml.kernel.org/r/20231204115710.2247097-8-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/tlbex.h
arch/mips/mm/tlb-r3k.c
arch/mips/mm/tlb-r4k.c

index 6d97e23f30abdded461a1b93f17feb9fd5d85a65..24a2d06cc1c390a2f8fbd8e6da9ea10875e2fd0c 100644 (file)
@@ -23,6 +23,7 @@ void build_update_entries(u32 **p, unsigned int tmp, unsigned int ptep);
 void build_tlb_write_entry(u32 **p, struct uasm_label **l,
                           struct uasm_reloc **r,
                           enum tlb_write_entry wmode);
+void build_tlb_refill_handler(void);
 
 extern void handle_tlbl(void);
 extern char handle_tlbl_end[];
index 53dfa2b9316ba950d65b071ec8c2009a97d48ab5..1fb2cf8c8bfa024eb14935f14970b60224a7aae4 100644 (file)
 #include <asm/io.h>
 #include <asm/bootinfo.h>
 #include <asm/cpu.h>
+#include <asm/tlbex.h>
 
 #undef DEBUG_TLB
 
-extern void build_tlb_refill_handler(void);
-
 /* CP0 hazard avoidance. */
 #define BARRIER                                \
        __asm__ __volatile__(           \
index 93c2d695588a1c2fc8c8065a637cb787b18ac04c..a542b255019a0a4d41817d9fbe104d0704877736 100644 (file)
 #include <asm/hazards.h>
 #include <asm/mmu_context.h>
 #include <asm/tlb.h>
+#include <asm/tlbex.h>
 #include <asm/tlbmisc.h>
 
-extern void build_tlb_refill_handler(void);
-
 /*
  * LOONGSON-2 has a 4 entry itlb which is a subset of jtlb, LOONGSON-3 has
  * a 4 entry itlb and a 4 entry dtlb which are subsets of jtlb. Unfortunately,