summaryrefslogtreecommitdiff
path: root/kernel/events/core.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2024-04-14 22:33:27 +0200
committerIngo Molnar <mingo@kernel.org>2024-04-14 22:35:26 +0200
commit854dd99b5ddc9d90e31e5f112462a5994dd31810 (patch)
tree25cba84a41ae9d6cd5f38e26cc4dc42efe00422f /kernel/events/core.c
parente224d1c1fb93f258030186b4878abe105c296ac1 (diff)
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: Ingo Molnar <mingo@kernel.org> Cc: linux-kernel@vger.kernel.org Cc: Kyle Huey <khuey@kylehuey.com>
Diffstat (limited to 'kernel/events/core.c')
-rw-r--r--kernel/events/core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index da9d9a1f4dca..6b0a66ed2ae3 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9583,9 +9583,9 @@ out:
return ret;
}
-static int perf_event_set_bpf_handler(struct perf_event *event,
- struct bpf_prog *prog,
- u64 bpf_cookie)
+static inline int perf_event_set_bpf_handler(struct perf_event *event,
+ struct bpf_prog *prog,
+ u64 bpf_cookie)
{
if (event->overflow_handler_context)
/* hw breakpoint or kernel counter */
@@ -9619,7 +9619,7 @@ static int perf_event_set_bpf_handler(struct perf_event *event,
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;