aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaokun Li <libaokun1@huawei.com>2021-06-09 15:18:03 +0800
committerZack Rusin <zackr@vmware.com>2021-08-09 16:49:48 -0400
commitaa841a99f240142409c31167f3a28e4c0a7ac108 (patch)
tree393bf6b1c00e6e847eb3a54a683f07c2d7573d7e
parentdrm/vmwgfx: Remove the repeated declaration (diff)
downloadlinux-dev-aa841a99f240142409c31167f3a28e4c0a7ac108.tar.xz
linux-dev-aa841a99f240142409c31167f3a28e4c0a7ac108.zip
drm/vmwgfx: Use list_move_tail instead of list_del/list_add_tail in vmwgfx_cmdbuf.c
Using list_move_tail() instead of list_del() + list_add_tail() in vmwgfx_cmdbuf.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/20210609071803.1347254-1-libaokun1@huawei.com
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
index 81b84570da0a..4579612a782d 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf.c
@@ -358,8 +358,7 @@ static void vmw_cmdbuf_ctx_submit(struct vmw_cmdbuf_man *man,
break;
}
- list_del(&entry->list);
- list_add_tail(&entry->list, &ctx->hw_submitted);
+ list_move_tail(&entry->list, &ctx->hw_submitted);
ctx->num_hw_submitted++;
}