Skip to contentSkip to conversation

drm/sysfb: Remove double assignment to pointer crtc_state

PATCH In review Colin Ian King 2 participants 2 messages Sep 3, 2025

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

PATCH 1/1 drm/sysfb: Remove double assignment to pointer crtc_state

The declaration of pointer crtc_state includes an assignment to crtc_state. The double assignment of crtc_state is redundant and can be removed.

Fixes 061963cd9e5b ("drm/sysfb: Blit to CRTC destination format")
---
 drivers/gpu/drm/sysfb/drm_sysfb_modeset.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/sysfb/drm_sysfb_modeset.c +1 -2
index 963c380fea64..ddb4a7523ee6 100644
@@ -238,8 +238,7 @@ void drm_sysfb_plane_helper_atomic_update(struct drm_plane *plane, struct drm_at
 	struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(plane_state);
 	struct drm_framebuffer *fb = plane_state->fb;
 	unsigned int dst_pitch = sysfb->fb_pitch;
-	struct drm_crtc_state *crtc_state = crtc_state =
-		drm_atomic_get_new_crtc_state(state, plane_state->crtc);
+	struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, plane_state->crtc);
 	struct drm_sysfb_crtc_state *sysfb_crtc_state = to_drm_sysfb_crtc_state(crtc_state);
 	const struct drm_format_info *dst_format = sysfb_crtc_state->format;
 	struct drm_atomic_helper_damage_iter iter;
Signature · 1 line
2.51.0
maintainer Reviewed-by on v1 1/1
#1 lore raw

Hi

Am 03.09.25 um 10:31 schrieb Colin Ian King:

Quoted 6 lines

The declaration of pointer crtc_state includes an assignment to crtc_state. The double assignment of crtc_state is redundant and can be removed.

Fixes 061963cd9e5b ("drm/sysfb: Blit to CRTC destination format")

Thanks a lot. I'll merged the patch in the drm-misc.

Best regards
Thomas

Quoted 18 lines
---
  drivers/gpu/drm/sysfb/drm_sysfb_modeset.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/sysfb/drm_sysfb_modeset.c +1 -2
index 963c380fea64..ddb4a7523ee6 100644
@@ -238,8 +238,7 @@ void drm_sysfb_plane_helper_atomic_update(struct drm_plane *plane, struct drm_at
  	struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(plane_state);
  	struct drm_framebuffer *fb = plane_state->fb;
  	unsigned int dst_pitch = sysfb->fb_pitch;
-	struct drm_crtc_state *crtc_state = crtc_state =
-		drm_atomic_get_new_crtc_state(state, plane_state->crtc);
+	struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, plane_state->crtc);
  	struct drm_sysfb_crtc_state *sysfb_crtc_state = to_drm_sysfb_crtc_state(crtc_state);
  	const struct drm_format_info *dst_format = sysfb_crtc_state->format;
  	struct drm_atomic_helper_damage_iter iter;
Signature · 7 lines
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)