From: Baokun Li Date: Wed, 9 Jun 2021 07:22:48 +0000 (+0800) Subject: drm/vmwgfx: Use list_move_tail instead of list_del/list_add_tail in vmwgfx_cmdbuf_res.c X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=1cb48cf3b1da45e0bfb5046d2d43746dbdd6339e;p=kernel.git 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 Signed-off-by: Baokun Li Signed-off-by: Zack Rusin Link: https://patchwork.freedesktop.org/patch/msgid/20210609072248.1353421-1-libaokun1@huawei.com --- diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c index 9487faff52293..8381750db81b6 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: