Message ID | 7e1c475bf123eca6935a1be099cc0608bed49b0b.1685119007.git.jani.nikula@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: re-enable -Wunused-but-set-variable | expand |
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@linux.intel.com> > Cc: Zhi Wang <zhi.a.wang@intel.com> > Cc: intel-gvt-dev@lists.freedesktop.org > Signed-off-by: Jani Nikula <jani.nikula@intel.com> > > --- > > 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,
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,
Prepare for re-enabling -Wunused-but-set-variable. Lacking a better idea, annotate the gma_bottom variables with __maybe_unused. Cc: Zhenyu Wang <zhenyuw@linux.intel.com> Cc: Zhi Wang <zhi.a.wang@intel.com> Cc: intel-gvt-dev@lists.freedesktop.org Signed-off-by: Jani Nikula <jani.nikula@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(-)