]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: Annotate bitwise IPv6 dsfield pointer cast
authorSven Eckelmann <sven@narfation.org>
Fri, 13 Dec 2019 20:24:27 +0000 (21:24 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Dec 2019 00:09:44 +0000 (16:09 -0800)
commite570c1a031c4e31e6c4e941df7ec487e9ae4d244
tree76eb473383add1ef0a0c92817fc29dd135c37c00
parente4387abf08c69e8a4abd9a7d8785b1a7ebe097f6
ipv6: Annotate bitwise IPv6 dsfield pointer cast

The sparse commit 6002ded74587 ("add a flag to warn on casts to/from
bitwise pointers") introduced a check for non-direct casts from/to
restricted datatypes (when -Wbitwise-pointer is enabled).

This triggered a warning in ipv6_get_dsfield() because sparse doesn't know
that the buffer already points to some data in the correct bitwise integer
format. This was already fixed in ipv6_change_dsfield() by the __force
attribute and can be fixed here the same way.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsfield.h