Skip to contentSkip to conversation

sh: fix ptrace copy_from/to_user() compilation error

PATCH New Magnus Damm 1 participant 1 message Feb 8, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: fix ptrace copy_from/to_user() compilation error

This patch makes the 32-bit ptrace code compile again.

---

 arch/sh/kernel/ptrace_32.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/sh/kernel/ptrace_32.c +2 -2
@@ -220,7 +220,7 @@ long arch_ptrace(struct task_struct *chi
 		dp = ((unsigned long) child) + THREAD_SIZE -
 			 sizeof(struct pt_dspregs);
 		if (*((int *) (dp - 4)) = SR_FD) {
-			copy_to_user(addr, (void *) dp,
+			copy_to_user((void *)addr, (void *) dp,
 				sizeof(struct pt_dspregs));
 			ret = 0;
 		}
@@ -234,7 +234,7 @@ long arch_ptrace(struct task_struct *chi
 		dp = ((unsigned long) child) + THREAD_SIZE -
 			 sizeof(struct pt_dspregs);
 		if (*((int *) (dp - 4)) = SR_FD) {
-			copy_from_user((void *) dp, addr,
+			copy_from_user((void *) dp, (void *)addr,
 				sizeof(struct pt_dspregs));
 			ret = 0;
 		}