aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/ptrace.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-10-27 18:33:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-27 21:03:10 -0400
commitb640a0d192265c47bbf60951115bdb59d2c017d1 (patch)
treea57d05fbd46cf1b1e4146227ad9e23b9fbd56af0 /arch/arm/kernel/ptrace.c
parenteb5a3699311ba8ed22b7b38ceb3bb1411e438e2a (diff)
ptrace: cleanup arch_ptrace() on ARM
use new 'datap' variable in order to remove unnecessary castings. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/arm/kernel/ptrace.c')
-rw-r--r--arch/arm/kernel/ptrace.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 9bca6165459e..3e97483abcf0 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -1079,10 +1079,11 @@ long arch_ptrace(struct task_struct *child, long request,
1079 unsigned long addr, unsigned long data) 1079 unsigned long addr, unsigned long data)
1080{ 1080{
1081 int ret; 1081 int ret;
1082 unsigned long __user *datap = (unsigned long __user *) data;
1082 1083
1083 switch (request) { 1084 switch (request) {
1084 case PTRACE_PEEKUSR: 1085 case PTRACE_PEEKUSR:
1085 ret = ptrace_read_user(child, addr, (unsigned long __user *)data); 1086 ret = ptrace_read_user(child, addr, datap);
1086 break; 1087 break;
1087 1088
1088 case PTRACE_POKEUSR: 1089 case PTRACE_POKEUSR:
@@ -1090,34 +1091,34 @@ long arch_ptrace(struct task_struct *child, long request,
1090 break; 1091 break;
1091 1092
1092 case PTRACE_GETREGS: 1093 case PTRACE_GETREGS:
1093 ret = ptrace_getregs(child, (void __user *)data); 1094 ret = ptrace_getregs(child, datap);
1094 break; 1095 break;
1095 1096
1096 case PTRACE_SETREGS: 1097 case PTRACE_SETREGS:
1097 ret = ptrace_setregs(child, (void __user *)data); 1098 ret = ptrace_setregs(child, datap);
1098 break; 1099 break;
1099 1100
1100 case PTRACE_GETFPREGS: 1101 case PTRACE_GETFPREGS:
1101 ret = ptrace_getfpregs(child, (void __user *)data); 1102 ret = ptrace_getfpregs(child, datap);
1102 break; 1103 break;
1103 1104
1104 case PTRACE_SETFPREGS: 1105 case PTRACE_SETFPREGS:
1105 ret = ptrace_setfpregs(child, (void __user *)data); 1106 ret = ptrace_setfpregs(child, datap);
1106 break; 1107 break;
1107 1108
1108#ifdef CONFIG_IWMMXT 1109#ifdef CONFIG_IWMMXT
1109 case PTRACE_GETWMMXREGS: 1110 case PTRACE_GETWMMXREGS:
1110 ret = ptrace_getwmmxregs(child, (void __user *)data); 1111 ret = ptrace_getwmmxregs(child, datap);
1111 break; 1112 break;
1112 1113
1113 case PTRACE_SETWMMXREGS: 1114 case PTRACE_SETWMMXREGS:
1114 ret = ptrace_setwmmxregs(child, (void __user *)data); 1115 ret = ptrace_setwmmxregs(child, datap);
1115 break; 1116 break;
1116#endif 1117#endif
1117 1118
1118 case PTRACE_GET_THREAD_AREA: 1119 case PTRACE_GET_THREAD_AREA:
1119 ret = put_user(task_thread_info(child)->tp_value, 1120 ret = put_user(task_thread_info(child)->tp_value,
1120 (unsigned long __user *) data); 1121 datap);
1121 break; 1122 break;
1122 1123
1123 case PTRACE_SET_SYSCALL: 1124 case PTRACE_SET_SYSCALL:
@@ -1127,21 +1128,21 @@ long arch_ptrace(struct task_struct *child, long request,
1127 1128
1128#ifdef CONFIG_CRUNCH 1129#ifdef CONFIG_CRUNCH
1129 case PTRACE_GETCRUNCHREGS: 1130 case PTRACE_GETCRUNCHREGS:
1130 ret = ptrace_getcrunchregs(child, (void __user *)data); 1131 ret = ptrace_getcrunchregs(child, datap);
1131 break; 1132 break;
1132 1133
1133 case PTRACE_SETCRUNCHREGS: 1134 case PTRACE_SETCRUNCHREGS:
1134 ret = ptrace_setcrunchregs(child, (void __user *)data); 1135 ret = ptrace_setcrunchregs(child, datap);
1135 break; 1136 break;
1136#endif 1137#endif
1137 1138
1138#ifdef CONFIG_VFP 1139#ifdef CONFIG_VFP
1139 case PTRACE_GETVFPREGS: 1140 case PTRACE_GETVFPREGS:
1140 ret = ptrace_getvfpregs(child, (void __user *)data); 1141 ret = ptrace_getvfpregs(child, datap);
1141 break; 1142 break;
1142 1143
1143 case PTRACE_SETVFPREGS: 1144 case PTRACE_SETVFPREGS:
1144 ret = ptrace_setvfpregs(child, (void __user *)data); 1145 ret = ptrace_setvfpregs(child, datap);
1145 break; 1146 break;
1146#endif 1147#endif
1147 1148