Skip to content

Commit 8d4a142

Browse files
committed
openrisc: Add prototype for show_registers to processor.h
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>
1 parent af1fc74 commit 8d4a142

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

arch/openrisc/include/asm/processor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ struct thread_struct {
7373

7474
void start_thread(struct pt_regs *regs, unsigned long nip, unsigned long sp);
7575
unsigned long __get_wchan(struct task_struct *p);
76+
void show_registers(struct pt_regs *regs);
7677

7778
#define cpu_relax() barrier()
7879

arch/openrisc/kernel/process.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ void flush_thread(void)
119119

120120
void show_regs(struct pt_regs *regs)
121121
{
122-
extern void show_registers(struct pt_regs *regs);
123-
124122
show_regs_print_info(KERN_DEFAULT);
125123
/* __PHX__ cleanup this mess */
126124
show_registers(regs);

arch/openrisc/kernel/traps.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include <linux/uaccess.h>
3232

3333
#include <asm/io.h>
34+
#include <asm/processor.h>
3435
#include <asm/unwinder.h>
3536
#include <asm/sections.h>
3637

0 commit comments

Comments
 (0)