diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-10-09 19:11:39 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-10-12 19:57:58 +0300 |
commit | f52e7ec7876603b4edb0bff412255f8f1624ecc4 (patch) | |
tree | c8d668fd83f6f30c52c6ee0f89921299f0ad6eed /tests/gen7_forcewake_mt.c | |
parent | b8a77dd6c8e9f73493b2f86f293ff9c06fc08049 (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/gen7_forcewake_mt.c')
-rw-r--r-- | tests/gen7_forcewake_mt.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/gen7_forcewake_mt.c b/tests/gen7_forcewake_mt.c index f7a5aa19..dea1e8a6 100644 --- a/tests/gen7_forcewake_mt.c +++ b/tests/gen7_forcewake_mt.c @@ -190,8 +190,7 @@ igt_simple_main gem_execbuf(t[0].fd, &execbuf); gem_sync(t[0].fd, exec[1].handle); - p = __gem_mmap__gtt(t[0].fd, exec[0].handle, 4096, PROT_READ); - igt_assert(p); + p = gem_mmap__gtt(t[0].fd, exec[0].handle, 4096, PROT_READ); igt_info("[%d]={ %08x %08x }\n", i, p[0], p[1]); igt_assert(p[0] & 2); |