]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Fix 'dubious one-bit signed bitfield' warnings
authorMatthieu Baerts <matthieu.baerts@tessares.net>
Mon, 11 Jul 2022 08:12:00 +0000 (10:12 +0200)
committerAndrii Nakryiko <andrii@kernel.org>
Tue, 12 Jul 2022 04:18:55 +0000 (21:18 -0700)
commit1b8a8a2f105aa59bdbe9c3f06e3ccf2e27e6ade1
tree1ec09473e163fd7c672d03215038ad7b867a2c82
parenta993f742761b90b5f602e34ac50619412bfe8e2d
bpf: Fix 'dubious one-bit signed bitfield' warnings

Our CI[1] reported these warnings when using Sparse:

  $ touch net/mptcp/bpf.c
  $ make C=1 net/mptcp/bpf.o
  net/mptcp/bpf.c: note: in included file:
  include/linux/bpf_verifier.h:348:26: error: dubious one-bit signed bitfield
  include/linux/bpf_verifier.h:349:29: error: dubious one-bit signed bitfield

Set them as 'unsigned' to avoid warnings.

[1] https://github.com/multipath-tcp/mptcp_net-next/actions/runs/2643588487

Fixes: 3eddb97c0810 ("bpf: Inline calls to bpf_loop when callback is known")
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20220711081200.2081262-1-matthieu.baerts@tessares.net
include/linux/bpf_verifier.h