1
0
Files
linux/arch/powerpc/include/asm
Michael S. Tsirkin 505e428374 powerpc/uaccess: Allow get_user() with bitwise types
At the moment, if p and x are both of the same bitwise type
(eg. __le32), get_user(x, p) produces a sparse warning.

This is because *p is loaded into a long then cast back to typeof(*p).

When typeof(*p) is a bitwise type (which is uncommon), such a cast needs
__force, otherwise sparse produces a warning.

For non-bitwise types __force should have no effect, and should not hide
any legitimate errors.

Note that we are casting to typeof(*p) not typeof(x). Even with the
cast, if x and *p are of different types we should get the warning, so I
think we are not loosing the ability to detect any actual errors.

virtio would like to use bitwise types with get_user() so fix these
spurious warnings by adding __force.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
[mpe: Fill in changelog with more details]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2014-12-18 19:11:09 +11:00
..
2014-08-14 12:48:11 +02:00
2014-04-18 14:20:41 +02:00
2014-11-10 09:59:29 +11:00
2014-05-28 13:35:35 +10:00
2013-04-18 13:03:53 +10:00
2014-12-02 11:03:26 +11:00
2014-11-17 17:55:11 +11:00
2014-04-09 12:53:28 +10:00
2014-01-23 16:36:54 -08:00
2014-06-25 18:49:40 -05:00
2014-11-03 12:12:32 +11:00
2013-12-09 11:40:25 +11:00
2014-07-28 14:10:23 +10:00
2014-11-07 18:10:42 -06:00
2014-07-28 14:10:23 +10:00
2014-06-26 13:19:42 +02:00
2014-04-07 10:33:12 +10:00
2013-11-06 14:13:49 +11:00
2014-11-10 09:59:25 +11:00
2014-06-24 12:43:15 +10:00
2014-10-22 14:03:06 +11:00
2014-07-11 16:06:08 +10:00
2014-10-22 14:03:06 +11:00
2014-02-17 11:19:37 +11:00
2014-11-03 12:12:32 +11:00
2013-10-30 16:02:28 +11:00