aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/fpu/regset.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-09-23 14:59:48 +0200
committerIngo Molnar <mingo@kernel.org>2017-09-24 13:04:31 +0200
commitd7eda6c99cc75f1c41d67abf988f37a10045a370 (patch)
tree5a7d5cf7667f09682bae33e58bc10a756a026101 /arch/x86/kernel/fpu/regset.c
parentx86/fpu: Remove 'kbuf' parameter from the copy_xstate_to_user() APIs (diff)
downloadlinux-dev-d7eda6c99cc75f1c41d67abf988f37a10045a370.tar.xz
linux-dev-d7eda6c99cc75f1c41d67abf988f37a10045a370.zip
x86/fpu: Clean up parameter order in the copy_xstate_to_*() APIs
Parameter ordering is weird: int copy_xstate_to_kernel(unsigned int pos, unsigned int count, void *kbuf, struct xregs_state *xsave); int copy_xstate_to_user(unsigned int pos, unsigned int count, void __user *ubuf, struct xregs_state *xsave); 'pos' and 'count', which are attributes of the destination buffer, are listed before the destination buffer itself ... List them after the primary arguments instead. This makes the code more similar to regular memcpy() variant APIs. No change in functionality. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Eric Biggers <ebiggers3@gmail.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rik van Riel <riel@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Yu-cheng Yu <yu-cheng.yu@intel.com> Link: http://lkml.kernel.org/r/20170923130016.21448-6-mingo@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/fpu/regset.c')
-rw-r--r--arch/x86/kernel/fpu/regset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/fpu/regset.c b/arch/x86/kernel/fpu/regset.c
index fd6dbdd8fde6..ec1404194b65 100644
--- a/arch/x86/kernel/fpu/regset.c
+++ b/arch/x86/kernel/fpu/regset.c
@@ -93,9 +93,9 @@ int xstateregs_get(struct task_struct *target, const struct user_regset *regset,
if (using_compacted_format()) {
if (kbuf)
- ret = copy_xstate_to_kernel(pos, count, kbuf, xsave);
+ ret = copy_xstate_to_kernel(kbuf, xsave, pos, count);
else
- ret = copy_xstate_to_user(pos, count, ubuf, xsave);
+ ret = copy_xstate_to_user(ubuf, xsave, pos, count);
} else {
fpstate_sanitize_xstate(fpu);
/*