drm/vmwgfx: Replace unconditional mutex unlocked warnings with lockdep counterpart
Replace instances of WARN_ON[_ONCE](!mutex_is_held()) with lockdep_assert_held(). This makes sure the checking process actually holds the mutex and also removes the checks from release builds Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Deepak Rawat <drawat@vmware.com>
This commit is contained in:
@@ -562,7 +562,7 @@ void vmw_dx_shader_cotable_list_scrub(struct vmw_private *dev_priv,
|
||||
{
|
||||
struct vmw_dx_shader *entry, *next;
|
||||
|
||||
WARN_ON_ONCE(!mutex_is_locked(&dev_priv->binding_mutex));
|
||||
lockdep_assert_held_once(&dev_priv->binding_mutex);
|
||||
|
||||
list_for_each_entry_safe(entry, next, list, cotable_head) {
|
||||
WARN_ON(vmw_dx_shader_scrub(&entry->res));
|
||||
|
Reference in New Issue
Block a user