lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20221010024425.2873821-1-chenzhongjin@huawei.com>
Date:   Mon, 10 Oct 2022 10:44:25 +0800
From:   Chen Zhongjin <chenzhongjin@...wei.com>
To:     <linux-kernel@...r.kernel.org>,
        <virtualization@...ts.linux-foundation.org>,
        <spice-devel@...ts.freedesktop.org>,
        <dri-devel@...ts.freedesktop.org>
CC:     <airlied@...hat.com>, <kraxel@...hat.com>, <airlied@...il.com>,
        <daniel@...ll.ch>, <chenzhongjin@...wei.com>
Subject: [PATCH -next] 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@...wei.com>
---
 drivers/gpu/drm/qxl/qxl_cmd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
index 7b00c955cd82..fe8b179b4f5f 100644
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
+++ b/drivers/gpu/drm/qxl/qxl_cmd.c
@@ -429,7 +429,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);
@@ -441,7 +441,6 @@ int qxl_surface_id_alloc(struct qxl_device *qdev,
 	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);
-- 
2.33.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ