From: Rafael Passos <rafael@rcpassos.me>
To: ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org
Cc: Rafael Passos <rafael@rcpassos.me>, bpf@vger.kernel.org
Subject: [PATCH bpf-next V2 2/3] bpf: remove unused parameter in __bpf_free_used_btfs
Date: Fri, 14 Jun 2024 23:24:09 -0300 [thread overview]
Message-ID: <20240615022641.210320-3-rafael@rcpassos.me> (raw)
In-Reply-To: <20240615022641.210320-1-rafael@rcpassos.me>
Fixes a compiler warning. The __bpf_free_used_btfs function
was taking an extra unused struct bpf_prog_aux *aux param
Signed-off-by: Rafael Passos <rafael@rcpassos.me>
---
include/linux/bpf.h | 3 +--
kernel/bpf/core.c | 5 ++---
kernel/bpf/verifier.c | 3 +--
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index f636b4998bf7..960780ef04e1 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -2933,8 +2933,7 @@ bpf_probe_read_kernel_common(void *dst, u32 size, const void *unsafe_ptr)
return ret;
}
-void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
- struct btf_mod_pair *used_btfs, u32 len);
+void __bpf_free_used_btfs(struct btf_mod_pair *used_btfs, u32 len);
static inline struct bpf_prog *bpf_prog_get_type(u32 ufd,
enum bpf_prog_type type)
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index f6951c33790d..ae2e1eeda0d4 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -2742,8 +2742,7 @@ static void bpf_free_used_maps(struct bpf_prog_aux *aux)
kfree(aux->used_maps);
}
-void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
- struct btf_mod_pair *used_btfs, u32 len)
+void __bpf_free_used_btfs(struct btf_mod_pair *used_btfs, u32 len)
{
#ifdef CONFIG_BPF_SYSCALL
struct btf_mod_pair *btf_mod;
@@ -2760,7 +2759,7 @@ void __bpf_free_used_btfs(struct bpf_prog_aux *aux,
static void bpf_free_used_btfs(struct bpf_prog_aux *aux)
{
- __bpf_free_used_btfs(aux, aux->used_btfs, aux->used_btf_cnt);
+ __bpf_free_used_btfs(aux->used_btfs, aux->used_btf_cnt);
kfree(aux->used_btfs);
}
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index acc9dd830807..c703612e04f7 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -18619,8 +18619,7 @@ static void release_maps(struct bpf_verifier_env *env)
/* drop refcnt of maps used by the rejected program */
static void release_btfs(struct bpf_verifier_env *env)
{
- __bpf_free_used_btfs(env->prog->aux, env->used_btfs,
- env->used_btf_cnt);
+ __bpf_free_used_btfs(env->used_btfs, env->used_btf_cnt);
}
/* convert pseudo BPF_LD_IMM64 into generic BPF_LD_IMM64 */
--
2.45.2
next prev parent reply other threads:[~2024-06-15 2:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-15 2:24 [PATCH bpf-next V2 0/3] Fix compiler warnings, looking for suggestions Rafael Passos
2024-06-15 2:24 ` [PATCH bpf-next V2 1/3] bpf: remove unused parameter in bpf_jit_binary_pack_finalize Rafael Passos
2024-06-15 2:24 ` Rafael Passos [this message]
2024-06-15 2:24 ` [PATCH bpf-next V2 3/3] bpf: remove redeclaration of new_n in bpf_verifier_vlog Rafael Passos
2024-06-17 8:45 ` [PATCH bpf-next V2 0/3] Fix compiler warnings, looking for suggestions Jiri Olsa
2024-06-18 2:34 ` Rafael Passos
2024-06-18 14:20 ` Puranjay Mohan
2024-06-21 3:00 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240615022641.210320-3-rafael@rcpassos.me \
--to=rafael@rcpassos.me \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox