[tip: perf/core] perf/bpf: Mark perf_event_set_bpf_handler() and perf_event_free_bpf_handler() as inline too
From: tip-bot2 for Ingo Molnar
Date: Sun Apr 14 2024 - 16:47:18 EST
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 854dd99b5ddc9d90e31e5f112462a5994dd31810
Gitweb: https://git.kernel.org/tip/854dd99b5ddc9d90e31e5f112462a5994dd31810
Author: Ingo Molnar <mingo@xxxxxxxxxx>
AuthorDate: Sun, 14 Apr 2024 22:33:27 +02:00
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitterDate: Sun, 14 Apr 2024 22:35:26 +02:00
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@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: Kyle Huey <khuey@xxxxxxxxxxxx>
---
kernel/events/core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index da9d9a1..6b0a66e 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;