aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-10-27 18:34:06 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-27 21:03:12 -0400
commit5ef45079dd9c8f2e9c7aa788dc3121835ae52863 (patch)
tree47f8cd54f6663ea960f78404fe29cef5c250dc68 /arch/xtensa
parent0a3d763f1a68c97daae57e40c6d698986d1b38f4 (diff)
ptrace: cleanup arch_ptrace() on xtensa
Use new 'datap' variable in order to remove unnecessary castings. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: Chris Zankel <chris@zankel.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/kernel/ptrace.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c
index af9ba80f254c..c72c9473ef99 100644
--- a/arch/xtensa/kernel/ptrace.c
+++ b/arch/xtensa/kernel/ptrace.c
@@ -260,6 +260,7 @@ long arch_ptrace(struct task_struct *child, long request,
260 unsigned long addr, unsigned long data) 260 unsigned long addr, unsigned long data)
261{ 261{
262 int ret = -EPERM; 262 int ret = -EPERM;
263 void __user *datap = (void __user *) data;
263 264
264 switch (request) { 265 switch (request) {
265 case PTRACE_PEEKTEXT: /* read word at location addr. */ 266 case PTRACE_PEEKTEXT: /* read word at location addr. */
@@ -268,7 +269,7 @@ long arch_ptrace(struct task_struct *child, long request,
268 break; 269 break;
269 270
270 case PTRACE_PEEKUSR: /* read register specified by addr. */ 271 case PTRACE_PEEKUSR: /* read register specified by addr. */
271 ret = ptrace_peekusr(child, addr, (void __user *) data); 272 ret = ptrace_peekusr(child, addr, datap);
272 break; 273 break;
273 274
274 case PTRACE_POKETEXT: /* write the word at location addr. */ 275 case PTRACE_POKETEXT: /* write the word at location addr. */
@@ -281,19 +282,19 @@ long arch_ptrace(struct task_struct *child, long request,
281 break; 282 break;
282 283
283 case PTRACE_GETREGS: 284 case PTRACE_GETREGS:
284 ret = ptrace_getregs(child, (void __user *) data); 285 ret = ptrace_getregs(child, datap);
285 break; 286 break;
286 287
287 case PTRACE_SETREGS: 288 case PTRACE_SETREGS:
288 ret = ptrace_setregs(child, (void __user *) data); 289 ret = ptrace_setregs(child, datap);
289 break; 290 break;
290 291
291 case PTRACE_GETXTREGS: 292 case PTRACE_GETXTREGS:
292 ret = ptrace_getxregs(child, (void __user *) data); 293 ret = ptrace_getxregs(child, datap);
293 break; 294 break;
294 295
295 case PTRACE_SETXTREGS: 296 case PTRACE_SETXTREGS:
296 ret = ptrace_setxregs(child, (void __user *) data); 297 ret = ptrace_setxregs(child, datap);
297 break; 298 break;
298 299
299 default: 300 default: