* [Intel-gfx] [PATCH] drm/i915/gvt: remove unused variable gma_bottom in command parser
@ 2023-05-29 14:34 Wang, Zhi A
2023-05-31 1:50 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
0 siblings, 1 reply; 2+ messages in thread
From: Wang, Zhi A @ 2023-05-29 14:34 UTC (permalink / raw)
To: intel-gfx; +Cc: jani.nikula, intel-gvt-dev
Remove unused variable gma_bottom in scan_workload() and scan_wa_ctx().
commit be1da7070aea ("drm/i915/gvt: vGPU command scanner") introduces
gma_bottom in several functions to calculate the size of the command
buffer. However, some of them are set but actually unused.
When compiling the code with ccflags -Wunused-but-set-variable, gcc
throws warnings.
Remove unused variables to avoid the gcc warnings. Tested via compiling
the code with ccflags -Wunused-but-set-variable.
Fixes: be1da7070aea ("drm/i915/gvt: vGPU command scanner")
Suggested-by: Jani Nikula <jani.nikula@intel.com>
Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
Cc: intel-gvt-dev@lists.freedesktop.org
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com>
---
drivers/gpu/drm/i915/gvt/cmd_parser.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c
b/drivers/gpu/drm/i915/gvt/cmd_parser.c
index 3c4ae1da0d41..05f9348b7a9d 100644
--- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
+++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
@@ -2833,7 +2833,7 @@ static int command_scan(struct parser_exec_state *s,
static int scan_workload(struct intel_vgpu_workload *workload)
{
- unsigned long gma_head, gma_tail, gma_bottom;
+ unsigned long gma_head, gma_tail;
struct parser_exec_state s;
int ret = 0;
@@ -2843,7 +2843,6 @@ static int scan_workload(struct
intel_vgpu_workload *workload)
gma_head = workload->rb_start + workload->rb_head;
gma_tail = workload->rb_start + workload->rb_tail;
- gma_bottom = workload->rb_start + _RING_CTL_BUF_SIZE(workload->rb_ctl);
s.buf_type = RING_BUFFER_INSTRUCTION;
s.buf_addr_type = GTT_BUFFER;
@@ -2874,7 +2873,7 @@ static int scan_workload(struct
intel_vgpu_workload *workload)
static int scan_wa_ctx(struct intel_shadow_wa_ctx *wa_ctx)
{
- unsigned long gma_head, gma_tail, gma_bottom, ring_size, ring_tail;
+ unsigned long gma_head, gma_tail, ring_size, ring_tail;
struct parser_exec_state s;
int ret = 0;
struct intel_vgpu_workload *workload = container_of(wa_ctx,
@@ -2891,7 +2890,6 @@ static int scan_wa_ctx(struct intel_shadow_wa_ctx
*wa_ctx)
PAGE_SIZE);
gma_head = wa_ctx->indirect_ctx.guest_gma;
gma_tail = wa_ctx->indirect_ctx.guest_gma + ring_tail;
- gma_bottom = wa_ctx->indirect_ctx.guest_gma + ring_size;
s.buf_type = RING_BUFFER_INSTRUCTION;
s.buf_addr_type = GTT_BUFFER;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gvt: remove unused variable gma_bottom in command parser
2023-05-29 14:34 [Intel-gfx] [PATCH] drm/i915/gvt: remove unused variable gma_bottom in command parser Wang, Zhi A
@ 2023-05-31 1:50 ` Patchwork
0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2023-05-31 1:50 UTC (permalink / raw)
To: Wang, Zhi A; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/gvt: remove unused variable gma_bottom in command parser
URL : https://patchwork.freedesktop.org/series/118512/
State : failure
== Summary ==
Error: patch https://patchwork.freedesktop.org/api/1.0/series/118512/revisions/1/mbox/ not applied
Applying: drm/i915/gvt: remove unused variable gma_bottom in command parser
error: patch fragment without header at line 6: @@ -2874,7 +2873,7 @@ static int scan_workload(struct
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 drm/i915/gvt: remove unused variable gma_bottom in command parser
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Build failed, no error log produced
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-31 1:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 14:34 [Intel-gfx] [PATCH] drm/i915/gvt: remove unused variable gma_bottom in command parser Wang, Zhi A
2023-05-31 1:50 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).