[PATCH v1] drm/i915/dp: Remove double assignment in intel_dp_compute_as_sdp()

Yuesong Li posted 1 patch 1 year, 5 months ago
drivers/gpu/drm/i915/display/intel_dp.c | 1 -
1 file changed, 1 deletion(-)
[PATCH v1] drm/i915/dp: Remove double assignment in intel_dp_compute_as_sdp()
Posted by Yuesong Li 1 year, 5 months ago
cocci report a double assignment warning. 'as_sdp->duration_incr_ms'
was assigned twice in intel_dp_compute_as_sdp().

Signed-off-by: Yuesong Li <liyuesong@vivo.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 6a0c7ae654f4..229c87be4402 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -2730,7 +2730,6 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
 	as_sdp->sdp_type = DP_SDP_ADAPTIVE_SYNC;
 	as_sdp->length = 0x9;
 	as_sdp->duration_incr_ms = 0;
-	as_sdp->duration_incr_ms = 0;
 
 	if (crtc_state->cmrr.enable) {
 		as_sdp->mode = DP_AS_SDP_FAVT_TRR_REACHED;
-- 
2.34.1
Re: [PATCH v1] drm/i915/dp: Remove double assignment in intel_dp_compute_as_sdp()
Posted by Andi Shyti 1 year, 4 months ago
Hi Yuesong,

On Fri, Aug 23, 2024 at 10:36:12AM GMT, Yuesong Li wrote:
> cocci report a double assignment warning. 'as_sdp->duration_incr_ms'
> was assigned twice in intel_dp_compute_as_sdp().
> 
> Signed-off-by: Yuesong Li <liyuesong@vivo.com>

reviewed and merged to drm-intel-next.

Thanks,
Andi
Re: [PATCH v1] drm/i915/dp: Remove double assignment in intel_dp_compute_as_sdp()
Posted by Jani Nikula 1 year, 5 months ago
On Fri, 23 Aug 2024, Yuesong Li <liyuesong@vivo.com> wrote:
> cocci report a double assignment warning. 'as_sdp->duration_incr_ms'
> was assigned twice in intel_dp_compute_as_sdp().
>
> Signed-off-by: Yuesong Li <liyuesong@vivo.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 6a0c7ae654f4..229c87be4402 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -2730,7 +2730,6 @@ static void intel_dp_compute_as_sdp(struct intel_dp *intel_dp,
>  	as_sdp->sdp_type = DP_SDP_ADAPTIVE_SYNC;
>  	as_sdp->length = 0x9;
>  	as_sdp->duration_incr_ms = 0;
> -	as_sdp->duration_incr_ms = 0;
>  
>  	if (crtc_state->cmrr.enable) {
>  		as_sdp->mode = DP_AS_SDP_FAVT_TRR_REACHED;

-- 
Jani Nikula, Intel