Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/bpf: Fix u32 variable compared with less than zero

Variable ret is compared with less than zero even though it was set as u32.
So u32 to int conversion is needed.

Signed-off-by: Kang Minchul <tegongkang@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Björn Töpel <bjorn@kernel.org>
Link: https://lore.kernel.org/r/20221105183656.86077-1-tegongkang@gmail.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>

authored by

Kang Minchul and committed by
Martin KaFai Lau
e8f50c4f 25906092

+2 -1
+2 -1
tools/testing/selftests/bpf/xskxceiver.c
··· 1006 1006 { 1007 1007 struct xsk_socket_info *xsk = ifobject->xsk; 1008 1008 bool use_poll = ifobject->use_poll; 1009 - u32 i, idx = 0, ret, valid_pkts = 0; 1009 + u32 i, idx = 0, valid_pkts = 0; 1010 + int ret; 1010 1011 1011 1012 while (xsk_ring_prod__reserve(&xsk->tx, BATCH_SIZE, &idx) < BATCH_SIZE) { 1012 1013 if (use_poll) {