]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
openrisc: Add prototype for show_registers to processor.h
authorStafford Horne <shorne@gmail.com>
Sun, 20 Aug 2023 16:11:39 +0000 (17:11 +0100)
committerStafford Horne <shorne@gmail.com>
Mon, 21 Aug 2023 07:15:18 +0000 (08:15 +0100)
When compiling with W=1 enabling -Wmissing-prototypes the compiler
warns:

  arch/openrisc/kernel/traps.c:67:6: error: no previous prototype for 'show_registers' [-Werror=missing-prototypes]

Fix by adding the prototype to the appropriate header file and including
the header file in the appropriate C files.

Reported-by: Arnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd@kernel.org/
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/include/asm/processor.h
arch/openrisc/kernel/process.c
arch/openrisc/kernel/traps.c

index ed9efb430afa17c9b655ef84789ebd7ee7b47aa2..3b736e74e6eddca9cce901b3fd7d9df1ebc05869 100644 (file)
@@ -73,6 +73,7 @@ struct thread_struct {
 
 void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp);
 unsigned long __get_wchan(struct task_struct *p);
+void show_registers(struct pt_regs *regs);
 
 #define cpu_relax()     barrier()
 
index dfa558f98ed8c010c11d9b9108f6158800c27013..a07512de0169b7e4ec0ee4514d134059dd4d9ea0 100644 (file)
@@ -119,8 +119,6 @@ void flush_thread(void)
 
 void show_regs(struct pt_regs *regs)
 {
-       extern void show_registers(struct pt_regs *regs);
-
        show_regs_print_info(KERN_DEFAULT);
        /* __PHX__ cleanup this mess */
        show_registers(regs);
index afa47501118facbd992771388b2ac037fd6a8b23..f221e4b4298f220b9a2408df3acd9de77ed30a25 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/uaccess.h>
 
 #include <asm/io.h>
+#include <asm/processor.h>
 #include <asm/unwinder.h>
 #include <asm/sections.h>