linux_dsm_epyc7002/drivers/gpu/drm/i915/gvt
Nathan Chancellor 993fa32eb3 drm/i915: Mark check_shadow_context_ppgtt as maybe unused
When CONFIG_DRM_I915_DEBUG_GEM is not set, clang warns:

drivers/gpu/drm/i915/gvt/scheduler.c:884:1: warning: function
'check_shadow_context_ppgtt' is not needed and will not be emitted
[-Wunneeded-internal-declaration]
check_shadow_context_ppgtt(struct execlist_ring_context *c, struct
intel_vgpu_mm *m)
^
1 warning generated.

This warning is similar to -Wunused-function but rather than warning
that the function is completely unused, it warns that it is used in some
expression within the file but that expression will be evaluated to a
constant or be optimized away in the final assembly, essentially making
it appeared used but really isn't. Usually, this happens when a function
or variable is only used in sizeof, where it will appear to be used but
will be evaluated at compile time and not be required to be emitted.

In this case, the function is only used in GEM_BUG_ON, which is defined
as BUILD_BUG_ON_INVALID, which intentionally follows this pattern. To
fix this warning, add __maybe_unused to make it clear that this is
intentional depending on the configuration.

Fixes: bec3df930f ("drm/i915/gvt: Support PPGTT table load command")
Link: https://github.com/ClangBuiltLinux/linux/issues/1027
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200516023545.3332334-1-natechancellor@gmail.com
2020-05-16 13:41:04 +01:00
..
aperture_gm.c drm/i915: Move GGTT fence registers under gt/ 2020-03-16 20:28:26 +00:00
cfg_space.c drm/i915/gvt: Wean gvt off using dev_priv 2020-03-06 10:08:10 +08:00
cmd_parser.c Merge tag 'gvt-next-2020-05-12' of https://github.com/intel/gvt-linux into drm-intel-next-queued 2020-05-14 18:02:23 +03:00
cmd_parser.h
debug.h
debugfs.c drm/i915/gvt: Wean gvt off using dev_priv 2020-03-06 10:08:10 +08:00
display.c drm/i915/gvt: Fix display port type issue 2020-03-17 18:28:06 +08:00
display.h
dmabuf.c UAPI Changes: 2020-03-19 10:40:27 +10:00
dmabuf.h
edid.c drm/i915/gvt: Wean gvt off using dev_priv 2020-03-06 10:08:10 +08:00
edid.h
execlist.c drm/i915/gvt: move workload destroy out of execlist complete 2020-05-08 12:34:12 +08:00
execlist.h drm/i915/gvt: Wean gvt off dev_priv->engine[] 2020-03-06 09:56:15 +08:00
fb_decoder.c drm/i915/gvt: Wean gvt off using dev_priv 2020-03-06 10:08:10 +08:00
fb_decoder.h
firmware.c Merge tag 'gvt-next-2020-03-10' of https://github.com/intel/gvt-linux into drm-intel-next-queued 2020-03-10 15:46:29 -07:00
gtt.c Merge tag 'gvt-next-2020-05-12' of https://github.com/intel/gvt-linux into drm-intel-next-queued 2020-05-14 18:02:23 +03:00
gtt.h drm/i915/gvt: Support PPGTT table load command 2020-05-08 12:36:38 +08:00
gvt.c Merge tag 'gvt-next-2020-04-22' of https://github.com/intel/gvt-linux into drm-intel-next-queued 2020-04-30 10:53:21 +03:00
gvt.h drm/i915/gvt: skip populate shadow context if guest context not changed 2020-04-17 17:31:22 +08:00
handlers.c Merge tag 'gvt-next-2020-05-12' of https://github.com/intel/gvt-linux into drm-intel-next-queued 2020-05-14 18:02:23 +03:00
hypercall.h i915/gvt: remove unused xen bits 2020-04-14 16:40:42 +08:00
interrupt.c drm/i915/gvt: Wean gvt off using dev_priv 2020-03-06 10:08:10 +08:00
interrupt.h
kvmgt.c drm/i915/gvt: Wean gvt off using dev_priv 2020-03-06 10:08:10 +08:00
Makefile
mmio_context.c drm/i915/gvt: Wean gvt off using dev_priv 2020-03-06 10:08:10 +08:00
mmio_context.h drm/i915/gvt: Wean gvt off dev_priv->engine[] 2020-03-06 09:56:15 +08:00
mmio.c drm/i915/gvt: Wean gvt off using dev_priv 2020-03-06 10:08:10 +08:00
mmio.h drm/i915/gvt: Wean gvt off dev_priv->engine[] 2020-03-06 09:56:15 +08:00
mpt.h
opregion.c drm/i915/gvt: Fix emulated vbt size issue 2020-03-06 09:35:30 +08:00
page_track.c
page_track.h
reg.h
sched_policy.c drm/i915/gvt: Wean gvt off using dev_priv 2020-03-06 10:08:10 +08:00
sched_policy.h
scheduler.c drm/i915: Mark check_shadow_context_ppgtt as maybe unused 2020-05-16 13:41:04 +01:00
scheduler.h drm/i915/gvt: Support PPGTT table load command 2020-05-08 12:36:38 +08:00
trace_points.c
trace.h
vgpu.c Linux 5.6 2020-03-31 15:15:47 +10:00