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>
This commit is contained in:
parent
9f29b8fb41
commit
aeebd3a3d9
|
@ -38,12 +38,13 @@
|
||||||
* Get contents of register REGNO in task TASK.
|
* Get contents of register REGNO in task TASK.
|
||||||
*/
|
*/
|
||||||
static inline long
|
static inline long
|
||||||
get_reg(struct task_struct *task, long regno, unsigned long __user *datap)
|
get_reg(struct task_struct *task, unsigned long regno,
|
||||||
|
unsigned long __user *datap)
|
||||||
{
|
{
|
||||||
long tmp;
|
long tmp;
|
||||||
struct pt_regs *regs = task_pt_regs(task);
|
struct pt_regs *regs = task_pt_regs(task);
|
||||||
|
|
||||||
if (regno & 3 || regno > PT_LAST_PSEUDO || regno < 0)
|
if (regno & 3 || regno > PT_LAST_PSEUDO)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
switch (regno) {
|
switch (regno) {
|
||||||
|
@ -74,11 +75,11 @@ get_reg(struct task_struct *task, long regno, unsigned long __user *datap)
|
||||||
* Write contents of register REGNO in task TASK.
|
* Write contents of register REGNO in task TASK.
|
||||||
*/
|
*/
|
||||||
static inline int
|
static inline int
|
||||||
put_reg(struct task_struct *task, long regno, unsigned long data)
|
put_reg(struct task_struct *task, unsigned long regno, unsigned long data)
|
||||||
{
|
{
|
||||||
struct pt_regs *regs = task_pt_regs(task);
|
struct pt_regs *regs = task_pt_regs(task);
|
||||||
|
|
||||||
if (regno & 3 || regno > PT_LAST_PSEUDO || regno < 0)
|
if (regno & 3 || regno > PT_LAST_PSEUDO)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
switch (regno) {
|
switch (regno) {
|
||||||
|
@ -369,14 +370,14 @@ long arch_ptrace(struct task_struct *child, long request,
|
||||||
return copy_regset_to_user(child, &user_bfin_native_view,
|
return copy_regset_to_user(child, &user_bfin_native_view,
|
||||||
REGSET_GENERAL,
|
REGSET_GENERAL,
|
||||||
0, sizeof(struct pt_regs),
|
0, sizeof(struct pt_regs),
|
||||||
(void __user *)data);
|
datap);
|
||||||
|
|
||||||
case PTRACE_SETREGS:
|
case PTRACE_SETREGS:
|
||||||
pr_debug("ptrace: PTRACE_SETREGS\n");
|
pr_debug("ptrace: PTRACE_SETREGS\n");
|
||||||
return copy_regset_from_user(child, &user_bfin_native_view,
|
return copy_regset_from_user(child, &user_bfin_native_view,
|
||||||
REGSET_GENERAL,
|
REGSET_GENERAL,
|
||||||
0, sizeof(struct pt_regs),
|
0, sizeof(struct pt_regs),
|
||||||
(const void __user *)data);
|
datap);
|
||||||
|
|
||||||
case_default:
|
case_default:
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue