From: David S. Miller Date: Wed, 26 Mar 2008 07:46:21 +0000 (-0700) Subject: [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/ptrace.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bfdf9ebc396a2373af2f1d117491dc6bbdc9ee75;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [SPARC64]: Fix sparse warnings in arch/sparc64/kernel/ptrace.c Signed-off-by: David S. Miller --- diff --git a/arch/sparc64/kernel/entry.h b/arch/sparc64/kernel/entry.h index e66d94c7caff..0d0de9c32a80 100644 --- a/arch/sparc64/kernel/entry.h +++ b/arch/sparc64/kernel/entry.h @@ -1,8 +1,9 @@ #ifndef _ENTRY_H #define _ENTRY_H -#include +#include #include +#include extern char *sparc_cpu_type; extern char *sparc_fpu_type; @@ -13,6 +14,9 @@ extern void __init boot_cpu_id_too_large(int cpu); extern unsigned int dcache_parity_tl1_occurred; extern unsigned int icache_parity_tl1_occurred; +extern asmlinkage void syscall_trace(struct pt_regs *regs, + int syscall_exit_p); + extern void bad_trap_tl1(struct pt_regs *regs, long lvl); extern void do_fpe_common(struct pt_regs *regs); diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c index 9a1ba1fe859d..4b31d2ff69bf 100644 --- a/arch/sparc64/kernel/ptrace.c +++ b/arch/sparc64/kernel/ptrace.c @@ -35,6 +35,9 @@ #include #include #include +#include + +#include "entry.h" /* #define ALLOW_INIT_TRACING */ @@ -807,11 +810,14 @@ struct fps { long arch_ptrace(struct task_struct *child, long request, long addr, long data) { const struct user_regset_view *view = task_user_regset_view(child); - struct pt_regs __user *pregs = (struct pt_regs __user *) addr; unsigned long addr2 = task_pt_regs(current)->u_regs[UREG_I4]; - struct fps __user *fps = (struct fps __user *) addr; + struct pt_regs __user *pregs; + struct fps __user *fps; int ret; + pregs = (struct pt_regs __user *) (unsigned long) addr; + fps = (struct fps __user *) (unsigned long) addr; + switch (request) { case PTRACE_PEEKUSR: ret = (addr != 0) ? -EIO : 0;