selftests/net: so_txtime: fix clang issues for target arch PowerPC
authorTanner Love <tannerlove@google.com>
Mon, 27 Jul 2020 16:25:30 +0000 (12:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2020 07:58:40 +0000 (09:58 +0200)
commit4fa7dc1ea47eb17ad33f28ed2c58d387f526e708
tree0e1ce3214f47bafa4457e20e0a5f266c36ece037
parent905fccec554c8163cfdb4e6ddbf3706febcc8d9f
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>
tools/testing/selftests/net/so_txtime.c