diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2014-11-24 12:32:16 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-24 22:15:36 +0100 |
commit | 6e58040b848162d77243cf499d026c6253278e29 (patch) | |
tree | f49ca22bdbc00cc25fcd929ce91d92ba2619fc25 /net | |
parent | xen-netback: do not report success if backend_create_xenvif() fails (diff) | |
download | linux-6e58040b848162d77243cf499d026c6253278e29.tar.xz linux-6e58040b848162d77243cf499d026c6253278e29.zip |
af_packet: fix sparse warning
af_packet produces lots of these:
net/packet/af_packet.c:384:39: warning: incorrect type in return expression (different modifiers)
net/packet/af_packet.c:384:39: expected struct page [pure] *
net/packet/af_packet.c:384:39: got struct page *
this seems to be because sparse does not realize that _pure
refers to function, not the returned pointer.
Tweak code slightly to avoid the warning.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/packet/af_packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 87d20f48ff06..07c04a841ba0 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -378,7 +378,7 @@ static void unregister_prot_hook(struct sock *sk, bool sync) __unregister_prot_hook(sk, sync); } -static inline __pure struct page *pgv_to_page(void *addr) +static inline struct page * __pure pgv_to_page(void *addr) { if (is_vmalloc_addr(addr)) return vmalloc_to_page(addr); |