Skip to content

Commit b860772

Browse files
ldr709Jeff Kirsher
authored andcommitted
igbvf: Replace spin_is_locked() with lockdep
lockdep_assert_held() is better suited to checking locking requirements, since it won't get confused when someone else holds the lock. This is also a step towards possibly removing spin_is_locked(). Signed-off-by: Lance Roy <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent 7c588c7 commit b860772

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/intel/igbvf

1 file changed

+2
-2
lines changed

drivers/net/ethernet/intel/igbvf/mbx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static s32 e1000_write_mbx_vf(struct e1000_hw *hw, u32 *msg, u16 size)
241241
s32 err;
242242
u16 i;
243243

244-
WARN_ON_ONCE(!spin_is_locked(&hw->mbx_lock));
244+
lockdep_assert_held(&hw->mbx_lock);
245245

246246
/* lock the mailbox to prevent pf/vf race condition */
247247
err = e1000_obtain_mbx_lock_vf(hw);
@@ -279,7 +279,7 @@ static s32 e1000_read_mbx_vf(struct e1000_hw *hw, u32 *msg, u16 size)
279279
s32 err;
280280
u16 i;
281281

282-
WARN_ON_ONCE(!spin_is_locked(&hw->mbx_lock));
282+
lockdep_assert_held(&hw->mbx_lock);
283283

284284
/* lock the mailbox to prevent pf/vf race condition */
285285
err = e1000_obtain_mbx_lock_vf(hw);

0 commit comments

Comments
 (0)