[PATCH stable/linux-6.6.y 7/9] perf/bpf: Change the !CONFIG_BPF_SYSCALL stubs to static inlines
From: Luo Gengkun
Date: Wed Nov 25 2026 - 23:03:15 EST
From: Ingo Molnar <mingo@xxxxxxxxxx>
[ Upstream commit 93d3fde7fd19c2e2cde7220e7986f9a75e9c5680 ]
Otherwise the compiler will be unhappy if they go unused,
which they do on allnoconfigs.
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Kyle Huey <me@xxxxxxxxxxxx>
Link: https://lore.kernel.org/r/ZhkE9F4dyfR2dH2D@xxxxxxxxx
Signed-off-by: Luo Gengkun <luogengkun@xxxxxxxxxxxxxxx>
---
kernel/events/core.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index a6d7fc2a9ab2..edced196597c 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9674,21 +9674,21 @@ static void perf_event_free_bpf_handler(struct perf_event *event)
bpf_prog_put(prog);
}
#else
-static int bpf_overflow_handler(struct perf_event *event,
- struct perf_sample_data *data,
- struct pt_regs *regs)
+static inline int bpf_overflow_handler(struct perf_event *event,
+ struct perf_sample_data *data,
+ struct pt_regs *regs)
{
return 1;
}
-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)
{
return -EOPNOTSUPP;
}
-static void perf_event_free_bpf_handler(struct perf_event *event)
+static inline void perf_event_free_bpf_handler(struct perf_event *event)
{
}
#endif
--
2.34.1