aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-10-27 18:33:51 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-27 21:03:10 -0400
commitaeebd3a3d9f5b67a254f04e6eac91a74c5e1065e (patch)
treeff74cc8470dd96e97bba0d2c83ea88df65168449 /arch/blackfin/kernel
parent9f29b8fb416a0ad49d5077ab10ed780efdfcb126 (diff)
ptrace: cleanup arch_ptrace() and friends on Blackfin
Change signature of get/put_reg() according to the change of arch_ptrace() and remove unnecessary castings. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r--arch/blackfin/kernel/ptrace.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index 8e3083ccd88a..75089f80855d 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -38,12 +38,13 @@
38 * Get contents of register REGNO in task TASK. 38 * Get contents of register REGNO in task TASK.
39 */ 39 */
40static inline long 40static inline long
41get_reg(struct task_struct *task, long regno, unsigned long __user *datap) 41get_reg(struct task_struct *task, unsigned long regno,
42 unsigned long __user *datap)
42{ 43{
43 long tmp; 44 long tmp;
44 struct pt_regs *regs = task_pt_regs(task); 45 struct pt_regs *regs = task_pt_regs(task);
45 46
46 if (regno & 3 || regno > PT_LAST_PSEUDO || regno < 0) 47 if (regno & 3 || regno > PT_LAST_PSEUDO)
47 return -EIO; 48 return -EIO;
48 49
49 switch (regno) { 50 switch (regno) {
@@ -74,11 +75,11 @@ get_reg(struct task_struct *task, long regno, unsigned long __user *datap)
74 * Write contents of register REGNO in task TASK. 75 * Write contents of register REGNO in task TASK.
75 */ 76 */
76static inline int 77static inline int
77put_reg(struct task_struct *task, long regno, unsigned long data) 78put_reg(struct task_struct *task, unsigned long regno, unsigned long data)
78{ 79{
79 struct pt_regs *regs = task_pt_regs(task); 80 struct pt_regs *regs = task_pt_regs(task);
80 81
81 if (regno & 3 || regno > PT_LAST_PSEUDO || regno < 0) 82 if (regno & 3 || regno > PT_LAST_PSEUDO)
82 return -EIO; 83 return -EIO;
83 84
84 switch (regno) { 85 switch (regno) {
@@ -369,14 +370,14 @@ long arch_ptrace(struct task_struct *child, long request,
369 return copy_regset_to_user(child, &user_bfin_native_view, 370 return copy_regset_to_user(child, &user_bfin_native_view,
370 REGSET_GENERAL, 371 REGSET_GENERAL,
371 0, sizeof(struct pt_regs), 372 0, sizeof(struct pt_regs),
372 (void __user *)data); 373 datap);
373 374
374 case PTRACE_SETREGS: 375 case PTRACE_SETREGS:
375 pr_debug("ptrace: PTRACE_SETREGS\n"); 376 pr_debug("ptrace: PTRACE_SETREGS\n");
376 return copy_regset_from_user(child, &user_bfin_native_view, 377 return copy_regset_from_user(child, &user_bfin_native_view,
377 REGSET_GENERAL, 378 REGSET_GENERAL,
378 0, sizeof(struct pt_regs), 379 0, sizeof(struct pt_regs),
379 (const void __user *)data); 380 datap);
380 381
381 case_default: 382 case_default:
382 default: 383 default: