]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Jul 2020 19:56:58 +0000 (12:56 -0700)
commit044811e68d308395325b7ca9f4f04000576c0dd3
treec60637bfe626ee236ad612ef71b8561c96cedf92
parent1599aee1c849c03cb231e425151dd0977267f3fd
selftests/net: so_txtime: fix clang issues for target arch PowerPC

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: 9d81cccfbca9 ("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>
tools/testing/selftests/net/so_txtime.c