diff options
author | Tanner Love <tannerlove@google.com> | 2020-07-27 12:25:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-08-05 09:59:45 +0200 |
commit | 222dbeca05fbc9d9b614b516ca0d65663d4c6c29 (patch) | |
tree | 5d279b0d69bb557f98d5a7a73e51874f30fa8f25 /tools | |
parent | d817b2c8d3cf541351c0e7fefecf7b104c47f08b (diff) | |
download | linux-stable-222dbeca05fbc9d9b614b516ca0d65663d4c6c29.tar.gz linux-stable-222dbeca05fbc9d9b614b516ca0d65663d4c6c29.tar.bz2 linux-stable-222dbeca05fbc9d9b614b516ca0d65663d4c6c29.zip |
selftests/net: so_txtime: fix clang issues for target arch PowerPC
[ Upstream commit b4da96ffd30bd4a305045ba5c9b0de5d4aa20dc7 ]
On powerpcle, int64_t maps to long long. Clang 9 threw:
warning: absolute value function 'labs' given an argument of type \
'long long' but has parameter of type 'long' which may cause \
truncation of value [-Wabsolute-value]
if (labs(tstop - texpect) > cfg_variance_us)
Tested: make -C tools/testing/selftests TARGETS="net" run_tests
Fixes: af5136f95045 ("selftests/net: SO_TXTIME with ETF and FQ")
Signed-off-by: Tanner Love <tannerlove@google.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/net/so_txtime.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/so_txtime.c b/tools/testing/selftests/net/so_txtime.c index ceaad78e9667..3155fbbf644b 100644 --- a/tools/testing/selftests/net/so_txtime.c +++ b/tools/testing/selftests/net/so_txtime.c @@ -121,7 +121,7 @@ static bool do_recv_one(int fdr, struct timed_send *ts) if (rbuf[0] != ts->data) error(1, 0, "payload mismatch. expected %c", ts->data); - if (labs(tstop - texpect) > cfg_variance_us) + if (llabs(tstop - texpect) > cfg_variance_us) error(1, 0, "exceeds variance (%d us)", cfg_variance_us); return false; |