[Intel-gfx] [PATCH i-g-t 7/7] Replace __gem_mmap__{cpu, gtt, wc}() + igt_assert() with gem_mmap__{cpu, gtt, wc}()

Chris Wilson chris at chris-wilson.co.uk
Fri Oct 9 09:55:44 PDT 2015


On Fri, Oct 09, 2015 at 07:19:16PM +0300, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> gem_mmap__{cpu,gtt,wc}() already has the assert built in, so replace
>  __gem_mmap__{cpu,gtt,wc}() + igt_assert() with it.
> 
> Mostly done with coccinelle, with some manual help:
> @@
> identifier I;
> expression E1, E2, E3, E4, E5, E6;
> @@
> (
> -  I = __gem_mmap__gtt(E1, E2, E3, E4);
> +  I = gem_mmap__gtt(E1, E2, E3, E4);
> ...
> -  igt_assert(I);
> |
> -  I = __gem_mmap__cpu(E1, E2, E3, E4, E5);
> +  I = gem_mmap__cpu(E1, E2, E3, E4, E5);
> ...
> -  igt_assert(I);
> |
> -  I = __gem_mmap__wc(E1, E2, E3, E4, E5);
> +  I = gem_mmap__wc(E1, E2, E3, E4, E5);
> ...
> -  igt_assert(I);
> )
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>

Looks like by the end we miss a few asserts (a few too many __gem_mmap
left over), but that is just a continuation of the state of affairs.

Series lgtm,
Stochastically-reviwewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list