Skip to content

Commit

Permalink
sparc32: fix sparse warnings in unaligned_32.c
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
sravnborg authored and davem330 committed Apr 29, 2014
1 parent c8c8782 commit 9edfae3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions arch/sparc/include/asm/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions arch/sparc/kernel/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 4 additions & 0 deletions arch/sparc/kernel/unaligned_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
#include <linux/smp.h>
#include <linux/perf_event.h>

#include <asm/setup.h>

#include "kernel.h"

enum direction {
load, /* ld, ldd, ldh, ldsh */
store, /* st, std, sth, stsh */
Expand Down
4 changes: 1 addition & 3 deletions arch/sparc/mm/fault_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <asm/pgtable.h>
#include <asm/openprom.h>
#include <asm/oplib.h>
#include <asm/setup.h>
#include <asm/smp.h>
#include <asm/traps.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9edfae3

Please sign in to comment.