Re: [PATCH] drm/i915: Silence compiler warning for hsw_power_well_enable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
> Fixes: b2891eb2531e ("drm/i915/hsw+: Add has_fuses power well attribute")
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Imre Deak <imre.deak@xxxxxxxxx>
> Cc: Arkadiusz Hiler <arkadiusz.hiler@xxxxxxxxx>

Reviewed-by: Imre Deak <imre.deak@xxxxxxxxx>

> ---
>  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
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux