From: Sahid Orentino Ferdjaoui Date: Sun, 20 Nov 2022 11:26:43 +0000 (+0000) Subject: bpftool: remove function free_btf_vmlinux() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=52df1a8aabadeba1e4c2fe157784637ddec76301;p=linux.git bpftool: remove function free_btf_vmlinux() The function contains a single btf__free() call which can be inlined. Credits to Yonghong Song. Signed-off-by: Sahid Orentino Ferdjaoui Acked-by: Yonghong Song Suggested-by: Yonghong Song Reviewed-by: Quentin Monnet Link: https://lore.kernel.org/r/20221120112515.38165-6-sahid.ferdjaoui@industrialdiscipline.com Signed-off-by: Alexei Starovoitov --- diff --git a/tools/bpf/bpftool/map.c b/tools/bpf/bpftool/map.c index eb362bd3d2c9a..88911d3aa2d9c 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 @@ exit_close: close(fds[i]); exit_free: free(fds); - free_btf_vmlinux(); + btf__free(btf_vmlinux); return err; }