Commit 1cb48cf3 authored by Baokun Li's avatar Baokun Li Committed by Zack Rusin

drm/vmwgfx: Use list_move_tail instead of list_del/list_add_tail in vmwgfx_cmdbuf_res.c

Using list_move_tail() instead of list_del() + list_add_tail() in vmwgfx_cmdbuf_res.c.
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarBaokun Li <libaokun1@huawei.com>
Signed-off-by: default avatarZack Rusin <zackr@vmware.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210609072248.1353421-1-libaokun1@huawei.com
parent aa841a99
......@@ -169,8 +169,7 @@ void vmw_cmdbuf_res_revert(struct list_head *list)
case VMW_CMDBUF_RES_DEL:
ret = drm_ht_insert_item(&entry->man->resources, &entry->hash);
BUG_ON(ret);
list_del(&entry->head);
list_add_tail(&entry->head, &entry->man->list);
list_move_tail(&entry->head, &entry->man->list);
entry->state = VMW_CMDBUF_RES_COMMITTED;
break;
default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment