bpf: flatten bpf_probe_register call chain
bpf_probe_register() and __bpf_probe_register() have identical signatures and bpf_probe_register() just redirect to __bpf_probe_register(). So get rid of this extra function call step to simplify following the source code. It has no difference at runtime due to inlining, of course. Acked-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Message-ID: <20240319233852.1977493-2-andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
This commit is contained in:
parent
f803bcf920
commit
6b9c2950c9
@ -2425,7 +2425,7 @@ BPF_TRACE_DEFN_x(10);
|
||||
BPF_TRACE_DEFN_x(11);
|
||||
BPF_TRACE_DEFN_x(12);
|
||||
|
||||
static int __bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *prog)
|
||||
int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *prog)
|
||||
{
|
||||
struct tracepoint *tp = btp->tp;
|
||||
|
||||
@ -2443,11 +2443,6 @@ static int __bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *
|
||||
prog);
|
||||
}
|
||||
|
||||
int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *prog)
|
||||
{
|
||||
return __bpf_probe_register(btp, prog);
|
||||
}
|
||||
|
||||
int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *prog)
|
||||
{
|
||||
return tracepoint_probe_unregister(btp->tp, (void *)btp->bpf_func, prog);
|
||||
|
Loading…
x
Reference in New Issue
Block a user