提交 80cdce76 编写于 作者: W Wang Nan 提交者: Arnaldo Carvalho de Melo

perf bpf: Rename bpf_prog_priv__clear() to clear_prog_priv()

The name of bpf_prog_priv__clear() doesn't follow perf's naming
convention. bpf_prog_priv__delete() seems to be a better name. However,
bpf_prog_priv__delete() should be a method of 'struct bpf_prog_priv',
but its first parameter is 'struct bpf_program'.

It is callback from libbpf to clear priv structures when destroying a
bpf program. It is actually a method of bpf_program (libbpf object), but
bpf_program__ functions should be provided by libbpf.

This patch removes the prefix of that function.
Signed-off-by: NWang Nan <wangnan0@huawei.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
Cc: Cody P Schafer <dev@codyps.com>
Cc: He Kuang <hekuang@huawei.com>
Cc: Jeremie Galarneau <jeremie.galarneau@efficios.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kirill Smelkov <kirr@nexedi.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1455882283-79592-4-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 b002f3bb
...@@ -108,8 +108,8 @@ void bpf__clear(void) ...@@ -108,8 +108,8 @@ void bpf__clear(void)
} }
static void static void
bpf_prog_priv__clear(struct bpf_program *prog __maybe_unused, clear_prog_priv(struct bpf_program *prog __maybe_unused,
void *_priv) void *_priv)
{ {
struct bpf_prog_priv *priv = _priv; struct bpf_prog_priv *priv = _priv;
...@@ -337,7 +337,7 @@ config_bpf_program(struct bpf_program *prog) ...@@ -337,7 +337,7 @@ config_bpf_program(struct bpf_program *prog)
} }
pr_debug("bpf: config '%s' is ok\n", config_str); pr_debug("bpf: config '%s' is ok\n", config_str);
err = bpf_program__set_private(prog, priv, bpf_prog_priv__clear); err = bpf_program__set_private(prog, priv, clear_prog_priv);
if (err) { if (err) {
pr_debug("Failed to set priv for program '%s'\n", config_str); pr_debug("Failed to set priv for program '%s'\n", config_str);
goto errout; goto errout;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册