summaryrefslogtreecommitdiff
path: root/kernel/regset.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2020-06-16 15:34:20 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2020-07-27 14:31:12 -0400
commit1e6986c9db21265bac1435a344b4446c51a3f4d8 (patch)
tree2ca7445dffcca6cf22e2d07a8bf9589fe9c5d789 /kernel/regset.c
parentdcad7854fcce6a2d49b6a3ead5bbefeff047e559 (diff)
regset: kill ->get()
no instances left Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/regset.c')
-rw-r--r--kernel/regset.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/kernel/regset.c b/kernel/regset.c
index eaeaefbbd39e..586823786f39 100644
--- a/kernel/regset.c
+++ b/kernel/regset.c
@@ -11,7 +11,7 @@ static int __regset_get(struct task_struct *target,
void *p = *data, *to_free = NULL;
int res;
- if (!regset->get && !regset->regset_get)
+ if (!regset->regset_get)
return -EOPNOTSUPP;
if (size > regset->n * regset->size)
size = regset->n * regset->size;
@@ -20,28 +20,14 @@ static int __regset_get(struct task_struct *target,
if (!p)
return -ENOMEM;
}
- if (regset->regset_get) {
- res = regset->regset_get(target, regset,
- (struct membuf){.p = p, .left = size});
- if (res < 0) {
- kfree(to_free);
- return res;
- }
- *data = p;
- return size - res;
- }
- res = regset->get(target, regset, 0, size, p, NULL);
- if (unlikely(res < 0)) {
+ res = regset->regset_get(target, regset,
+ (struct membuf){.p = p, .left = size});
+ if (res < 0) {
kfree(to_free);
return res;
}
*data = p;
- if (regset->get_size) { // arm64-only kludge, will go away
- unsigned max_size = regset->get_size(target, regset);
- if (size > max_size)
- size = max_size;
- }
- return size;
+ return size - res;
}
int regset_get(struct task_struct *target,