[Intel-gfx] [PATCH] drm/i915: Silence compiler warning for hsw_power_well_enable()

Imre Deak imre.deak at intel.com
Mon Oct 2 11:42:24 UTC 2017


On Mon, Oct 02, 2017 at 11:04:16AM +0100, Chris Wilson wrote:
> Not all compilers are able to determine that pg is guarded by wait_fuses
> and so may think that pg is used uninitialized.
> 
> Reported-by: Geert Uytterhoeven <geert at linux-m68k.org>
> Fixes: b2891eb2531e ("drm/i915/hsw+: Add has_fuses power well attribute")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Imre Deak <imre.deak at intel.com>
> Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>

Reviewed-by: Imre Deak <imre.deak at intel.com>

> ---
>  drivers/gpu/drm/i915/intel_runtime_pm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
> index 7933d1bc6a1c..de207c93c063 100644
> --- a/drivers/gpu/drm/i915/intel_runtime_pm.c
> +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
> @@ -368,7 +368,7 @@ static void hsw_power_well_enable(struct drm_i915_private *dev_priv,
>  {
>  	enum i915_power_well_id id = power_well->id;
>  	bool wait_fuses = power_well->hsw.has_fuses;
> -	enum skl_power_gate pg;
> +	enum skl_power_gate uninitialized_var(pg);
>  	u32 val;
>  
>  	if (wait_fuses) {
> -- 
> 2.14.2
> 


More information about the Intel-gfx mailing list