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)
commit5a717f4f8f2830f297b5511022481bdc27b9d576
tree6f074433171a53cf0b3f7e590d2ab7d5a9e4877a
parent428951161b8ab73d547c8915dcfc5fa6f10012a8
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