[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201112190039.2785914-3-lee.jones@linaro.org>
Date: Thu, 12 Nov 2020 19:00:11 +0000
From: Lee Jones <lee.jones@...aro.org>
To: lee.jones@...aro.org
Cc: linux-kernel@...r.kernel.org,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Rob Clark <robdclark@...il.com>,
dri-devel@...ts.freedesktop.org
Subject: [PATCH 02/30] 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 <maarten.lankhorst@...ux.intel.com>
Cc: Maxime Ripard <mripard@...nel.org>
Cc: Thomas Zimmermann <tzimmermann@...e.de>
Cc: David Airlie <airlied@...ux.ie>
Cc: Daniel Vetter <daniel@...ll.ch>
Cc: Rob Clark <robdclark@...il.com>
Cc: dri-devel@...ts.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
include/drm/drm_atomic.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 413fd0ca56a8f..dc5e0fbecc04e 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))
/**
--
2.25.1
Powered by blists - more mailing lists