* [PATCH][next] drm/sysfb: Remove double assignment to pointer crtc_state
@ 2025-09-03 8:31 Colin Ian King
2025-09-03 11:28 ` Thomas Zimmermann
0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2025-09-03 8:31 UTC (permalink / raw)
To: Thomas Zimmermann, Javier Martinez Canillas, Maarten Lankhorst,
Maxime Ripard, David Airlie, Simona Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
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")
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
drivers/gpu/drm/sysfb/drm_sysfb_modeset.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
index 963c380fea64..ddb4a7523ee6 100644
--- a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
+++ b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
@@ -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;
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][next] drm/sysfb: Remove double assignment to pointer crtc_state
2025-09-03 8:31 [PATCH][next] drm/sysfb: Remove double assignment to pointer crtc_state Colin Ian King
@ 2025-09-03 11:28 ` Thomas Zimmermann
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Zimmermann @ 2025-09-03 11:28 UTC (permalink / raw)
To: Colin Ian King, Javier Martinez Canillas, Maarten Lankhorst,
Maxime Ripard, David Airlie, Simona Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
Hi
Am 03.09.25 um 10:31 schrieb Colin Ian King:
> 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")
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Thanks a lot. I'll merged the patch in the drm-misc.
Best regards
Thomas
> ---
> drivers/gpu/drm/sysfb/drm_sysfb_modeset.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
> index 963c380fea64..ddb4a7523ee6 100644
> --- a/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
> +++ b/drivers/gpu/drm/sysfb/drm_sysfb_modeset.c
> @@ -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;
--
--
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-09-03 11:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-03 8:31 [PATCH][next] drm/sysfb: Remove double assignment to pointer crtc_state Colin Ian King
2025-09-03 11:28 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).