aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2021-06-09 15:22:48 +0800
committerZack Rusin <zackr@vmware.com>2021-08-09 17:29:32 -0400
commit1cb48cf3b1da45e0bfb5046d2d43746dbdd6339e (patch)
tree2dd69886fd9b211e93070e0c24cf2b06099efa4e /drivers/gpu/drm/vmwgfx
parentdrm/vmwgfx: Use list_move_tail instead of list_del/list_add_tail in vmwgfx_cmdbuf.c (diff)
downloadlinux-dev-1cb48cf3b1da45e0bfb5046d2d43746dbdd6339e.tar.xz
linux-dev-1cb48cf3b1da45e0bfb5046d2d43746dbdd6339e.zip
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: Hulk Robot <hulkci@huawei.com> Signed-off-by: Baokun Li <libaokun1@huawei.com> Signed-off-by: Zack Rusin <zackr@vmware.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210609072248.1353421-1-libaokun1@huawei.com
Diffstat (limited to 'drivers/gpu/drm/vmwgfx')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
index 9487faff5229..8381750db81b 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
@@ -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: