diff options
| author | Namhyung Kim <namhyung@gmail.com> | 2010-10-27 18:33:58 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:03:11 -0400 |
| commit | fb671139a27abc44303ef938c3811d910724c493 (patch) | |
| tree | 626528459e8a3624995cd37ae947d448eeccd699 | |
| parent | cfd866f6bd1549fb25f826c469120a8eaee4fc1a (diff) | |
ptrace: cleanup arch_ptrace() on MIPS
Use new 'addrp', 'datavp' and 'datalp' variables in order to remove
unnecessary castings.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
| -rw-r--r-- | arch/mips/kernel/ptrace.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 95c3ae8b198..d21c388c011 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c | |||
| @@ -259,6 +259,9 @@ long arch_ptrace(struct task_struct *child, long request, | |||
| 259 | unsigned long addr, unsigned long data) | 259 | unsigned long addr, unsigned long data) |
| 260 | { | 260 | { |
| 261 | int ret; | 261 | int ret; |
| 262 | void __user *addrp = (void __user *) addr; | ||
| 263 | void __user *datavp = (void __user *) data; | ||
| 264 | unsigned long __user *datalp = (void __user *) data; | ||
| 262 | 265 | ||
| 263 | switch (request) { | 266 | switch (request) { |
| 264 | /* when I and D space are separate, these will need to be fixed. */ | 267 | /* when I and D space are separate, these will need to be fixed. */ |
| @@ -387,7 +390,7 @@ long arch_ptrace(struct task_struct *child, long request, | |||
| 387 | ret = -EIO; | 390 | ret = -EIO; |
| 388 | goto out; | 391 | goto out; |
| 389 | } | 392 | } |
| 390 | ret = put_user(tmp, (unsigned long __user *) data); | 393 | ret = put_user(tmp, datalp); |
| 391 | break; | 394 | break; |
| 392 | } | 395 | } |
| 393 | 396 | ||
| @@ -479,34 +482,31 @@ long arch_ptrace(struct task_struct *child, long request, | |||
| 479 | } | 482 | } |
| 480 | 483 | ||
| 481 | case PTRACE_GETREGS: | 484 | case PTRACE_GETREGS: |
| 482 | ret = ptrace_getregs(child, (__s64 __user *) data); | 485 | ret = ptrace_getregs(child, datavp); |
| 483 | break; | 486 | break; |
| 484 | 487 | ||
| 485 | case PTRACE_SETREGS: | 488 | case PTRACE_SETREGS: |
| 486 | ret = ptrace_setregs(child, (__s64 __user *) data); | 489 | ret = ptrace_setregs(child, datavp); |
| 487 | break; | 490 | break; |
| 488 | 491 | ||
| 489 | case PTRACE_GETFPREGS: | 492 | case PTRACE_GETFPREGS: |
| 490 | ret = ptrace_getfpregs(child, (__u32 __user *) data); | 493 | ret = ptrace_getfpregs(child, datavp); |
| 491 | break; | 494 | break; |
| 492 | 495 | ||
| 493 | case PTRACE_SETFPREGS: | 496 | case PTRACE_SETFPREGS: |
| 494 | ret = ptrace_setfpregs(child, (__u32 __user *) data); | 497 | ret = ptrace_setfpregs(child, datavp); |
| 495 | break; | 498 | break; |
| 496 | 499 | ||
| 497 | case PTRACE_GET_THREAD_AREA: | 500 | case PTRACE_GET_THREAD_AREA: |
| 498 | ret = put_user(task_thread_info(child)->tp_value, | 501 | ret = put_user(task_thread_info(child)->tp_value, datalp); |
| 499 | (unsigned long __user *) data); | ||
| 500 | break; | 502 | break; |
| 501 | 503 | ||
| 502 | case PTRACE_GET_WATCH_REGS: | 504 | case PTRACE_GET_WATCH_REGS: |
| 503 | ret = ptrace_get_watch_regs(child, | 505 | ret = ptrace_get_watch_regs(child, addrp); |
| 504 | (struct pt_watch_regs __user *) addr); | ||
| 505 | break; | 506 | break; |
| 506 | 507 | ||
| 507 | case PTRACE_SET_WATCH_REGS: | 508 | case PTRACE_SET_WATCH_REGS: |
| 508 | ret = ptrace_set_watch_regs(child, | 509 | ret = ptrace_set_watch_regs(child, addrp); |
| 509 | (struct pt_watch_regs __user *) addr); | ||
| 510 | break; | 510 | break; |
| 511 | 511 | ||
| 512 | default: | 512 | default: |
