Re: [PATCH] af_packet: fix sparse warning

From: David Miller
Date: Mon Nov 24 2014 - 16:16:12 EST


From: "Michael S. Tsirkin" <mst@xxxxxxxxxx>
Date: Mon, 24 Nov 2014 13:32:16 +0200

> 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@xxxxxxxxxx>

Applied, please report the sparse bug if you haven't already.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/