[Intel-gfx] [PATCH] drm/i915/display/psr: Fix cppcheck warnings

Harish Chegondi harish.chegondi at intel.com
Thu Apr 15 00:45:36 UTC 2021


On Fri, Apr 09, 2021 at 04:17:38PM -0700, José Roberto de Souza wrote:
> Fix redundant condition, caught in cppcheck by kernel test robot.
> 
> Reported-by: kernel test robot <lkp at intel.com>
> Cc: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
> Fixes: b64d6c51380b ("drm/i915/display: Support PSR Multiple Instances")
> Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
Reviewed-by: Harish Chegondi <harish.chegondi at intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index 2627d0b558f3..06cb286e9a4a 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1532,8 +1532,7 @@ void intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state)
>  		u32 psr_status;
>  
>  		mutex_lock(&intel_dp->psr.lock);
> -		if (!intel_dp->psr.enabled ||
> -		    (intel_dp->psr.enabled && intel_dp->psr.psr2_enabled)) {
> +		if (!intel_dp->psr.enabled || intel_dp->psr.psr2_enabled) {
>  			mutex_unlock(&intel_dp->psr.lock);
>  			continue;
>  		}
> -- 
> 2.31.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list