aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Jones <[email protected]>2020-11-12 19:00:11 +0000
committerSam Ravnborg <[email protected]>2020-11-12 20:32:12 +0100
commite232e3d4ea4a313af4ec0ce316516fcec369585e (patch)
treed5e5e59defc2bc15c170d3658ae5ca134a58f454
parenteee013c1f1280946b79f9baca9f4d3b45b901fa1 (diff)
include: drm: drm_atomic: Artificially use 'crtc' to avoid 'not used' warning
The precedent has already been set by other macros in the same file. Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/vkms/vkms_drv.c:55:19: warning: variable ‘crtc’ set but not used [-Wunused-but-set-variable] 55 | struct drm_crtc *crtc; | ^~~~ Cc: Maarten Lankhorst <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: David Airlie <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Rob Clark <[email protected]> Cc: [email protected] Signed-off-by: Lee Jones <[email protected]> Signed-off-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
-rw-r--r--include/drm/drm_atomic.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 413fd0ca56a8..dc5e0fbecc04 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -802,6 +802,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
(__i)++) \
for_each_if ((__state)->crtcs[__i].ptr && \
((crtc) = (__state)->crtcs[__i].ptr, \
+ (void)(crtc) /* Only to avoid unused-but-set-variable warning */, \
(old_crtc_state) = (__state)->crtcs[__i].old_state, 1))
/**