nds32: switch to ->regset_get()
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 16 Jun 2020 18:30:59 +0000 (14:30 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 27 Jul 2020 18:31:11 +0000 (14:31 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/nds32/kernel/ptrace.c

index eaaf7a9..d0eda87 100644 (file)
@@ -13,11 +13,10 @@ enum nds32_regset {
 
 static int gpr_get(struct task_struct *target,
                   const struct user_regset *regset,
-                  unsigned int pos, unsigned int count,
-                  void *kbuf, void __user * ubuf)
+                  struct membuf to)
 {
-       struct user_pt_regs *uregs = &task_pt_regs(target)->user_regs;
-       return user_regset_copyout(&pos, &count, &kbuf, &ubuf, uregs, 0, -1);
+       return membuf_write(&to, &task_pt_regs(target)->user_regs,
+                               sizeof(struct user_pt_regs));
 }
 
 static int gpr_set(struct task_struct *target, const struct user_regset *regset,
@@ -41,7 +40,7 @@ static const struct user_regset nds32_regsets[] = {
                        .n = sizeof(struct user_pt_regs) / sizeof(u32),
                        .size = sizeof(elf_greg_t),
                        .align = sizeof(elf_greg_t),
-                       .get = gpr_get,
+                       .regset_get = gpr_get,
                        .set = gpr_set}
 };