Commit 854dd99b authored by Ingo Molnar's avatar Ingo Molnar

perf/bpf: Mark perf_event_set_bpf_handler() and perf_event_free_bpf_handler() as inline too

They can be unused with certain Kconfig variations:

  kernel/events/core.c:9622:13: warning: ‘perf_event_free_bpf_handler’ defined but not used [-Wunused-function]
  kernel/events/core.c:9586:12: warning: ‘perf_event_set_bpf_handler’ defined but not used [-Wunused-function]

Since they are both single-use, mark them inline.
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: Kyle Huey <khuey@kylehuey.com>
parent e224d1c1
...@@ -9583,9 +9583,9 @@ static int bpf_overflow_handler(struct perf_event *event, ...@@ -9583,9 +9583,9 @@ static int bpf_overflow_handler(struct perf_event *event,
return ret; return ret;
} }
static int perf_event_set_bpf_handler(struct perf_event *event, static inline int perf_event_set_bpf_handler(struct perf_event *event,
struct bpf_prog *prog, struct bpf_prog *prog,
u64 bpf_cookie) u64 bpf_cookie)
{ {
if (event->overflow_handler_context) if (event->overflow_handler_context)
/* hw breakpoint or kernel counter */ /* hw breakpoint or kernel counter */
...@@ -9619,7 +9619,7 @@ static int perf_event_set_bpf_handler(struct perf_event *event, ...@@ -9619,7 +9619,7 @@ static int perf_event_set_bpf_handler(struct perf_event *event,
return 0; return 0;
} }
static void perf_event_free_bpf_handler(struct perf_event *event) static inline void perf_event_free_bpf_handler(struct perf_event *event)
{ {
struct bpf_prog *prog = event->prog; struct bpf_prog *prog = event->prog;
......
Markdown is supported
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