* [PATCH 1/2] drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()`
@ 2024-03-27 17:55 Miguel Ojeda
2024-03-27 17:55 ` [PATCH 2/2] drm/qxl: remove unused variable from `qxl_process_single_command()` Miguel Ojeda
2024-03-27 18:14 ` [PATCH 1/2] drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()` Miguel Ojeda
0 siblings, 2 replies; 5+ messages in thread
From: Miguel Ojeda @ 2024-03-27 17:55 UTC (permalink / raw)
To: Dave Airlie, Gerd Hoffmann, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann
Cc: David Airlie, Daniel Vetter, Alon Levy, Frediano Ziglio,
Miguel Ojeda, virtualization, spice-devel, dri-devel,
linux-kernel
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/
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
Given there is a loop going on here, it would be good to double-check whether
this variable was supposed to be used for something useful or if it was just a
remnant of a version previous to v1.4.
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);
base-commit: 26074e1be23143b2388cacb36166766c235feb7c
--
2.44.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] drm/qxl: remove unused variable from `qxl_process_single_command()`
2024-03-27 17:55 [PATCH 1/2] drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()` Miguel Ojeda
@ 2024-03-27 17:55 ` Miguel Ojeda
2024-03-27 18:14 ` [PATCH 1/2] drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()` Miguel Ojeda
1 sibling, 0 replies; 5+ messages in thread
From: Miguel Ojeda @ 2024-03-27 17:55 UTC (permalink / raw)
To: Dave Airlie, Gerd Hoffmann, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann
Cc: David Airlie, Daniel Vetter, Alon Levy, Frediano Ziglio,
Miguel Ojeda, virtualization, spice-devel, dri-devel,
linux-kernel
Clang 14 in an (essentially) defconfig loongarch64 build for next-20240327
reports [1]:
drivers/gpu/drm/qxl/qxl_ioctl.c:148:14: error: variable 'num_relocs'
set but not used [-Werror,-Wunused-but-set-variable]
The variable was originally used in the `out_free_bos` label, but commit
74d9a6335dce ("drm/qxl: Simplify cleaning qxl processing command")
removed the use that happened in that label.
Thus remove the unused variable.
Fixes: 74d9a6335dce ("drm/qxl: Simplify cleaning qxl processing command")
Closes: https://lore.kernel.org/lkml/CANiq72kqqQfUxLkHJYqeBAhpc6YcX7bfR96gmmbF=j8hEOykqw@mail.gmail.com/ [1]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
drivers/gpu/drm/qxl/qxl_ioctl.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_ioctl.c b/drivers/gpu/drm/qxl/qxl_ioctl.c
index dd0f834d881c..506ae1f5e099 100644
--- a/drivers/gpu/drm/qxl/qxl_ioctl.c
+++ b/drivers/gpu/drm/qxl/qxl_ioctl.c
@@ -145,7 +145,7 @@ static int qxl_process_single_command(struct qxl_device *qdev,
struct qxl_release *release;
struct qxl_bo *cmd_bo;
void *fb_cmd;
- int i, ret, num_relocs;
+ int i, ret;
int unwritten;
switch (cmd->type) {
@@ -200,7 +200,6 @@ static int qxl_process_single_command(struct qxl_device *qdev,
}
/* fill out reloc info structs */
- num_relocs = 0;
for (i = 0; i < cmd->relocs_num; ++i) {
struct drm_qxl_reloc reloc;
struct drm_qxl_reloc __user *u = u64_to_user_ptr(cmd->relocs);
@@ -230,7 +229,6 @@ static int qxl_process_single_command(struct qxl_device *qdev,
reloc_info[i].dst_bo = cmd_bo;
reloc_info[i].dst_offset = reloc.dst_offset + release->release_offset;
}
- num_relocs++;
/* reserve and validate the reloc dst bo */
if (reloc.reloc_type == QXL_RELOC_TYPE_BO || reloc.src_handle) {
--
2.44.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()`
2024-03-27 17:55 [PATCH 1/2] drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()` Miguel Ojeda
2024-03-27 17:55 ` [PATCH 2/2] drm/qxl: remove unused variable from `qxl_process_single_command()` Miguel Ojeda
@ 2024-03-27 18:14 ` Miguel Ojeda
2024-03-28 10:18 ` Maxime Ripard
1 sibling, 1 reply; 5+ messages in thread
From: Miguel Ojeda @ 2024-03-27 18:14 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Dave Airlie, Gerd Hoffmann, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Daniel Vetter, Alon Levy,
Frediano Ziglio, virtualization, spice-devel, dri-devel,
linux-kernel, Nathan Chancellor, Tom Rix, Colin Ian King
On Wed, Mar 27, 2024 at 6:56 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> Closes: https://lore.kernel.org/lkml/CANiq72mjc5t4n25SQvYSrOEhxxpXYPZ4pPzneSJHEnc3qApu2Q@mail.gmail.com/
Should have a [1] at the end.
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> ---
> Given there is a loop going on here, it would be good to double-check whether
> this variable was supposed to be used for something useful or if it was just a
> remnant of a version previous to v1.4.
Also, I see Nathan sent meanwhile a message about these two that were
also mentioned/reported a while ago [1].
On my side, I noticed these due to my loongarch64 defconfig
compile-test with Rust enabled yesterday [2], but I don't want to step
on Tom/Colin/Nathan/ClangBuiltLinux's work, so please feel free to do
with these patches as you will!
Thanks!
Cheers,
Miguel
[1] https://lore.kernel.org/all/20240327163331.GB1153323@dev-arch.thelio-3990X/
[2] https://lore.kernel.org/lkml/CANiq72mjc5t4n25SQvYSrOEhxxpXYPZ4pPzneSJHEnc3qApu2Q@mail.gmail.com/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()`
2024-03-27 18:14 ` [PATCH 1/2] drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()` Miguel Ojeda
@ 2024-03-28 10:18 ` Maxime Ripard
2024-03-28 14:07 ` Miguel Ojeda
0 siblings, 1 reply; 5+ messages in thread
From: Maxime Ripard @ 2024-03-28 10:18 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Miguel Ojeda, Dave Airlie, Gerd Hoffmann, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Daniel Vetter, Alon Levy,
Frediano Ziglio, virtualization, spice-devel, dri-devel,
linux-kernel, Nathan Chancellor, Tom Rix, Colin Ian King
[-- Attachment #1: Type: text/plain, Size: 888 bytes --]
On Wed, Mar 27, 2024 at 07:14:12PM +0100, Miguel Ojeda wrote:
> On Wed, Mar 27, 2024 at 6:56 PM Miguel Ojeda <ojeda@kernel.org> wrote:
> >
> > Closes: https://lore.kernel.org/lkml/CANiq72mjc5t4n25SQvYSrOEhxxpXYPZ4pPzneSJHEnc3qApu2Q@mail.gmail.com/
>
> Should have a [1] at the end.
I added it while committing
> > Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
> > ---
> > Given there is a loop going on here, it would be good to double-check whether
> > this variable was supposed to be used for something useful or if it was just a
> > remnant of a version previous to v1.4.
>
> Also, I see Nathan sent meanwhile a message about these two that were
> also mentioned/reported a while ago [1].
"a while ago" here being 2 hours before your message :)
I've added a Closes tag for that report too.
I've applied both patches to drm-misc-fixes, thanks!
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()`
2024-03-28 10:18 ` Maxime Ripard
@ 2024-03-28 14:07 ` Miguel Ojeda
0 siblings, 0 replies; 5+ messages in thread
From: Miguel Ojeda @ 2024-03-28 14:07 UTC (permalink / raw)
To: Maxime Ripard
Cc: Miguel Ojeda, Dave Airlie, Gerd Hoffmann, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Daniel Vetter, Alon Levy,
Frediano Ziglio, virtualization, spice-devel, dri-devel,
linux-kernel, Nathan Chancellor, Tom Rix, Colin Ian King
On Thu, Mar 28, 2024 at 11:18 AM Maxime Ripard <mripard@kernel.org> wrote:
>
> "a while ago" here being 2 hours before your message :)
Ah, I meant the original reports that Nathan mentioned in his message.
Yeah, the message itself from Nathan happened right before :)
> I've added a Closes tag for that report too.
>
> I've applied both patches to drm-misc-fixes, thanks!
My pleasure!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-03-28 14:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27 17:55 [PATCH 1/2] drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()` Miguel Ojeda
2024-03-27 17:55 ` [PATCH 2/2] drm/qxl: remove unused variable from `qxl_process_single_command()` Miguel Ojeda
2024-03-27 18:14 ` [PATCH 1/2] drm/qxl: remove unused `count` variable from `qxl_surface_id_alloc()` Miguel Ojeda
2024-03-28 10:18 ` Maxime Ripard
2024-03-28 14:07 ` Miguel Ojeda
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.