summaryrefslogtreecommitdiff
path: root/tests/gem_fence_thrash.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2015-10-09 19:11:39 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2015-10-12 19:57:58 +0300
commitf52e7ec7876603b4edb0bff412255f8f1624ecc4 (patch)
treec8d668fd83f6f30c52c6ee0f89921299f0ad6eed /tests/gem_fence_thrash.c
parentb8a77dd6c8e9f73493b2f86f293ff9c06fc08049 (diff)
Replace __gem_mmap__{cpu,gtt,wc}() + igt_assert() with gem_mmap__{cpu,gtt,wc}()
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@linux.intel.com> Stochastically-reviwewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_fence_thrash.c')
-rw-r--r--tests/gem_fence_thrash.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/gem_fence_thrash.c b/tests/gem_fence_thrash.c
index 1161e73d..52095f26 100644
--- a/tests/gem_fence_thrash.c
+++ b/tests/gem_fence_thrash.c
@@ -67,15 +67,14 @@ bo_create (int fd, int tiling)
handle = gem_create(fd, OBJECT_SIZE);
/* dirty cpu caches a bit ... */
- ptr = __gem_mmap__cpu(fd, handle, 0, OBJECT_SIZE, PROT_READ | PROT_WRITE);
- igt_assert(ptr);
+ ptr = gem_mmap__cpu(fd, handle, 0, OBJECT_SIZE,
+ PROT_READ | PROT_WRITE);
memset(ptr, 0, OBJECT_SIZE);
munmap(ptr, OBJECT_SIZE);
gem_set_tiling(fd, handle, tiling, 1024);
- ptr = __gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE);
- igt_assert(ptr);
+ ptr = gem_mmap__gtt(fd, handle, OBJECT_SIZE, PROT_READ | PROT_WRITE);
gem_set_domain(fd, handle, I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
gem_close(fd, handle);