diff options
author | Yonghong Song <yonghong.song@linux.dev> | 2024-03-26 05:14:53 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-03-29 02:31:41 +0100 |
commit | ad2b05286e94485070475e473963724fa657491c (patch) | |
tree | 68d8f28e5f7d7dbf306cc20d2961125248372bbe /tools/lib/bpf/libbpf.c | |
parent | selftests/bpf: Replace CHECK with ASSERT macros for ksyms test (diff) | |
download | linux-ad2b05286e94485070475e473963724fa657491c.tar.xz linux-ad2b05286e94485070475e473963724fa657491c.zip |
libbpf: Mark libbpf_kallsyms_parse static function
Currently libbpf_kallsyms_parse() function is declared as a global
function but actually it is not a API and there is no external
users in bpftool/bpf-selftests. So let us mark the function as
static.
Signed-off-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20240326041453.1197949-1-yonghong.song@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
-rw-r--r-- | tools/lib/bpf/libbpf.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c index d7d8f78f8846..1822fb8a02d2 100644 --- a/tools/lib/bpf/libbpf.c +++ b/tools/lib/bpf/libbpf.c @@ -7986,7 +7986,10 @@ static int bpf_object__sanitize_maps(struct bpf_object *obj) return 0; } -int libbpf_kallsyms_parse(kallsyms_cb_t cb, void *ctx) +typedef int (*kallsyms_cb_t)(unsigned long long sym_addr, char sym_type, + const char *sym_name, void *ctx); + +static int libbpf_kallsyms_parse(kallsyms_cb_t cb, void *ctx) { char sym_type, sym_name[500]; unsigned long long sym_addr; |