lkml.org 
[lkml]   [2024]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip: perf/core] perf/bpf: Change the !CONFIG_BPF_SYSCALL stubs to static inlines
The following commit has been merged into the perf/core branch of tip:

Commit-ID: 93d3fde7fd19c2e2cde7220e7986f9a75e9c5680
Gitweb: https://git.kernel.org/tip/93d3fde7fd19c2e2cde7220e7986f9a75e9c5680
Author: Ingo Molnar <mingo@kernel.org>
AuthorDate: Fri, 12 Apr 2024 11:55:00 +02:00
Committer: Ingo Molnar <mingo@kernel.org>
CommitterDate: Fri, 12 Apr 2024 11:56:00 +02:00

perf/bpf: Change the !CONFIG_BPF_SYSCALL stubs to static inlines

Otherwise the compiler will be unhappy if they go unused,
which they do on allnoconfigs.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Kyle Huey <me@kylehuey.com>
Link: https://lore.kernel.org/r/ZhkE9F4dyfR2dH2D@gmail.com
---
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 2212670..6708c11 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -9638,21 +9638,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
\
 
 \ /
  Last update: 2024-05-27 16:37    [W:0.071 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site