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 <ldr709@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
        s32 err;
        u16 i;
 
-       WARN_ON_ONCE(!spin_is_locked(&hw->mbx_lock));
+       lockdep_assert_held(&hw->mbx_lock);
 
        /* lock the mailbox to prevent pf/vf race condition */
        err = e1000_obtain_mbx_lock_vf(hw);
        s32 err;
        u16 i;
 
-       WARN_ON_ONCE(!spin_is_locked(&hw->mbx_lock));
+       lockdep_assert_held(&hw->mbx_lock);
 
        /* lock the mailbox to prevent pf/vf race condition */
        err = e1000_obtain_mbx_lock_vf(hw);