Skip to content

Commit 7cd78fd

Browse files
ojedamripard
authored andcommitted
drm/qxl: remove unused count variable from qxl_surface_id_alloc()
Clang 14 in an (essentially) defconfig loongarch64 build for next-20240326 reports [1]: drivers/gpu/drm/qxl/qxl_cmd.c:424:6: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable] The variable is already unused in the version that got into the tree. Thus remove the unused variable. Fixes: f64122c ("drm: add new QXL driver. (v1.4)") Closes: https://lore.kernel.org/lkml/CANiq72mjc5t4n25SQvYSrOEhxxpXYPZ4pPzneSJHEnc3qApu2Q@mail.gmail.com/ [1] Closes: https://lore.kernel.org/all/20240327163331.GB1153323@dev-arch.thelio-3990X/ Signed-off-by: Miguel Ojeda <ojeda@kernel.org> Link: https://lore.kernel.org/r/20240327175556.233126-1-ojeda@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
1 parent 4be9075 commit 7cd78fd

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/gpu/drm/qxl/qxl_cmd.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,6 @@ int qxl_surface_id_alloc(struct qxl_device *qdev,
421421
{
422422
uint32_t handle;
423423
int idr_ret;
424-
int count = 0;
425424
again:
426425
idr_preload(GFP_ATOMIC);
427426
spin_lock(&qdev->surf_id_idr_lock);
@@ -433,7 +432,6 @@ int qxl_surface_id_alloc(struct qxl_device *qdev,
433432
handle = idr_ret;
434433

435434
if (handle >= qdev->rom->n_surfaces) {
436-
count++;
437435
spin_lock(&qdev->surf_id_idr_lock);
438436
idr_remove(&qdev->surf_id_idr, handle);
439437
spin_unlock(&qdev->surf_id_idr_lock);

0 commit comments

Comments
 (0)