diff options
author | Namhyung Kim <namhyung@gmail.com> | 2010-10-27 18:34:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:03:12 -0400 |
commit | 0a3d763f1a68c97daae57e40c6d698986d1b38f4 (patch) | |
tree | b88189bb89beadc12e414c27be08c26ad837dbbd /arch/um/sys-x86_64/ptrace.c | |
parent | 8c0acac3676103113a2e259291a07c073ac07879 (diff) |
ptrace: cleanup arch_ptrace() on um
Remove unnecessary castings using void pointer and fix copy_to_user()
return value. Also add missing __user markup on the argument of
arch_ptrctl().
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/sys-x86_64/ptrace.c')
-rw-r--r-- | arch/um/sys-x86_64/ptrace.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/um/sys-x86_64/ptrace.c b/arch/um/sys-x86_64/ptrace.c index 67e63680df28..f43613643cdb 100644 --- a/arch/um/sys-x86_64/ptrace.c +++ b/arch/um/sys-x86_64/ptrace.c | |||
@@ -179,15 +179,14 @@ long subarch_ptrace(struct task_struct *child, long request, | |||
179 | unsigned long addr, unsigned long data) | 179 | unsigned long addr, unsigned long data) |
180 | { | 180 | { |
181 | int ret = -EIO; | 181 | int ret = -EIO; |
182 | void __user *datap = (void __user *) data; | ||
182 | 183 | ||
183 | switch (request) { | 184 | switch (request) { |
184 | case PTRACE_GETFPXREGS: /* Get the child FPU state. */ | 185 | case PTRACE_GETFPXREGS: /* Get the child FPU state. */ |
185 | ret = get_fpregs((struct user_i387_struct __user *) data, | 186 | ret = get_fpregs(datap, child); |
186 | child); | ||
187 | break; | 187 | break; |
188 | case PTRACE_SETFPXREGS: /* Set the child FPU state. */ | 188 | case PTRACE_SETFPXREGS: /* Set the child FPU state. */ |
189 | ret = set_fpregs((struct user_i387_struct __user *) data, | 189 | ret = set_fpregs(datap, child); |
190 | child); | ||
191 | break; | 190 | break; |
192 | } | 191 | } |
193 | 192 | ||