In general, the compiler should not be able to detect if we do any
passes through the test loops:

        In file included from drivers/gpu/drm/i915/i915_gem.c:5029:
        drivers/gpu/drm/i915/selftests/i915_gem_coherency.c: In function 
'igt_gem_coherency':
        drivers/gpu/drm/i915/selftests/i915_gem_coherency.c:274: error: 'err' 
may be used uninitialized in this function

Reported-by: kbuild test robot <fengguang...@intel.com
Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/selftests/i915_gem_coherency.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c 
b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
index 483cbe02d983..26dc8079f399 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c
@@ -271,7 +271,7 @@ static int igt_gem_coherency(void *arg)
        struct drm_i915_gem_object *obj;
        unsigned long count, n;
        u32 *offsets, *values;
-       int err;
+       int err = 0;
 
        /* We repeatedly write, overwrite and read from a sequence of
         * cachelines in order to try and detect incoherency (unflushed writes
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to