summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorGONG, Ruiqi <gongruiqi1@huawei.com>2022-06-07 14:08:48 +0300
committerMaxime Ripard <maxime@cerno.tech>2022-06-09 17:09:46 +0300
commit4527d47bb63a134c4483a1a478d0ff5874b466c7 (patch)
tree0cd419b96d010dcc16119812e72032bc75bf8234 /include/drm
parent477277c7fd43d48ae68cbdcaa7c0f82024a87421 (diff)
downloadlinux-4527d47bb63a134c4483a1a478d0ff5874b466c7.tar.xz
drm/atomic: fix warning of unused variable
Fix the `unused-but-set-variable` warning as how other iteration wrappers do. Link: https://lore.kernel.org/all/202206071049.pofHsRih-lkp@intel.com/ Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: GONG, Ruiqi <gongruiqi1@huawei.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20220607110848.941486-1-gongruiqi1@huawei.com
Diffstat (limited to 'include/drm')
-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 0777725085df..10b1990bc1f6 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -1022,6 +1022,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
for ((__i) = 0; \
(__i) < (__state)->num_private_objs && \
((obj) = (__state)->private_objs[__i].ptr, \
+ (void)(obj) /* Only to avoid unused-but-set-variable warning */, \
(new_obj_state) = (__state)->private_objs[__i].new_state, 1); \
(__i)++)