Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

authored by

Baokun Li and committed by
Zack Rusin
1cb48cf3 aa841a99

+1 -2
+1 -2
drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
··· 169 169 case VMW_CMDBUF_RES_DEL: 170 170 ret = drm_ht_insert_item(&entry->man->resources, &entry->hash); 171 171 BUG_ON(ret); 172 - list_del(&entry->head); 173 - list_add_tail(&entry->head, &entry->man->list); 172 + list_move_tail(&entry->head, &entry->man->list); 174 173 entry->state = VMW_CMDBUF_RES_COMMITTED; 175 174 break; 176 175 default: