]> git.baikalelectronics.ru Git - kernel.git/commit
af_packet: fix sparse warning
authorMichael S. Tsirkin <mst@redhat.com>
Mon, 24 Nov 2014 11:32:16 +0000 (13:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Nov 2014 21:15:36 +0000 (16:15 -0500)
commit79a419cd8f0e81d3f1792d5475f6d0986b8c8e4d
treef49ca22bdbc00cc25fcd929ce91d92ba2619fc25
parentf20b25dd89b1b0e23a329774f1ac784a1d9a8302
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>
net/packet/af_packet.c