Commit 93d3fde7 authored by Ingo Molnar's avatar Ingo Molnar
Browse files

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: default avatarIngo Molnar <mingo@kernel.org>
Cc: Kyle Huey <me@kylehuey.com>
Link: https://lore.kernel.org/r/ZhkE9F4dyfR2dH2D@gmail.com
parent a265c9f6
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -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,
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,
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