From: Sam Ravnborg Date: Mon, 21 Apr 2014 19:39:38 +0000 (+0200) Subject: sparc32: fix sparse warnings in unaligned_32.c X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9edfae3f69273c75905b24a445568f9e05ab0b2d;p=openwrt%2Fstaging%2Fblogic.git sparc32: fix sparse warnings in unaligned_32.c Fix following warnings: unaligned_32.c:146:15: warning: symbol 'safe_compute_effective_address' was not declared. Should it be static? unaligned_32.c:235:17: warning: symbol 'kernel_unaligned_trap' was not declared. Should it be static? unaligned_32.c:319:17: warning: symbol 'user_unaligned_trap' was not declared. Should it be static? Add proper declarations in kernel.h + setup.h Signed-off-by: Sam Ravnborg Signed-off-by: David S. Miller --- diff --git a/arch/sparc/include/asm/setup.h b/arch/sparc/include/asm/setup.h index 622145bf2e9a..fb54505e008e 100644 --- a/arch/sparc/include/asm/setup.h +++ b/arch/sparc/include/asm/setup.h @@ -42,6 +42,9 @@ extern unsigned long cmdline_memory_size; /* devices.c */ void __init device_scan(void); +/* unaligned_32.c */ +unsigned long safe_compute_effective_address(struct pt_regs *, unsigned int); + #endif extern void sun_do_break(void); diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h index 2c312a20e2a5..4f2203808008 100644 --- a/arch/sparc/kernel/kernel.h +++ b/arch/sparc/kernel/kernel.h @@ -113,6 +113,10 @@ asmlinkage int do_sys_sigstack(struct sigstack __user *ssptr, /* ptrace_32.c */ asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p); +/* unaligned_32.c */ +asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn); +asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn); + /* windows.c */ void try_to_clear_window_buffer(struct pt_regs *regs, int who); diff --git a/arch/sparc/kernel/unaligned_32.c b/arch/sparc/kernel/unaligned_32.c index c0ec89786193..c5c61b3c6b56 100644 --- a/arch/sparc/kernel/unaligned_32.c +++ b/arch/sparc/kernel/unaligned_32.c @@ -16,6 +16,10 @@ #include #include +#include + +#include "kernel.h" + enum direction { load, /* ld, ldd, ldh, ldsh */ store, /* st, std, sth, stsh */ diff --git a/arch/sparc/mm/fault_32.c b/arch/sparc/mm/fault_32.c index 775181003fd8..908e8c17c902 100644 --- a/arch/sparc/mm/fault_32.c +++ b/arch/sparc/mm/fault_32.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -140,9 +141,6 @@ static void __do_fault_siginfo(int code, int sig, struct pt_regs *regs, force_sig_info (sig, &info, current); } -extern unsigned long safe_compute_effective_address(struct pt_regs *, - unsigned int); - static unsigned long compute_si_addr(struct pt_regs *regs, int text_fault) { unsigned int insn;