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

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: 7ccbc02b1076 ("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>
tools/testing/selftests/net/rxtimestamp.c