diff options
author | Mathias Krause <minipli@googlemail.com> | 2012-09-02 17:31:44 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-09-05 04:52:25 -0400 |
commit | 5c7d03e99cb1ed449328ed9fba0c632944d39e7e (patch) | |
tree | d70916626c504cc0fb005b11cb1951277a81a1c4 | |
parent | 04d695a6828bca54d53305246545cd1f8a841ac6 (diff) |
x86/fpu/xsave: Keep __user annotation in casts
Don't remove the __user annotation of the fpstate pointer, but
drop the superfluous void * cast instead.
This fixes the following sparse warnings:
xsave.c:135:15: warning: cast removes address space of expression
xsave.c:135:15: warning: incorrect type in argument 1 (different address spaces)
xsave.c:135:15: expected void const volatile [noderef] <asn:1>*<noident>
[...]
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Link: http://lkml.kernel.org/r/1346621506-30857-6-git-send-email-minipli@googlemail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/kernel/xsave.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/xsave.c b/arch/x86/kernel/xsave.c index 3d3e20709119..9e1a8a7ba6e6 100644 --- a/arch/x86/kernel/xsave.c +++ b/arch/x86/kernel/xsave.c | |||
@@ -132,9 +132,9 @@ int check_for_xstate(struct i387_fxsave_struct __user *buf, | |||
132 | fx_sw_user->xstate_size > fx_sw_user->extended_size) | 132 | fx_sw_user->xstate_size > fx_sw_user->extended_size) |
133 | return -EINVAL; | 133 | return -EINVAL; |
134 | 134 | ||
135 | err = __get_user(magic2, (__u32 *) (((void *)fpstate) + | 135 | err = __get_user(magic2, (__u32 __user *) (fpstate + |
136 | fx_sw_user->extended_size - | 136 | fx_sw_user->extended_size - |
137 | FP_XSTATE_MAGIC2_SIZE)); | 137 | FP_XSTATE_MAGIC2_SIZE)); |
138 | if (err) | 138 | if (err) |
139 | return err; | 139 | return err; |
140 | /* | 140 | /* |