summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_atomic.h
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-09-27 10:35:31 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-10-06 11:05:50 +0200
commitf0d2e86c1b9ecd9cbe967b94e2f0d197f30cb3e7 (patch)
tree529b745ad1212289d9102f2660f2ec10da5b33cb /include/drm/drm_atomic.h
parent15438ab06515b093d61e2f35bb27d21e5e7f966e (diff)
downloadlinux-f0d2e86c1b9ecd9cbe967b94e2f0d197f30cb3e7.tar.bz2
drm/atomic: Remove unneeded null check for private objects
It can be seen in drm_atomic_get_private_obj_state() that ptr will never be NULL, so skip the check for that case. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20170927083532.5756-1-maarten.lankhorst@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'include/drm/drm_atomic.h')
-rw-r--r--include/drm/drm_atomic.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 5834580d75bc..6fae95f28e10 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -768,8 +768,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
((obj) = (__state)->private_objs[__i].ptr, \
(old_obj_state) = (__state)->private_objs[__i].old_state, \
(new_obj_state) = (__state)->private_objs[__i].new_state, 1); \
- (__i)++) \
- for_each_if (obj)
+ (__i)++)
/**
* for_each_old_private_obj_in_state - iterate over all private objects in an atomic update
@@ -787,8 +786,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
(__i) < (__state)->num_private_objs && \
((obj) = (__state)->private_objs[__i].ptr, \
(old_obj_state) = (__state)->private_objs[__i].old_state, 1); \
- (__i)++) \
- for_each_if (obj)
+ (__i)++)
/**
* for_each_new_private_obj_in_state - iterate over all private objects in an atomic update
@@ -806,8 +804,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
(__i) < (__state)->num_private_objs && \
((obj) = (__state)->private_objs[__i].ptr, \
(new_obj_state) = (__state)->private_objs[__i].new_state, 1); \
- (__i)++) \
- for_each_if (obj)
+ (__i)++)
/**
* drm_atomic_crtc_needs_modeset - compute combined modeset need