diff options
author | Namhyung Kim <namhyung@gmail.com> | 2010-10-27 18:33:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:03:10 -0400 |
commit | 9f29b8fb416a0ad49d5077ab10ed780efdfcb126 (patch) | |
tree | 7c6eb822d6bf396424cf12b91c8b6f94d559e5df | |
parent | b640a0d192265c47bbf60951115bdb59d2c017d1 (diff) |
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>
-rw-r--r-- | arch/avr32/kernel/ptrace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/avr32/kernel/ptrace.c b/arch/avr32/kernel/ptrace.c index ecea9b6bfab4..4aedcab7cd4b 100644 --- a/arch/avr32/kernel/ptrace.c +++ b/arch/avr32/kernel/ptrace.c | |||
@@ -150,6 +150,7 @@ long arch_ptrace(struct task_struct *child, long request, | |||
150 | unsigned long addr, unsigned long data) | 150 | unsigned long addr, unsigned long data) |
151 | { | 151 | { |
152 | int ret; | 152 | int ret; |
153 | void __user *datap = (void __user *) data; | ||
153 | 154 | ||
154 | switch (request) { | 155 | switch (request) { |
155 | /* Read the word at location addr in the child process */ | 156 | /* Read the word at location addr in the child process */ |
@@ -159,8 +160,7 @@ long arch_ptrace(struct task_struct *child, long request, | |||
159 | break; | 160 | break; |
160 | 161 | ||
161 | case PTRACE_PEEKUSR: | 162 | case PTRACE_PEEKUSR: |
162 | ret = ptrace_read_user(child, addr, | 163 | ret = ptrace_read_user(child, addr, datap); |
163 | (unsigned long __user *)data); | ||
164 | break; | 164 | break; |
165 | 165 | ||
166 | /* Write the word in data at location addr */ | 166 | /* Write the word in data at location addr */ |
@@ -174,11 +174,11 @@ long arch_ptrace(struct task_struct *child, long request, | |||
174 | break; | 174 | break; |
175 | 175 | ||
176 | case PTRACE_GETREGS: | 176 | case PTRACE_GETREGS: |
177 | ret = ptrace_getregs(child, (void __user *)data); | 177 | ret = ptrace_getregs(child, datap); |
178 | break; | 178 | break; |
179 | 179 | ||
180 | case PTRACE_SETREGS: | 180 | case PTRACE_SETREGS: |
181 | ret = ptrace_setregs(child, (const void __user *)data); | 181 | ret = ptrace_setregs(child, datap); |
182 | break; | 182 | break; |
183 | 183 | ||
184 | default: | 184 | default: |