ptrace: cleanup arch_ptrace() on avr32

use new 'datap' variable type of void pointer in order to remove unnecessary
castings.

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Namhyung Kim 2010-10-27 15:33:50 -07:00 committed by Linus Torvalds
parent b640a0d192
commit 9f29b8fb41

View file

@ -150,6 +150,7 @@ 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;
void __user *datap = (void __user *) data;
switch (request) { switch (request) {
/* Read the word at location addr in the child process */ /* Read the word at location addr in the child process */
@ -159,8 +160,7 @@ long arch_ptrace(struct task_struct *child, long request,
break; break;
case PTRACE_PEEKUSR: case PTRACE_PEEKUSR:
ret = ptrace_read_user(child, addr, ret = ptrace_read_user(child, addr, datap);
(unsigned long __user *)data);
break; break;
/* Write the word in data at location addr */ /* Write the word in data at location addr */
@ -174,11 +174,11 @@ 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, (const void __user *)data); ret = ptrace_setregs(child, datap);
break; break;
default: default: