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

selftests/bpf: Simplify the calculation of variables

Fix the following coccicheck warnings:

./tools/testing/selftests/bpf/test_sockmap.c:735:35-37: WARNING !A || A
&& B is equivalent to !A || B.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/1614757930-17197-1-git-send-email-jiapeng.chong@linux.alibaba.com

authored by

Jiapeng Chong and committed by
Alexei Starovoitov
bce86231 46ac034f

+1 -1
+1 -1
tools/testing/selftests/bpf/test_sockmap.c
··· 732 732 * socket is not a valid test. So in this case lets not 733 733 * enable kTLS but still run the test. 734 734 */ 735 - if (!txmsg_redir || (txmsg_redir && txmsg_ingress)) { 735 + if (!txmsg_redir || txmsg_ingress) { 736 736 err = sockmap_init_ktls(opt->verbose, rx_fd); 737 737 if (err) 738 738 return err;