Skip to content

Commit

Permalink
drm/atomic: fix warning of unused variable
Browse files Browse the repository at this point in the history
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
  • Loading branch information
GONG, Ruiqi authored and Maxime Ripard committed Jun 9, 2022
1 parent 477277c commit 4527d47
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/drm/drm_atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)++)

Expand Down

0 comments on commit 4527d47

Please sign in to comment.