* [PATCH bpf-next v4 5/5] bpftool: remove function free_btf_vmlinux()
@ 2022-11-20 11:26 Sahid Orentino Ferdjaoui
0 siblings, 0 replies; only message in thread
From: Sahid Orentino Ferdjaoui @ 2022-11-20 11:26 UTC (permalink / raw)
To: bpf, ast, daniel, andrii, quentin, yhs
Cc: martin.lau, song, john.fastabend, kpsingh, sdf, haoluo, jolsa,
Sahid Orentino Ferdjaoui
The function contains a single btf__free() call which can be
inlined. Credits to Yonghong Song.
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@industrialdiscipline.com>
Acked-by: Yonghong Song <yhs@fb.com>
Suggested-by: Yonghong Song <yhs@fb.com>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
---
tools/bpf/bpftool/map.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c
index eb362bd3d2c9..88911d3aa2d9 100644
--- a/tools/bpf/bpftool/map.c
+++ b/tools/bpf/bpftool/map.c
@@ -811,11 +811,6 @@ static void free_map_kv_btf(struct btf *btf)
btf__free(btf);
}
-static void free_btf_vmlinux(void)
-{
- btf__free(btf_vmlinux);
-}
-
static int
map_dump(int fd, struct bpf_map_info *info, json_writer_t *wtr,
bool show_header)
@@ -952,7 +947,7 @@ static int do_dump(int argc, char **argv)
close(fds[i]);
exit_free:
free(fds);
- free_btf_vmlinux();
+ btf__free(btf_vmlinux);
return err;
}
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-20 11:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-20 11:26 [PATCH bpf-next v4 5/5] bpftool: remove function free_btf_vmlinux() Sahid Orentino Ferdjaoui
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.