Skip to content

Commit

Permalink
perf/bpf: Change the !CONFIG_BPF_SYSCALL stubs to static inlines
Browse files Browse the repository at this point in the history
Otherwise the compiler will be unhappy if they go unused,
which they do on allnoconfigs.

Cc: Kyle Huey <khuey@kylehuey.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Ingo Molnar authored and Kernel Patches Daemon committed Apr 26, 2024
1 parent 32025f0 commit ed32aeb
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions kernel/events/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -9619,21 +9619,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
Expand Down

0 comments on commit ed32aeb

Please sign in to comment.