]> git.baikalelectronics.ru Git - kernel.git/commit
netdevice: fix sparse warning for HARD_TX_LOCK
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 24 Nov 2016 05:04:08 +0000 (07:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 27 Nov 2016 20:28:35 +0000 (15:28 -0500)
commit851f4d08bd527492c0a8d1076833492e23d9975d
tree6f074433171a53cf0b3f7e590d2ab7d5a9e4877a
parent447692e45c25a2d2c438c4197e0f07b0ef69fa5e
netdevice: fix sparse warning for HARD_TX_LOCK

sparse warns about context imbalance in any code
that uses HARD_TX_LOCK/UNLOCK - this is because it's
unable to determine that flags don't change so
lock and unlock are paired.

Seems easy enough to fix by adding __acquire/__release
calls.

With this patch af_packet.c is now sparse-clean,

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h