Revision 505e428374bc17a2c0bd388c2e8d892e9cd8eef2 authored by Michael S. Tsirkin on 14 December 2014, 16:52:51 UTC, committed by Michael Ellerman on 18 December 2014, 08:11:09 UTC
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>
1 parent c8742f8
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 1.2 KB |
Makefile | -rw-r--r-- | 359 bytes |
addr.c | -rw-r--r-- | 3.2 KB |
addr.h | -rw-r--r-- | 3.1 KB |
bcast.c | -rw-r--r-- | 24.7 KB |
bcast.h | -rw-r--r-- | 3.7 KB |
bearer.c | -rw-r--r-- | 15.9 KB |
bearer.h | -rw-r--r-- | 7.1 KB |
config.c | -rw-r--r-- | 10.4 KB |
config.h | -rw-r--r-- | 2.7 KB |
core.c | -rw-r--r-- | 4.8 KB |
core.h | -rw-r--r-- | 6.3 KB |
discover.c | -rw-r--r-- | 12.3 KB |
discover.h | -rw-r--r-- | 2.2 KB |
eth_media.c | -rw-r--r-- | 3.7 KB |
ib_media.c | -rw-r--r-- | 3.6 KB |
link.c | -rw-r--r-- | 63.5 KB |
link.h | -rw-r--r-- | 10.2 KB |
log.c | -rw-r--r-- | 2.2 KB |
msg.c | -rw-r--r-- | 12.5 KB |
msg.h | -rw-r--r-- | 15.5 KB |
name_distr.c | -rw-r--r-- | 10.7 KB |
name_distr.h | -rw-r--r-- | 3.1 KB |
name_table.c | -rw-r--r-- | 26.3 KB |
name_table.h | -rw-r--r-- | 4.1 KB |
net.c | -rw-r--r-- | 5.9 KB |
net.h | -rw-r--r-- | 1.9 KB |
netlink.c | -rw-r--r-- | 3.3 KB |
node.c | -rw-r--r-- | 15.7 KB |
node.h | -rw-r--r-- | 6.2 KB |
node_subscr.c | -rw-r--r-- | 3.3 KB |
node_subscr.h | -rw-r--r-- | 2.7 KB |
server.c | -rw-r--r-- | 13.7 KB |
server.h | -rw-r--r-- | 3.5 KB |
socket.c | -rw-r--r-- | 71.0 KB |
socket.h | -rw-r--r-- | 2.3 KB |
subscr.c | -rw-r--r-- | 11.1 KB |
subscr.h | -rw-r--r-- | 3.2 KB |
sysctl.c | -rw-r--r-- | 2.5 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...