Skip to content

Commit 4527d47

Browse files
GONG, Ruiqimripard
authored andcommitted
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
1 parent 477277c commit 4527d47

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

include/drm/drm_atomic.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
10221022
for ((__i) = 0; \
10231023
(__i) < (__state)->num_private_objs && \
10241024
((obj) = (__state)->private_objs[__i].ptr, \
1025+
(void)(obj) /* Only to avoid unused-but-set-variable warning */, \
10251026
(new_obj_state) = (__state)->private_objs[__i].new_state, 1); \
10261027
(__i)++)
10271028

0 commit comments

Comments
 (0)