[Intel-gfx] [PATCH] drm/i915: Silence compiler for GTT selftests

Chris Wilson chris at chris-wilson.co.uk
Tue Feb 14 12:42:48 UTC 2017


On Tue, Feb 14, 2017 at 12:20:40PM +0000, Matthew Auld wrote:
> On 14 February 2017 at 11:37, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> > gcc-4.7 spotted that
> >
> > In file included from drivers/gpu/drm/i915/i915_gem_gtt.c:3791:0:
> > drivers/gpu/drm/i915/selftests/i915_gem_gtt.c: In function ‘pot_hole’:
> > drivers/gpu/drm/i915/selftests/i915_gem_gtt.c:594:6: error: ‘err’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> >
> > So set it to 0 should we ever skip over a hole smaller than a few pages.
> >
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Matthew Auld <matthew.auld at intel.com>
> Reviewed-by: Matthew Auld <matthew.auld at intel.com>

Thanks, I'm ignoring kbuild reporting gcc-4.4 failures, seems like it is
doomed as the compiler doesn't support named initialisers for anonymous
unions, so the false positives it also generates are going to be lost.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list