Hi
Am 02.09.25 um 10:32 schrieb Maxime Ripard:
The for_each_old_plane_in_state() macro triggers a compiler warning if
the plane parameter passed to it isn't used in the code block.
Add a similar workaround than in most other macros.
Signed-off-by: Maxime Ripard <mrip...@kernel.org>
Reviewed-by: Thomas Zimmermann <tzimmerm...@suse.de>
This patch should probably get merged in any case
Best regards
Thomas
---
include/drm/drm_atomic.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index
38636a593c9d98cadda85ccd67326cb152f0dd27..689a29bdeb4a06672ab6fffecb513d58ff6e07f9
100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -1053,11 +1053,13 @@ void drm_state_dump(struct drm_device *dev, struct
drm_printer *p);
for ((__i) = 0; \
(__i) < (__state)->dev->mode_config.num_total_plane; \
(__i)++) \
for_each_if ((__state)->planes[__i].ptr && \
((plane) = (__state)->planes[__i].ptr, \
+ (void)(plane) /* Only to avoid
unused-but-set-variable warning */, \
(old_plane_state) =
(__state)->planes[__i].old_state, 1))
+
/**
* for_each_new_plane_in_state - iterate over all planes in an atomic update
* @__state: &struct drm_atomic_state pointer
* @plane: &struct drm_plane iteration cursor
* @new_plane_state: &struct drm_plane_state iteration cursor for the new
state
--
--
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)