Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sfc: add missing annotation for efx_ef10_try_update_nic_stats_vf()

Sparse reports a warning at efx_ef10_try_update_nic_stats_vf()
warning: context imbalance in efx_ef10_try_update_nic_stats_vf()
- unexpected unlock
The root cause is the missing annotation at
efx_ef10_try_update_nic_stats_vf()
Add the missing _must_hold(&efx->stats_lock) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jules Irenge and committed by
David S. Miller
efd7ed0f 6abde0b2

+1
+1
drivers/net/ethernet/sfc/ef10.c
··· 1819 1819 } 1820 1820 1821 1821 static int efx_ef10_try_update_nic_stats_vf(struct efx_nic *efx) 1822 + __must_hold(&efx->stats_lock) 1822 1823 { 1823 1824 MCDI_DECLARE_BUF(inbuf, MC_CMD_MAC_STATS_IN_LEN); 1824 1825 struct efx_ef10_nic_data *nic_data = efx->nic_data;