diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-02-14 17:35:09 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-02-15 01:30:21 +0300 |
commit | b8f2169db98eba2c5009cc67a448dc48a0fd4c48 (patch) | |
tree | b287561f566310fc674f26d0ba0a35fc5a448e8f | |
parent | 72affdf9729d9e9a81498196ed5ada4d8f1c599e (diff) | |
download | linux-b8f2169db98eba2c5009cc67a448dc48a0fd4c48.tar.xz |
drm/i915: Silence compiler warning for seltests/i915_gem_coherency
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.wu@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170214143509.15719-1-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
-rw-r--r-- | drivers/gpu/drm/i915/selftests/i915_gem_coherency.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c index ad92c60290f1..f08d0179b3df 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_coherency.c @@ -272,7 +272,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 |