Message ID | 20170829185545.10169-1-michel.thierry@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Quoting Michel Thierry (2017-08-29 19:55:45) > Gen7 won't get any new engines, and we already added VCS2 there to just > silence gcc's not-handled-in-switch warnings. > > Use a default case instead, otherwise we will need to keep adding extra > cases if changes happen in the future. > > Signed-off-by: Michel Thierry <michel.thierry@intel.com> Left spray paint behind, so Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (Not really a case of MISSING_CASE, as it is completely impossible, so GEM_BUG?) -Chris
On 29/08/17 12:18, Chris Wilson wrote: > Quoting Michel Thierry (2017-08-29 19:55:45) >> Gen7 won't get any new engines, and we already added VCS2 there to just >> silence gcc's not-handled-in-switch warnings. >> >> Use a default case instead, otherwise we will need to keep adding extra >> cases if changes happen in the future. >> >> Signed-off-by: Michel Thierry <michel.thierry@intel.com> > > Left spray paint behind, so > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> > > (Not really a case of MISSING_CASE, as it is completely impossible, so > GEM_BUG?) True, GEM_BUG makes more sense here.
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index c277a26bbd99..7d57a5971f39 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c @@ -409,10 +409,12 @@ static void intel_ring_setup_status_page(struct intel_engine_cs *engine) mmio = BLT_HWS_PGA_GEN7; break; /* - * VCS2 actually doesn't exist on Gen7. Only shut up + * No more rings exist on Gen7. Only shut up * gcc switch check warning */ - case VCS2: + default: + MISSING_CASE(engine->id); + /* fall through */ case VCS: mmio = BSD_HWS_PGA_GEN7; break;
Gen7 won't get any new engines, and we already added VCS2 there to just silence gcc's not-handled-in-switch warnings. Use a default case instead, otherwise we will need to keep adding extra cases if changes happen in the future. Signed-off-by: Michel Thierry <michel.thierry@intel.com> --- drivers/gpu/drm/i915/intel_ringbuffer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)