]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
bpf: remove unused parameter in __bpf_free_used_btfs
authorRafael Passos <rafael@rcpassos.me>
Sat, 15 Jun 2024 02:24:09 +0000 (23:24 -0300)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 21 Jun 2024 02:50:26 +0000 (19:50 -0700)
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>
Link: https://lore.kernel.org/r/20240615022641.210320-3-rafael@rcpassos.me
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/linux/bpf.h
kernel/bpf/core.c
kernel/bpf/verifier.c

index f636b4998bf71857825a5b3d691de257f73660d4..960780ef04e19ad993b3e9292be843827b2c526e 100644 (file)
@@ -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)
index f6951c33790dabbc1ac037111f090fdf8877c4ca..ae2e1eeda0d46fbfffaacbb0222b4d0adaf42708 100644 (file)
@@ -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);
 }
 
index ffe98a788c33d3fbd83c240f27114cff75c90077..3f6be4923655411bfec9455f899897b337e30c87 100644 (file)
@@ -18694,8 +18694,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 */