diff options
author | Stafford Horne <[email protected]> | 2023-08-20 09:28:19 +0100 |
---|---|---|
committer | Stafford Horne <[email protected]> | 2023-08-21 08:11:54 +0100 |
commit | 1c4de499e6134ecb048bbd80133b213c705de3e5 (patch) | |
tree | eb2832a8375ab49888f801853ed8b00b48e55dc8 /arch/openrisc/kernel/traps.c | |
parent | 232ba1630c666b37a5045781e6513cba607fb0d5 (diff) |
openrisc: Add missing prototypes for assembly called fnctions
These functions are all called from assembly files so there is no need
for a prototype in a header file, but when compiling with W=1 enabling
-Wmissing-prototypes the compiler warns:
arch/openrisc/kernel/ptrace.c:191:17: error: no previous prototype for 'do_syscall_trace_enter' [-Werror=missing-prototypes]
arch/openrisc/kernel/ptrace.c:210:17: error: no previous prototype for 'do_syscall_trace_leave' [-Werror=missing-prototypes]
arch/openrisc/kernel/signal.c:293:1: error: no previous prototype for 'do_work_pending' [-Werror=missing-prototypes]
arch/openrisc/kernel/signal.c:68:17: error: no previous prototype for '_sys_rt_sigreturn' [-Werror=missing-prototypes]
arch/openrisc/kernel/time.c:111:25: error: no previous prototype for 'timer_interrupt' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:239:17: error: no previous prototype for 'unhandled_exception' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:246:17: error: no previous prototype for 'do_fpe_trap' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:268:17: error: no previous prototype for 'do_trap' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:273:17: error: no previous prototype for 'do_unaligned_access' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:286:17: error: no previous prototype for 'do_bus_fault' [-Werror=missing-prototypes]
arch/openrisc/kernel/traps.c:462:17: error: no previous prototype for 'do_illegal_instruction' [-Werror=missing-prototypes]
arch/openrisc/mm/fault.c:44:17: error: no previous prototype for 'do_page_fault' [-Werror=missing-prototypes]
Since these are not needed in header files, fix these by adding
prototypes to the top of the respective C files.
Reported-by: Arnd Bergmann <[email protected]>
Closes: https://lore.kernel.org/linux-kernel/[email protected]/
Signed-off-by: Stafford Horne <[email protected]>
Diffstat (limited to 'arch/openrisc/kernel/traps.c')
-rw-r--r-- | arch/openrisc/kernel/traps.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/openrisc/kernel/traps.c b/arch/openrisc/kernel/traps.c index 0aa6b07efda1..afa47501118f 100644 --- a/arch/openrisc/kernel/traps.c +++ b/arch/openrisc/kernel/traps.c @@ -38,6 +38,14 @@ static int kstack_depth_to_print = 0x180; int lwa_flag; static unsigned long __user *lwa_addr; +asmlinkage void unhandled_exception(struct pt_regs *regs, int ea, int vector); +asmlinkage void do_trap(struct pt_regs *regs, unsigned long address); +asmlinkage void do_fpe_trap(struct pt_regs *regs, unsigned long address); +asmlinkage void do_unaligned_access(struct pt_regs *regs, unsigned long address); +asmlinkage void do_bus_fault(struct pt_regs *regs, unsigned long address); +asmlinkage void do_illegal_instruction(struct pt_regs *regs, + unsigned long address); + static void print_trace(void *data, unsigned long addr, int reliable) { const char *loglvl = data; |