Re: [PATCH 14/15] drm/i915/gvt: annotate maybe unused gma_bottom variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/27/2023 12:38 AM, Jani Nikula wrote:
Prepare for re-enabling -Wunused-but-set-variable.

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

Cc: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx>
Cc: Zhi Wang <zhi.a.wang@xxxxxxxxx>
Cc: intel-gvt-dev@xxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx>

---

Frankly I'm not sure what to do with these. Maybe the variables should
be dropped altogether?

I sent an patch to fix the warnings. You can include that one in the series. Zhenyu, can you give an rb?

---
  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,





[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux