selftests/net: rxtimestamp: fix clang issues for target arch PowerPC
authorTanner Love <tannerlove@google.com>
Mon, 27 Jul 2020 16:25:28 +0000 (12:25 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Aug 2020 07:58:40 +0000 (09:58 +0200)
commit5f2361f2710189e8ee8a22ffcd2bc4de78ed324c
tree6cfeb5043e374dd0e0a9e2a4ef4c1a713525f0af
parent49fe954ca02c51c0af0cf3fa54c88fd63c9d71d6
selftests/net: rxtimestamp: fix clang issues for target arch PowerPC

[ Upstream commit 955cbe91bcf782c09afe369c95a20f0a4b6dcc3c ]

The signedness of char is implementation-dependent. Some systems
(including PowerPC and ARM) use unsigned char. Clang 9 threw:
warning: result of comparison of constant -1 with expression of type \
'char' is always true [-Wtautological-constant-out-of-range-compare]
                                  &arg_index)) != -1) {

Tested: make -C tools/testing/selftests TARGETS="net" run_tests

Fixes: 16e781224198 ("selftests/net: Add a test to validate behavior of rx timestamps")
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/rxtimestamp.c