Skip to contentSkip to conversation

drm/vc4: crtc: Fix redundant variable assignment

PATCH Applied Maxime Ripard 2 participants 3 messages Feb 3, 2022 – Feb 7, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vc4: crtc: Fix redundant variable assignment

The variable is assigned twice to the same value. Let's drop one.

---
 drivers/gpu/drm/vc4/vc4_crtc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/vc4/vc4_crtc.c +0 -1
index 287dbc89ad64..e6cc47470e03 100644
@@ -671,7 +671,6 @@ static int vc4_crtc_atomic_check(struct drm_crtc *crtc,
 		const struct drm_display_mode *mode = &crtc_state->adjusted_mode;
 		struct vc4_encoder *vc4_encoder = to_vc4_encoder(encoder);
 
-		mode = &crtc_state->adjusted_mode;
 		if (vc4_encoder->type == VC4_ENCODER_TYPE_HDMI0) {
 			vc4_state->hvs_load = max(mode->clock * mode->hdisplay / mode->htotal + 1000,
 						  mode->clock * 9 / 10) * 1000;
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Maxime Ripard

The variable is assigned twice to the same value. Let's drop one.

Quoted 18 lines
---
 drivers/gpu/drm/vc4/vc4_crtc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/vc4/vc4_crtc.c +0 -1
index 287dbc89ad64..e6cc47470e03 100644
@@ -671,7 +671,6 @@ static int vc4_crtc_atomic_check(struct drm_crtc *crtc,
 		const struct drm_display_mode *mode = &crtc_state->adjusted_mode;
 		struct vc4_encoder *vc4_encoder = to_vc4_encoder(encoder);
 
-		mode = &crtc_state->adjusted_mode;
 		if (vc4_encoder->type == VC4_ENCODER_TYPE_HDMI0) {
 			vc4_state->hvs_load = max(mode->clock * mode->hdisplay / mode->htotal + 1000,
 						  mode->clock * 9 / 10) * 1000;
Signature · 1 line
2.34.1
author Applied
#2 lore raw

Re: (subset) [PATCH] drm/vc4: crtc: Fix redundant variable assignment

In reply to Maxime Ripard
Quoted 3 lines · Maxime Ripard

The variable is assigned twice to the same value. Let's drop one.

Applied to drm/drm-misc (drm-misc-fixes).

Thanks!
Maxime