On su, 2016-04-03 at 21:59 +0100, Chris Wilson wrote: > Silences > > src/drivers/gpu/drm/i915/intel_ddi.c: warning: 'port' may be used uninitialized in this function [-Wuninitialized] > > Reported-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_ddi.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c > index 766156f88ef4..921edf183d22 100644 > --- a/drivers/gpu/drm/i915/intel_ddi.c > +++ b/drivers/gpu/drm/i915/intel_ddi.c > @@ -315,6 +315,9 @@ static void ddi_get_encoder_port(struct intel_encoder *intel_encoder, > *dig_port = enc_to_mst(encoder)->primary; > *port = (*dig_port)->port; > break; > + default: > + WARN(1, "Invalid DDI encoder type %d\n", intel_encoder->type); > + /* fallthrough and treat as unknown */ While touching it, might as well fix into MISSING_CASE. With that; Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> > case INTEL_OUTPUT_DISPLAYPORT: > case INTEL_OUTPUT_EDP: > case INTEL_OUTPUT_HDMI: > @@ -326,9 +329,6 @@ static void ddi_get_encoder_port(struct intel_encoder *intel_encoder, > *dig_port = NULL; > *port = PORT_E; > break; > - default: > - WARN(1, "Invalid DDI encoder type %d\n", intel_encoder->type); > - break; > } > } > -- Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx