Skip to content
Commit 583c5318 authored by Mathieu Malaterre's avatar Mathieu Malaterre Committed by Daniel Borkmann
Browse files

bpf: Make function btf_name_offset_valid static



Initially in commit 69b693f0 ("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 23127b33 ("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: 23127b33 ("bpf: Create a new btf_name_by_offset() for non type name use case")
Signed-off-by: default avatarMathieu Malaterre <malat@debian.org>
Acked-by: default avatarMartin KaFai Lau <kafai@fb.com>
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parent f67ad87a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment