Commit b640a0d1 authored by Namhyung Kim's avatar Namhyung Kim Committed by Linus Torvalds

ptrace: cleanup arch_ptrace() on ARM

use new 'datap' variable in order to remove unnecessary castings.
Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
Cc: Russell King <linux@arm.linux.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent eb5a3699
...@@ -1079,10 +1079,11 @@ long arch_ptrace(struct task_struct *child, long request, ...@@ -1079,10 +1079,11 @@ long arch_ptrace(struct task_struct *child, long request,
unsigned long addr, unsigned long data) unsigned long addr, unsigned long data)
{ {
int ret; int ret;
unsigned long __user *datap = (unsigned long __user *) data;
switch (request) { switch (request) {
case PTRACE_PEEKUSR: case PTRACE_PEEKUSR:
ret = ptrace_read_user(child, addr, (unsigned long __user *)data); ret = ptrace_read_user(child, addr, datap);
break; break;
case PTRACE_POKEUSR: case PTRACE_POKEUSR:
...@@ -1090,34 +1091,34 @@ long arch_ptrace(struct task_struct *child, long request, ...@@ -1090,34 +1091,34 @@ long arch_ptrace(struct task_struct *child, long request,
break; break;
case PTRACE_GETREGS: case PTRACE_GETREGS:
ret = ptrace_getregs(child, (void __user *)data); ret = ptrace_getregs(child, datap);
break; break;
case PTRACE_SETREGS: case PTRACE_SETREGS:
ret = ptrace_setregs(child, (void __user *)data); ret = ptrace_setregs(child, datap);
break; break;
case PTRACE_GETFPREGS: case PTRACE_GETFPREGS:
ret = ptrace_getfpregs(child, (void __user *)data); ret = ptrace_getfpregs(child, datap);
break; break;
case PTRACE_SETFPREGS: case PTRACE_SETFPREGS:
ret = ptrace_setfpregs(child, (void __user *)data); ret = ptrace_setfpregs(child, datap);
break; break;
#ifdef CONFIG_IWMMXT #ifdef CONFIG_IWMMXT
case PTRACE_GETWMMXREGS: case PTRACE_GETWMMXREGS:
ret = ptrace_getwmmxregs(child, (void __user *)data); ret = ptrace_getwmmxregs(child, datap);
break; break;
case PTRACE_SETWMMXREGS: case PTRACE_SETWMMXREGS:
ret = ptrace_setwmmxregs(child, (void __user *)data); ret = ptrace_setwmmxregs(child, datap);
break; break;
#endif #endif
case PTRACE_GET_THREAD_AREA: case PTRACE_GET_THREAD_AREA:
ret = put_user(task_thread_info(child)->tp_value, ret = put_user(task_thread_info(child)->tp_value,
(unsigned long __user *) data); datap);
break; break;
case PTRACE_SET_SYSCALL: case PTRACE_SET_SYSCALL:
...@@ -1127,21 +1128,21 @@ long arch_ptrace(struct task_struct *child, long request, ...@@ -1127,21 +1128,21 @@ long arch_ptrace(struct task_struct *child, long request,
#ifdef CONFIG_CRUNCH #ifdef CONFIG_CRUNCH
case PTRACE_GETCRUNCHREGS: case PTRACE_GETCRUNCHREGS:
ret = ptrace_getcrunchregs(child, (void __user *)data); ret = ptrace_getcrunchregs(child, datap);
break; break;
case PTRACE_SETCRUNCHREGS: case PTRACE_SETCRUNCHREGS:
ret = ptrace_setcrunchregs(child, (void __user *)data); ret = ptrace_setcrunchregs(child, datap);
break; break;
#endif #endif
#ifdef CONFIG_VFP #ifdef CONFIG_VFP
case PTRACE_GETVFPREGS: case PTRACE_GETVFPREGS:
ret = ptrace_getvfpregs(child, (void __user *)data); ret = ptrace_getvfpregs(child, datap);
break; break;
case PTRACE_SETVFPREGS: case PTRACE_SETVFPREGS:
ret = ptrace_setvfpregs(child, (void __user *)data); ret = ptrace_setvfpregs(child, datap);
break; break;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment