aboutsummaryrefslogtreecommitdiff
path: root/kernel/bpf/core.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2024-06-20 19:50:27 -0700
committerAlexei Starovoitov <ast@kernel.org>2024-06-20 19:50:33 -0700
commitbf977ee4a9e2ad8a41b3a2497aada5e7eb09eaea (patch)
tree008909b701e35b7a7c65c468684f2e7ca18235fe /kernel/bpf/core.c
parent3b06304370931f90cd6f50ea9dd55603429b13dc (diff)
parent21ab4980e02d495174bc64c00ceb4d3cf87fadb1 (diff)
Merge branch 'fix-compiler-warnings-looking-for-suggestions'
Rafael Passos says: ==================== Fix compiler warnings, looking for suggestions Hi, This patchset has a few fixes to compiler warnings. I am studying the BPF subsystem and wish to bring more tangible contributions. I would appreciate receiving suggestions on things to investigate. I also documented a bit in my blog. I could help with docs here, too. https://rcpassos.me/post/linux-ebpf-understanding-kernel-level-mechanics Thanks! Changelog V1 -> V2: - rebased all commits to updated for-next base - removes new cases of the extra parameter for bpf_jit_binary_pack_finalize - built and tested for ARM64 - sent the series for the test workflow: https://github.com/kernel-patches/bpf/pull/7198 ==================== Acked-by: Puranjay Mohan <puranjay@kernel.org> Acked-by: Jiri Olsa <jolsa@kernel.org> Link: https://lore.kernel.org/r/20240615022641.210320-1-rafael@rcpassos.me Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/core.c')
-rw-r--r--kernel/bpf/core.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c
index 1a6c3faa6e4a..ae2e1eeda0d4 100644
--- a/kernel/bpf/core.c
+++ b/kernel/bpf/core.c
@@ -1174,8 +1174,7 @@ bpf_jit_binary_pack_alloc(unsigned int proglen, u8 **image_ptr,
}
/* Copy JITed text from rw_header to its final location, the ro_header. */
-int bpf_jit_binary_pack_finalize(struct bpf_prog *prog,
- struct bpf_binary_header *ro_header,
+int bpf_jit_binary_pack_finalize(struct bpf_binary_header *ro_header,
struct bpf_binary_header *rw_header)
{
void *ptr;
@@ -2743,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;
@@ -2761,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);
}