h8300: switch to ->regset_get()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2020-06-16 14:13:39 -04:00
parent f04b2b7cde
commit 4e5e7ea48e
1 changed files with 6 additions and 11 deletions

View File

@ -87,20 +87,15 @@ int h8300_put_reg(struct task_struct *task, int regno, unsigned long data)
static int regs_get(struct task_struct *target,
const struct user_regset *regset,
unsigned int pos, unsigned int count,
void *kbuf, void __user *ubuf)
struct membuf to)
{
int r;
struct user_regs_struct regs;
long *reg = (long *)&regs;
/* build user regs in buffer */
BUILD_BUG_ON(sizeof(regs) % sizeof(long) != 0);
for (r = 0; r < sizeof(regs) / sizeof(long); r++)
*reg++ = h8300_get_reg(target, r);
BUILD_BUG_ON(sizeof(struct user_regs_struct) % sizeof(long) != 0);
for (r = 0; r < ELF_NGREG; r++)
membuf_store(&to, h8300_get_reg(target, r));
return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
&regs, 0, sizeof(regs));
return 0;
}
static int regs_set(struct task_struct *target,
@ -139,7 +134,7 @@ static const struct user_regset h8300_regsets[] = {
.n = ELF_NGREG,
.size = sizeof(long),
.align = sizeof(long),
.get = regs_get,
.regset_get = regs_get,
.set = regs_set,
},
};