Commit 31c67b5f authored by Stafford Horne's avatar Stafford Horne

openrisc: Add prototype for die to bug.h

When compiling with W=1 enabling -Wmissing-prototypes the compiler
warns:

  arch/openrisc/kernel/traps.c:221:17: sing-prototypesrror: no previous prototype for 'die' [-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: default avatarArnd Bergmann <arnd@arndb.de>
Closes: https://lore.kernel.org/linux-kernel/20230810141947.1236730-17-arnd@kernel.org/Signed-off-by: default avatarStafford Horne <shorne@gmail.com>
parent 8d4a1429
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __ASM_OPENRISC_BUG_H
#define __ASM_OPENRISC_BUG_H
#include <asm-generic/bug.h>
struct pt_regs;
void __noreturn die(const char *str, struct pt_regs *regs, long err);
#endif /* __ASM_OPENRISC_BUG_H */
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/kallsyms.h> #include <linux/kallsyms.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/bug.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/unwinder.h> #include <asm/unwinder.h>
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/perf_event.h> #include <linux/perf_event.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <asm/bug.h>
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/siginfo.h> #include <asm/siginfo.h>
#include <asm/signal.h> #include <asm/signal.h>
...@@ -30,8 +31,6 @@ ...@@ -30,8 +31,6 @@
*/ */
volatile pgd_t *current_pgd[NR_CPUS]; volatile pgd_t *current_pgd[NR_CPUS];
extern void __noreturn die(char *, struct pt_regs *, long);
asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address, asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long address,
unsigned long vector, int write_acc); unsigned long vector, int write_acc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment