summaryrefslogtreecommitdiff
path: root/samples/bpf/Makefile
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@sifive.com>2022-07-14 13:03:22 +0300
committerAndrii Nakryiko <andrii@kernel.org>2022-07-15 19:55:20 +0300
commita2a5580fcbf808e7c2310e4959b62f9d2157fdb6 (patch)
tree05cbe84ca944c60cb926bfeb37fccf8975b4f048 /samples/bpf/Makefile
parent9c7c48d6a1e2eb5192ad5294c1c4dbd42a88e88b (diff)
downloadlinux-a2a5580fcbf808e7c2310e4959b62f9d2157fdb6.tar.xz
bpf: Fix check against plain integer v 'NULL'
When checking with sparse, btf_show_type_value() is causing a warning about checking integer vs NULL when the macro is passed a pointer, due to the 'value != 0' check. Stop sparse complaining about any type-casting by adding a cast to the typeof(value). This fixes the following sparse warnings: kernel/bpf/btf.c:2579:17: warning: Using plain integer as NULL pointer kernel/bpf/btf.c:2581:17: warning: Using plain integer as NULL pointer kernel/bpf/btf.c:3407:17: warning: Using plain integer as NULL pointer kernel/bpf/btf.c:3758:9: warning: Using plain integer as NULL pointer Signed-off-by: Ben Dooks <ben.dooks@sifive.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Link: https://lore.kernel.org/bpf/20220714100322.260467-1-ben.dooks@sifive.com
Diffstat (limited to 'samples/bpf/Makefile')
0 files changed, 0 insertions, 0 deletions