summaryrefslogtreecommitdiff
path: root/benchmarks/gem_syslatency.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-08-27 17:13:25 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-08-28 08:50:38 +0100
commita562ad36d1a7efa3053688429792ce97f188d758 (patch)
tree59921c9fb6441514d69fd70d182544cecf7e6089 /benchmarks/gem_syslatency.c
parenta4e8217bcdfef9bb523f26a9084bbf615a6e8abb (diff)
benchmarks: Use labs() for abs(long)
e.g. benchmarks/gem_wsim.c:2936:4: warning: absolute value function ‘abs’ given an argument of type ‘long int’ but has parameter of type ‘int’ which may cause truncation of value [-Wabsolute-value] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Simon Ser <simon.ser@intel.com>
Diffstat (limited to 'benchmarks/gem_syslatency.c')
-rw-r--r--benchmarks/gem_syslatency.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/benchmarks/gem_syslatency.c b/benchmarks/gem_syslatency.c
index 7671dc43..d7cf0ed4 100644
--- a/benchmarks/gem_syslatency.c
+++ b/benchmarks/gem_syslatency.c
@@ -343,7 +343,7 @@ static unsigned long calibrate_nop(unsigned int target_us,
sz = loops * sz / elapsed(&t_start, &t_end) * 1e3 * target_us;
sz = ALIGN(sz, sizeof(uint32_t));
} while (elapsed(&t_0, &t_end) < 5 ||
- abs(sz - prev) > (sz * tolerance_pct / 100));
+ labs(sz - prev) > (sz * tolerance_pct / 100));
close(fd);