Skip to content

Commit 4e5e7ea

Browse files
author
Al Viro
committed
h8300: switch to ->regset_get()
Signed-off-by: Al Viro <[email protected]>
1 parent f04b2b7 commit 4e5e7ea

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

arch/h8300/kernel/ptrace.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,20 +87,15 @@ int h8300_put_reg(struct task_struct *task, int regno, unsigned long data)
8787

8888
static int regs_get(struct task_struct *target,
8989
const struct user_regset *regset,
90-
unsigned int pos, unsigned int count,
91-
void *kbuf, void __user *ubuf)
90+
struct membuf to)
9291
{
9392
int r;
94-
struct user_regs_struct regs;
95-
long *reg = (long *)&regs;
9693

97-
/* build user regs in buffer */
98-
BUILD_BUG_ON(sizeof(regs) % sizeof(long) != 0);
99-
for (r = 0; r < sizeof(regs) / sizeof(long); r++)
100-
*reg++ = h8300_get_reg(target, r);
94+
BUILD_BUG_ON(sizeof(struct user_regs_struct) % sizeof(long) != 0);
95+
for (r = 0; r < ELF_NGREG; r++)
96+
membuf_store(&to, h8300_get_reg(target, r));
10197

102-
return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
103-
&regs, 0, sizeof(regs));
98+
return 0;
10499
}
105100

106101
static int regs_set(struct task_struct *target,
@@ -139,7 +134,7 @@ static const struct user_regset h8300_regsets[] = {
139134
.n = ELF_NGREG,
140135
.size = sizeof(long),
141136
.align = sizeof(long),
142-
.get = regs_get,
137+
.regset_get = regs_get,
143138
.set = regs_set,
144139
},
145140
};

0 commit comments

Comments
 (0)