sfc: Replace spin_is_locked() with lockdep
lockdep_assert_held() is better suited to checking locking requirements, since it only checks if the current thread holds the lock regardless of whether someone else does. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy <ldr709@gmail.com> Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com> Cc: Bert Kenward <bkenward@solarflare.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: <netdev@vger.kernel.org> Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com> Acked-by: Edward Cree <ecree@solarflare.com>
This commit is contained in:
parent
868f7a09a4
commit
013ff4a6e7
|
@ -3167,7 +3167,7 @@ struct hlist_head *efx_rps_hash_bucket(struct efx_nic *efx,
|
|||
{
|
||||
u32 hash = efx_filter_spec_hash(spec);
|
||||
|
||||
WARN_ON(!spin_is_locked(&efx->rps_hash_lock));
|
||||
lockdep_assert_held(&efx->rps_hash_lock);
|
||||
if (!efx->rps_hash_table)
|
||||
return NULL;
|
||||
return &efx->rps_hash_table[hash % EFX_ARFS_HASH_TABLE_SIZE];
|
||||
|
|
Loading…
Reference in New Issue