diff --git a/patches.suse/drm-qxl-remove-unused-count-variable-from-qxl_surfac.patch b/patches.suse/drm-qxl-remove-unused-count-variable-from-qxl_surfac.patch new file mode 100644 index 0000000..a33de2b --- /dev/null +++ b/patches.suse/drm-qxl-remove-unused-count-variable-from-qxl_surfac.patch @@ -0,0 +1,53 @@ +From 7cd78fd7e29644641b848d69a585f2aea45f0991 Mon Sep 17 00:00:00 2001 +From: Miguel Ojeda +Date: Wed, 27 Mar 2024 18:55:55 +0100 +Subject: [PATCH] drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()` +Git-commit: 7cd78fd7e29644641b848d69a585f2aea45f0991 +Patch-mainline: v6.9-rc2 +References: git-fixes + +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: f64122c1f6ad ("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 +Link: https://lore.kernel.org/r/20240327175556.233126-1-ojeda@kernel.org +Signed-off-by: Maxime Ripard +Acked-by: Takashi Iwai + +--- + drivers/gpu/drm/qxl/qxl_cmd.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c +index 281edab518cd..d6ea01f3797b 100644 +--- a/drivers/gpu/drm/qxl/qxl_cmd.c ++++ b/drivers/gpu/drm/qxl/qxl_cmd.c +@@ -421,7 +421,6 @@ 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 +432,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.43.0 + diff --git a/series.conf b/series.conf index 7c512e7..9fe2f48 100644 --- a/series.conf +++ b/series.conf @@ -45898,6 +45898,7 @@ patches.suse/ACPICA-debugger-check-status-of-acpi_evaluate_object.patch patches.suse/nouveau-dmem-handle-kcalloc-allocation-failure.patch patches.suse/drm-vmwgfx-Create-debugfs-ttm_resource_manager-entry.patch + patches.suse/drm-qxl-remove-unused-count-variable-from-qxl_surfac.patch # jejb/scsi for-next patches.suse/scsi-lpfc-Initialize-status-local-variable-in-lpfc_s.patch