Re: [PATCH 2/3] drm/i915/dp: Initialise locals for static analysis

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

 



On Fri, May 17, 2019 at 11:22:24AM +0100, Chris Wilson wrote:
> Just to squelch an smatch warning that doesn't see the with_() being
> taken unconditionally:
> drivers/gpu/drm/i915//intel_dp.c:230 intel_dp_get_fia_supported_lane_count() error: uninitialized symbol 'lane_info'.
> drivers/gpu/drm/i915//intel_dp.c:5338 intel_digital_port_connected() error: uninitialized symbol 'is_connected'.
> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Cc: Imre Deak <imre.deak@xxxxxxxxx>

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

> ---
>  drivers/gpu/drm/i915/intel_dp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index e3e719c04440..77ba4da6b981 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -222,6 +222,7 @@ static int intel_dp_get_fia_supported_lane_count(struct intel_dp *intel_dp)
>  	if (tc_port == PORT_TC_NONE || dig_port->tc_type != TC_PORT_TYPEC)
>  		return 4;
>  
> +	lane_info = 0;
>  	with_intel_display_power(dev_priv, POWER_DOMAIN_DISPLAY_CORE, wakeref)
>  		lane_info = (I915_READ(PORT_TX_DFLEXDPSP) &
>  			     DP_LANE_ASSIGNMENT_MASK(tc_port)) >>
> @@ -5329,8 +5330,8 @@ static bool __intel_digital_port_connected(struct intel_encoder *encoder)
>  bool intel_digital_port_connected(struct intel_encoder *encoder)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
> +	bool is_connected = false;
>  	intel_wakeref_t wakeref;
> -	bool is_connected;
>  
>  	with_intel_display_power(dev_priv, POWER_DOMAIN_DISPLAY_CORE, wakeref)
>  		is_connected = __intel_digital_port_connected(encoder);
> -- 
> 2.20.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux