mips: move jump_label_apply_nops() declaration to header
authorArnd Bergmann <arnd@arndb.de>
Mon, 4 Dec 2023 11:56:58 +0000 (12:56 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 11 Dec 2023 01:21:40 +0000 (17:21 -0800)
Instead of an extern declaration in the C file with the caller, move it to
an appropriate header, avoiding

arch/mips/kernel/jump_label.c:93:6: error: no previous prototype for 'jump_label_apply_nops' [-Werror=missing-prototypes]

Link: https://lkml.kernel.org/r/20231204115710.2247097-9-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/jump_label.h
arch/mips/kernel/module.c

index c5c6864e64bc430a98b2acfce5e4eb13b16dee0a..081be98c71ef48c698f4aa6ba14945239a666a9d 100644 (file)
@@ -15,6 +15,9 @@
 #include <linux/types.h>
 #include <asm/isa-rev.h>
 
+struct module;
+extern void jump_label_apply_nops(struct module *mod);
+
 #define JUMP_LABEL_NOP_SIZE 4
 
 #ifdef CONFIG_64BIT
index 0c936cbf20c53449f5b041446bb4c640b18ff3fb..7b2fbaa9cac579cf27c071efaf515c0f4e225cd3 100644 (file)
@@ -20,8 +20,7 @@
 #include <linux/kernel.h>
 #include <linux/spinlock.h>
 #include <linux/jump_label.h>
-
-extern void jump_label_apply_nops(struct module *mod);
+#include <asm/jump_label.h>
 
 struct mips_hi16 {
        struct mips_hi16 *next;