diff options
author | Namhyung Kim <namhyung@gmail.com> | 2010-10-27 18:33:54 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-27 21:03:11 -0400 |
commit | a68caa035a0ffb895baa829edec0545f17d88c07 (patch) | |
tree | 398ead5af1a4eff98c5e3b0865cea2ba8fcc0412 /arch/m32r/kernel | |
parent | 05fabdace41837a21f957507378b2954fe87ab61 (diff) |
ptrace: cleanup arch_ptrace() on m32r
Use new 'datap' variable in order to remove duplicated castings.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/m32r/kernel')
-rw-r--r-- | arch/m32r/kernel/ptrace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c index 5e00e0a41fff..20743754f2b2 100644 --- a/arch/m32r/kernel/ptrace.c +++ b/arch/m32r/kernel/ptrace.c | |||
@@ -626,6 +626,7 @@ arch_ptrace(struct task_struct *child, long request, | |||
626 | unsigned long addr, unsigned long data) | 626 | unsigned long addr, unsigned long data) |
627 | { | 627 | { |
628 | int ret; | 628 | int ret; |
629 | unsigned long __user *datap = (unsigned long __user *) data; | ||
629 | 630 | ||
630 | switch (request) { | 631 | switch (request) { |
631 | /* | 632 | /* |
@@ -640,8 +641,7 @@ arch_ptrace(struct task_struct *child, long request, | |||
640 | * read the word at location addr in the USER area. | 641 | * read the word at location addr in the USER area. |
641 | */ | 642 | */ |
642 | case PTRACE_PEEKUSR: | 643 | case PTRACE_PEEKUSR: |
643 | ret = ptrace_read_user(child, addr, | 644 | ret = ptrace_read_user(child, addr, datap); |
644 | (unsigned long __user *)data); | ||
645 | break; | 645 | break; |
646 | 646 | ||
647 | /* | 647 | /* |
@@ -662,11 +662,11 @@ arch_ptrace(struct task_struct *child, long request, | |||
662 | break; | 662 | break; |
663 | 663 | ||
664 | case PTRACE_GETREGS: | 664 | case PTRACE_GETREGS: |
665 | ret = ptrace_getregs(child, (void __user *)data); | 665 | ret = ptrace_getregs(child, datap); |
666 | break; | 666 | break; |
667 | 667 | ||
668 | case PTRACE_SETREGS: | 668 | case PTRACE_SETREGS: |
669 | ret = ptrace_setregs(child, (void __user *)data); | 669 | ret = ptrace_setregs(child, datap); |
670 | break; | 670 | break; |
671 | 671 | ||
672 | default: | 672 | default: |