With an upcoming change to bind, to make checkpatch happy and keep the
code clean, we need to rework this code a bit.

This should have no functional impact.

Signed-off-by: Ben Widawsky <[email protected]>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c 
b/drivers/gpu/drm/i915/i915_debugfs.c
index be69807..61ffa71 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1781,12 +1781,13 @@ i915_drop_caches_set(void *data, u64 val)
 
        if (val & DROP_BOUND) {
                list_for_each_entry_safe(obj, next, &vm->inactive_list,
-                                        mm_list)
-                       if (obj->pin_count == 0) {
-                               ret = i915_gem_object_unbind(obj);
-                               if (ret)
-                                       goto unlock;
-                       }
+                                        mm_list) {
+                       if (obj->pin_count)
+                               continue;
+                       ret = i915_gem_object_unbind(obj);
+                       if (ret)
+                               goto unlock;
+               }
        }
 
        if (val & DROP_UNBOUND) {
-- 
1.8.3.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to