Hello Chris Wilson,
The patch f40a7b7558ef: "drm/i915: Initial selftests for exercising
eviction" from Feb 13, 2017, leads to the following static checker
warning:
drivers/gpu/drm/i915/selftests/i915_gem_evict.c:202 igt_overcommit()
warn: passing zero to 'PTR_ERR'
drivers/gpu/drm/i915/selftests/i915_gem_evict.c
190 goto cleanup;
191
192 obj = i915_gem_object_create_internal(gt->i915,
I915_GTT_PAGE_SIZE);
193 if (IS_ERR(obj)) {
194 err = PTR_ERR(obj);
195 goto cleanup;
196 }
197
198 quirk_add(obj, &objects);
199
200 vma = i915_gem_object_ggtt_pin(obj, NULL, 0, 0, 0);
201 if (!IS_ERR(vma) || PTR_ERR(vma) != -ENOSPC) {
^^^^^^^^^^^^
Is this reversed?
202 pr_err("Failed to evict+insert,
i915_gem_object_ggtt_pin returned err=%d\n", (int)PTR_ERR(vma));
^^^^^^^^^^^^^^^^^
203 err = -EINVAL;
204 goto cleanup;
205 }
206
207 cleanup:
208 cleanup_objects(ggtt, &objects);
209 return err;
210 }
regards,
dan carpenter
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx