Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

microblaze: Fix sparse warnings - ptrace

Warning log:
CHECK arch/microblaze/kernel/ptrace.c
arch/microblaze/kernel/ptrace.c:126:11: warning: incorrect type in initializer (different address spaces)
arch/microblaze/kernel/ptrace.c:126:11: expected unknown type 2[noderef] *__pu_addr<asn:1>
arch/microblaze/kernel/ptrace.c:126:11: got unsigned long *<noident>
arch/microblaze/kernel/ptrace.c:134:17: warning: symbol 'do_syscall_trace_enter' was not declared. Should it be static?
arch/microblaze/kernel/ptrace.c:157:17: warning: symbol 'do_syscall_trace_leave' was not declared. Should it be static?

Signed-off-by: Michal Simek <monstr@monstr.eu>

+5 -1
+3
arch/microblaze/include/asm/syscall.h
··· 96 96 microblaze_set_syscall_arg(regs, i++, *args++); 97 97 } 98 98 99 + asmlinkage long do_syscall_trace_enter(struct pt_regs *regs); 100 + asmlinkage void do_syscall_trace_leave(struct pt_regs *regs); 101 + 99 102 #endif /* __ASM_MICROBLAZE_SYSCALL_H */
+2 -1
arch/microblaze/kernel/ptrace.c
··· 39 39 #include <linux/uaccess.h> 40 40 #include <asm/asm-offsets.h> 41 41 #include <asm/cacheflush.h> 42 + #include <asm/syscall.h> 42 43 #include <asm/io.h> 43 44 44 45 /* Returns the address where the register at REG_OFFS in P is stashed away. */ ··· 124 123 rval = -EIO; 125 124 126 125 if (rval == 0 && request == PTRACE_PEEKUSR) 127 - rval = put_user(val, (unsigned long *)data); 126 + rval = put_user(val, (unsigned long __user *)data); 128 127 break; 129 128 default: 130 129 rval = ptrace_request(child, request, addr, data);