aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Zhongjin <chenzhongjin@huawei.com>2022-10-10 10:44:25 +0800
committerGerd Hoffmann <kraxel@redhat.com>2023-01-26 08:31:31 +0100
commite540d1b1703faa8b166089503d5f69fee009a1ae (patch)
treeaa68e5254bcb0530ba64444e93246b2348b2d55f
parent73e0f51de080138b235bbd3197c5a89849603226 (diff)
downloadlinux-e540d1b1703faa8b166089503d5f69fee009a1ae.tar.gz
drm/qxl: Remove unused variable 'count'
The variable 'count' is introduced in this commit 'commit f64122c1f6ad("drm: add new QXL driver. (v1.4)")' However, since introduced it was just iterated and never been used. Remove it for code cleaning. Signed-off-by: Chen Zhongjin <chenzhongjin@huawei.com> Link: http://patchwork.freedesktop.org/patch/msgid/20221010024425.2873821-1-chenzhongjin@huawei.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--drivers/gpu/drm/qxl/qxl_cmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
index 281edab518cd..2e643fd81be0 100644
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
+++ b/drivers/gpu/drm/qxl/qxl_cmd.c
@@ -421,7 +421,7 @@ int qxl_surface_id_alloc(struct qxl_device *qdev,
{
uint32_t handle;
int idr_ret;
- int count = 0;
+
again:
idr_preload(GFP_ATOMIC);
spin_lock(&qdev->surf_id_idr_lock);
@@ -433,7 +433,6 @@ again:
handle = idr_ret;
if (handle >= qdev->rom->n_surfaces) {
- count++;
spin_lock(&qdev->surf_id_idr_lock);
idr_remove(&qdev->surf_id_idr, handle);
spin_unlock(&qdev->surf_id_idr_lock);