Quoting Dan Carpenter (2019-11-14 06:54:37) > 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? No, the setup is supposed to force the pin() to fail with ENOSPC. if (vma != ERR_PTR(-ENOSPC)) would be a clearer way to write it. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx