diff mbox series

[bpf-next] bpf: Remove unused parameter from find_kfunc_desc_btf()

Message ID 20220505070114.3522522-1-ytcoode@gmail.com (mailing list archive)
State Accepted
Commit 43bf087848ab796fab93c9b4de59a7ed70aab94a
Delegated to: BPF
Headers show
Series [bpf-next] bpf: Remove unused parameter from find_kfunc_desc_btf() | expand

Checks

Context Check Description
bpf/vmtest-bpf-next-PR success PR summary
netdev/tree_selection success Clearly marked for bpf-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 20 this patch: 20
netdev/cc_maintainers success CCed 10 of 10 maintainers
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 20 this patch: 20
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 33 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
bpf/vmtest-bpf-next-VM_Test-1 success Logs for Kernel LATEST on ubuntu-latest + selftests
bpf/vmtest-bpf-next-VM_Test-2 success Logs for Kernel LATEST on z15 + selftests

Commit Message

Yuntao Wang May 5, 2022, 7:01 a.m. UTC
The func_id parameter in find_kfunc_desc_btf() is not used, get rid of it.

Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
---
 kernel/bpf/verifier.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Comments

Martin KaFai Lau May 9, 2022, 5:52 p.m. UTC | #1
On Thu, May 05, 2022 at 03:01:14PM +0800, Yuntao Wang wrote:
> The func_id parameter in find_kfunc_desc_btf() is not used, get rid of it.
> 
> Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
Although it is a bpf-next material, it is still useful to have a Fixes tag
such that the reviewer can quickly understand how the current code got here.

Fixes: 2357672c54c3 ("bpf: Introduce BPF support for kernel module function calls")
Acked-by: Martin KaFai Lau <kafai@fb.com>
Kumar Kartikeya Dwivedi May 9, 2022, 7:50 p.m. UTC | #2
On Mon, May 09, 2022 at 11:22:42PM IST, Martin KaFai Lau wrote:
> On Thu, May 05, 2022 at 03:01:14PM +0800, Yuntao Wang wrote:
> > The func_id parameter in find_kfunc_desc_btf() is not used, get rid of it.
> >
> > Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
> Although it is a bpf-next material, it is still useful to have a Fixes tag
> such that the reviewer can quickly understand how the current code got here.
>
> Fixes: 2357672c54c3 ("bpf: Introduce BPF support for kernel module function calls")
> Acked-by: Martin KaFai Lau <kafai@fb.com>

Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>

--
Kartikeya
patchwork-bot+netdevbpf@kernel.org May 10, 2022, 12:50 a.m. UTC | #3
Hello:

This patch was applied to bpf/bpf-next.git (master)
by Andrii Nakryiko <andrii@kernel.org>:

On Thu,  5 May 2022 15:01:14 +0800 you wrote:
> The func_id parameter in find_kfunc_desc_btf() is not used, get rid of it.
> 
> Signed-off-by: Yuntao Wang <ytcoode@gmail.com>
> ---
>  kernel/bpf/verifier.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)

Here is the summary with links:
  - [bpf-next] bpf: Remove unused parameter from find_kfunc_desc_btf()
    https://git.kernel.org/bpf/bpf-next/c/43bf087848ab

You are awesome, thank you!
diff mbox series

Patch

diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 813f6ee80419..c27fee73a2cb 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -1815,8 +1815,7 @@  void bpf_free_kfunc_btf_tab(struct bpf_kfunc_btf_tab *tab)
 	kfree(tab);
 }
 
-static struct btf *find_kfunc_desc_btf(struct bpf_verifier_env *env,
-				       u32 func_id, s16 offset)
+static struct btf *find_kfunc_desc_btf(struct bpf_verifier_env *env, s16 offset)
 {
 	if (offset) {
 		if (offset < 0) {
@@ -1891,7 +1890,7 @@  static int add_kfunc_call(struct bpf_verifier_env *env, u32 func_id, s16 offset)
 		prog_aux->kfunc_btf_tab = btf_tab;
 	}
 
-	desc_btf = find_kfunc_desc_btf(env, func_id, offset);
+	desc_btf = find_kfunc_desc_btf(env, offset);
 	if (IS_ERR(desc_btf)) {
 		verbose(env, "failed to find BTF for kernel function\n");
 		return PTR_ERR(desc_btf);
@@ -2360,7 +2359,7 @@  static const char *disasm_kfunc_name(void *data, const struct bpf_insn *insn)
 	if (insn->src_reg != BPF_PSEUDO_KFUNC_CALL)
 		return NULL;
 
-	desc_btf = find_kfunc_desc_btf(data, insn->imm, insn->off);
+	desc_btf = find_kfunc_desc_btf(data, insn->off);
 	if (IS_ERR(desc_btf))
 		return "<error>";
 
@@ -7237,7 +7236,7 @@  static int check_kfunc_call(struct bpf_verifier_env *env, struct bpf_insn *insn,
 	if (!insn->imm)
 		return 0;
 
-	desc_btf = find_kfunc_desc_btf(env, insn->imm, insn->off);
+	desc_btf = find_kfunc_desc_btf(env, insn->off);
 	if (IS_ERR(desc_btf))
 		return PTR_ERR(desc_btf);