From: Namhyung Kim Date: Wed, 27 Oct 2010 22:33:54 +0000 (-0700) Subject: ptrace: cleanup arch_ptrace() on m32r X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a68caa035a0ffb895baa829edec0545f17d88c07;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git ptrace: cleanup arch_ptrace() on m32r Use new 'datap' variable in order to remove duplicated castings. Signed-off-by: Namhyung Kim Cc: Hirokazu Takata Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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, unsigned long addr, unsigned long data) { int ret; + unsigned long __user *datap = (unsigned long __user *) data; switch (request) { /* @@ -640,8 +641,7 @@ arch_ptrace(struct task_struct *child, long request, * read the word at location addr in the USER area. */ case PTRACE_PEEKUSR: - ret = ptrace_read_user(child, addr, - (unsigned long __user *)data); + ret = ptrace_read_user(child, addr, datap); break; /* @@ -662,11 +662,11 @@ arch_ptrace(struct task_struct *child, long request, break; case PTRACE_GETREGS: - ret = ptrace_getregs(child, (void __user *)data); + ret = ptrace_getregs(child, datap); break; case PTRACE_SETREGS: - ret = ptrace_setregs(child, (void __user *)data); + ret = ptrace_setregs(child, datap); break; default: