mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
selftests/net: so_txtime: fix clang issues for target arch PowerPC
[ Upstream commitb4da96ffd3] 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:af5136f950("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d817b2c8d3
commit
222dbeca05
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user