Re: [PATCH linux-next] drm/i915/display: Delete redundant post_mask assignment

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

 



On Wed, Dec 08, 2021 at 07:46:19AM +0000, cgel.zte@xxxxxxxxx wrote:
> From: luo penghao <luo.penghao@xxxxxxxxxx>
> 
> This value will be overwritten by the following if statement, even
> if the if is not executed, the value will not be used
> 
> The clang_analyzer complains as follows:
> 
> Value stored to 'port_mask' is never read
> 
> Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
> Signed-off-by: luo penghao <luo.penghao@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/display/intel_ddi.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
> index bd18432..3aad0c3 100644
> --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> @@ -2011,7 +2011,6 @@ void intel_ddi_sanitize_encoder_pll_mapping(struct intel_encoder *encoder)
>  			return;
>  	}
>  
> -	port_mask = BIT(encoder->port);
>  	ddi_clk_needed = encoder->base.crtc;
>  
>  	if (encoder->type == INTEL_OUTPUT_DSI) {

'port_mask' declaration could now be moved into this block.

> -- 
> 2.15.2
> 

-- 
Ville Syrjälä
Intel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux