]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Make function btf_name_offset_valid static
authorMathieu Malaterre <malat@debian.org>
Wed, 16 Jan 2019 19:29:40 +0000 (20:29 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 17 Jan 2019 15:47:05 +0000 (16:47 +0100)
commit1f225274d171c9b14ec507c9b1f8eb38d0757c1d
tree02355c3723b806e5176efc7e5c514acd3a0eae73
parent80b9adaae8970a55262e1010ea9fed6c5655a979
bpf: Make function btf_name_offset_valid static

Initially in commit af3cbd4c20fa ("bpf: btf: Introduce BPF Type Format
(BTF)") the function 'btf_name_offset_valid' was introduced as static
function it was later on changed to a non-static one, and then finally
in commit 505c09412335 ("bpf: Create a new btf_name_by_offset() for
non type name use case") the function prototype was removed.

Revert back to original implementation and make the function static.
Remove warning triggered with W=1:

  kernel/bpf/btf.c:470:6: warning: no previous prototype for 'btf_name_offset_valid' [-Wmissing-prototypes]

Fixes: 505c09412335 ("bpf: Create a new btf_name_by_offset() for non type name use case")
Signed-off-by: Mathieu Malaterre <malat@debian.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
kernel/bpf/btf.c