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

tools/net: Use bitwise instead of arithmetic operator for flags

This silences the following coccinelle warning:

"WARNING: sum of probable bitmasks, consider |"

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: jing yangyang <jing.yangyang@zte.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

jing yangyang and committed by
David S. Miller
fa16ee77 c1125062

+2 -2
+2 -2
tools/testing/selftests/net/psock_fanout.c
··· 111 111 static void sock_fanout_set_cbpf(int fd) 112 112 { 113 113 struct sock_filter bpf_filter[] = { 114 - BPF_STMT(BPF_LD+BPF_B+BPF_ABS, 80), /* ldb [80] */ 115 - BPF_STMT(BPF_RET+BPF_A, 0), /* ret A */ 114 + BPF_STMT(BPF_LD | BPF_B | BPF_ABS, 80), /* ldb [80] */ 115 + BPF_STMT(BPF_RET | BPF_A, 0), /* ret A */ 116 116 }; 117 117 struct sock_fprog bpf_prog; 118 118