From f52e7ec7876603b4edb0bff412255f8f1624ecc4 Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Fri, 9 Oct 2015 19:11:39 +0300 Subject: Replace __gem_mmap__{cpu,gtt,wc}() + igt_assert() with gem_mmap__{cpu,gtt,wc}() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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ä Stochastically-reviwewed-by: Chris Wilson --- benchmarks/gem_blt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'benchmarks/gem_blt.c') diff --git a/benchmarks/gem_blt.c b/benchmarks/gem_blt.c index e7225410..181a5f12 100644 --- a/benchmarks/gem_blt.c +++ b/benchmarks/gem_blt.c @@ -177,8 +177,7 @@ static int run(int object, int batch, int count, int reps) fd = drm_open_driver(DRIVER_INTEL); handle = gem_create(fd, size); - buf = __gem_mmap__cpu(fd, handle, 0, size, PROT_WRITE); - igt_assert(buf); + buf = gem_mmap__cpu(fd, handle, 0, size, PROT_WRITE); gen = intel_gen(intel_get_drm_devid(fd)); has_64bit_reloc = gen >= 8; -- cgit v1.2.3