summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/net
diff options
context:
space:
mode:
authorTanner Love <tannerlove@google.com>2020-07-27 12:25:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-08-05 10:06:02 +0200
commit7846460c1d7d343e6996c00b9d12f61951cc1a93 (patch)
treed6372696a752c4cd74931b3fe712fc3c976942a0 /tools/testing/selftests/net
parentfbd97d5b22086bff517c7fefdc29453e5894c4f6 (diff)
downloadlinux-stable-7846460c1d7d343e6996c00b9d12f61951cc1a93.tar.gz
linux-stable-7846460c1d7d343e6996c00b9d12f61951cc1a93.tar.bz2
linux-stable-7846460c1d7d343e6996c00b9d12f61951cc1a93.zip
selftests/net: psock_fanout: fix clang issues for target arch PowerPC
[ Upstream commit 64f9ede2274980076423583683d44480909b7a40 ] Clang 9 threw: warning: format specifies type 'unsigned short' but the argument has \ type 'int' [-Wformat] typeflags, PORT_BASE, PORT_BASE + port_off); Tested: make -C tools/testing/selftests TARGETS="net" run_tests Fixes: 77f65ebdca50 ("packet: packet fanout rollover during socket overload") 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>
Diffstat (limited to 'tools/testing/selftests/net')
-rw-r--r--tools/testing/selftests/net/psock_fanout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/net/psock_fanout.c b/tools/testing/selftests/net/psock_fanout.c
index bd9b9632c72b..f496ba3b1cd3 100644
--- a/tools/testing/selftests/net/psock_fanout.c
+++ b/tools/testing/selftests/net/psock_fanout.c
@@ -364,7 +364,8 @@ static int test_datapath(uint16_t typeflags, int port_off,
int fds[2], fds_udp[2][2], ret;
fprintf(stderr, "\ntest: datapath 0x%hx ports %hu,%hu\n",
- typeflags, PORT_BASE, PORT_BASE + port_off);
+ typeflags, (uint16_t)PORT_BASE,
+ (uint16_t)(PORT_BASE + port_off));
fds[0] = sock_fanout_open(typeflags, 0);
fds[1] = sock_fanout_open(typeflags, 0);