[Intel-gfx] [PATCH] drm/i915: Simplify onion for bxt_ddi_phy_init()

Chris Wilson chris at chris-wilson.co.uk
Tue Nov 7 20:24:08 UTC 2017


Quoting Gabriel Krisman Bertazi (2017-11-07 16:23:59)
> Chris Wilson <chris at chris-wilson.co.uk> writes:
> 
> > Older compilers (gcc-4.9) are not as able to track uninitialised
> > variables as well as more recent compilers. In particular,
> >
> > drivers/gpu/drm/i915/intel_dpio_phy.c: In function ‘bxt_ddi_phy_init’:
> > drivers/gpu/drm/i915/intel_dpio_phy.c:482:25: warning: ‘was_enabled’ may be used uninitialized in this function [-Wmaybe-uninitialized]
> >
> > In this case, we can rearrange code slightly to make the control flow
> > clearer to the reader, as well as the compiler. That is we only call
> > uninit using the same predicate as calling init
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
> > Cc: Imre Deak <imre.deak at intel.com>
> 
> 
> Reviewed-by: Gabriel Krisman Bertazi <krisman at collabora.co.uk>

Thanks for the review, pushed.
-Chris


More information about the Intel-gfx mailing list