[Intel-gfx] [PATCH] drm/i915: Drop non-NULL llist_for_each_entry_safe check for

Chris Wilson chris at chris-wilson.co.uk
Thu May 30 08:23:58 UTC 2019


Since the next entry is an offset from a pointer, it can not be NULL.
For simplicity, drop the extra conditional before calling cond_resched()

Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gem/i915_gem_object.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c b/drivers/gpu/drm/i915/gem/i915_gem_object.c
index f064876f1214..55e79fdb81aa 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.c
@@ -248,8 +248,7 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915,
 		GEM_BUG_ON(!atomic_read(&i915->mm.free_count));
 		atomic_dec(&i915->mm.free_count);
 
-		if (on)
-			cond_resched();
+		cond_resched();
 	}
 	intel_runtime_pm_put(i915, wakeref);
 }
-- 
2.20.1



More information about the Intel-gfx mailing list