aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/powernv/smp.c
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-12-14 18:52:51 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2014-12-18 19:11:09 +1100
commit505e428374bc17a2c0bd388c2e8d892e9cd8eef2 (patch)
treed2ba58ba96fc9bc9c4e7e421d9e0058ccfb22f25 /arch/powerpc/platforms/powernv/smp.c
parentpowerpc/powernv: Expose OPAL firmware symbol map (diff)
downloadlinux-dev-505e428374bc17a2c0bd388c2e8d892e9cd8eef2.tar.xz
linux-dev-505e428374bc17a2c0bd388c2e8d892e9cd8eef2.zip
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>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions