Skip to content

Commit fc173d0

Browse files
ytcoodeKernel Patches Daemon
authored andcommitted
bpf: Remove unused parameter from find_kfunc_desc_btf()
The func_id parameter in find_kfunc_desc_btf() is not used, get rid of it. Signed-off-by: Yuntao Wang <[email protected]>
1 parent d8e751e commit fc173d0

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

kernel/bpf/verifier.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,8 +1815,7 @@ void bpf_free_kfunc_btf_tab(struct bpf_kfunc_btf_tab *tab)
18151815
kfree(tab);
18161816
}
18171817

1818-
static struct btf *find_kfunc_desc_btf(struct bpf_verifier_env *env,
1819-
u32 func_id, s16 offset)
1818+
static struct btf *find_kfunc_desc_btf(struct bpf_verifier_env *env, s16 offset)
18201819
{
18211820
if (offset) {
18221821
if (offset < 0) {
@@ -1891,7 +1890,7 @@ static int add_kfunc_call(struct bpf_verifier_env *env, u32 func_id, s16 offset)
18911890
prog_aux->kfunc_btf_tab = btf_tab;
18921891
}
18931892

1894-
desc_btf = find_kfunc_desc_btf(env, func_id, offset);
1893+
desc_btf = find_kfunc_desc_btf(env, offset);
18951894
if (IS_ERR(desc_btf)) {
18961895
verbose(env, "failed to find BTF for kernel function\n");
18971896
return PTR_ERR(desc_btf);
@@ -2360,7 +2359,7 @@ static const char *disasm_kfunc_name(void *data, const struct bpf_insn *insn)
23602359
if (insn->src_reg != BPF_PSEUDO_KFUNC_CALL)
23612360
return NULL;
23622361

2363-
desc_btf = find_kfunc_desc_btf(data, insn->imm, insn->off);
2362+
desc_btf = find_kfunc_desc_btf(data, insn->off);
23642363
if (IS_ERR(desc_btf))
23652364
return "<error>";
23662365

@@ -7237,7 +7236,7 @@ static int check_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn,
72377236
if (!insn->imm)
72387237
return 0;
72397238

7240-
desc_btf = find_kfunc_desc_btf(env, insn->imm, insn->off);
7239+
desc_btf = find_kfunc_desc_btf(env, insn->off);
72417240
if (IS_ERR(desc_btf))
72427241
return PTR_ERR(desc_btf);
72437242

0 commit comments

Comments
 (0)