[Intel-gfx] [PATCH 14/15] drm/i915/gvt: annotate maybe unused gma_bottom variables

Jani Nikula jani.nikula at intel.com
Fri May 26 16:38:07 UTC 2023


Prepare for re-enabling -Wunused-but-set-variable.

Lacking a better idea, annotate the gma_bottom variables with
__maybe_unused.

Cc: Zhenyu Wang <zhenyuw at linux.intel.com>
Cc: Zhi Wang <zhi.a.wang at intel.com>
Cc: intel-gvt-dev at lists.freedesktop.org
Signed-off-by: Jani Nikula <jani.nikula at intel.com>

---

Frankly I'm not sure what to do with these. Maybe the variables should
be dropped altogether?
---
 drivers/gpu/drm/i915/gvt/cmd_parser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
index 3c4ae1da0d41..2801e17e5522 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, __maybe_unused gma_bottom;
 	struct parser_exec_state s;
 	int ret = 0;
 
@@ -2874,7 +2874,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, __maybe_unused gma_bottom, ring_size, ring_tail;
 	struct parser_exec_state s;
 	int ret = 0;
 	struct intel_vgpu_workload *workload = container_of(wa_ctx,
-- 
2.39.2



More information about the Intel-gfx mailing list