diff mbox series

[bpf] bpf, x86: Fix "no previous prototype" warning

Message ID 20211117125708.769168-1-bjorn@kernel.org (mailing list archive)
State Accepted
Commit f45b2974cc0ae959a4c503a071e38a56bd64372f
Delegated to: BPF
Headers show
Series [bpf] bpf, x86: Fix "no previous prototype" warning | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for bpf
netdev/fixes_present success Fixes tag present in non-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: 12455 this patch: 12453
netdev/cc_maintainers warning 6 maintainers not CCed: kafai@fb.com andrii@kernel.org yhs@fb.com songliubraving@fb.com john.fastabend@gmail.com kpsingh@kernel.org
netdev/build_clang success Errors and warnings before: 2091 this patch: 2087
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 11619 this patch: 11615
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
bpf/vmtest-bpf fail VM_Test
bpf/vmtest-bpf-PR fail PR summary

Commit Message

Björn Töpel Nov. 17, 2021, 12:57 p.m. UTC
The arch_prepare_bpf_dispatcher function does not have a prototype,
and yields the following warning when W=1 is enabled for the kernel
build.

  >> arch/x86/net/bpf_jit_comp.c:2188:5: warning: no previous \
  prototype for 'arch_prepare_bpf_dispatcher' [-Wmissing-prototypes]
        2188 | int arch_prepare_bpf_dispatcher(void *image, s64 *funcs, \
	int num_funcs)
             |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~

Remove the warning by adding a function declaration to
include/linux/bpf.h.

Fixes: 75ccbef6369e ("bpf: Introduce BPF dispatcher")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Björn Töpel <bjorn@kernel.org>
---
 include/linux/bpf.h | 1 +
 1 file changed, 1 insertion(+)


base-commit: 3751c3d34cd5a750c86d1c8eaf217d8faf7f9325

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 17, 2021, 2:50 p.m. UTC | #1
Hello:

This patch was applied to bpf/bpf.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:

On Wed, 17 Nov 2021 13:57:08 +0100 you wrote:
> The arch_prepare_bpf_dispatcher function does not have a prototype,
> and yields the following warning when W=1 is enabled for the kernel
> build.
> 
>   >> arch/x86/net/bpf_jit_comp.c:2188:5: warning: no previous \
>   prototype for 'arch_prepare_bpf_dispatcher' [-Wmissing-prototypes]
>         2188 | int arch_prepare_bpf_dispatcher(void *image, s64 *funcs, \
> 	int num_funcs)
>              |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> [...]

Here is the summary with links:
  - [bpf] bpf, x86: Fix "no previous prototype" warning
    https://git.kernel.org/bpf/bpf/c/f45b2974cc0a

You are awesome, thank you!
diff mbox series

Patch

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index e7a163a3146b..84ff6ef49462 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -732,6 +732,7 @@  int bpf_trampoline_unlink_prog(struct bpf_prog *prog, struct bpf_trampoline *tr)
 struct bpf_trampoline *bpf_trampoline_get(u64 key,
 					  struct bpf_attach_target_info *tgt_info);
 void bpf_trampoline_put(struct bpf_trampoline *tr);
+int arch_prepare_bpf_dispatcher(void *image, s64 *funcs, int num_funcs);
 #define BPF_DISPATCHER_INIT(_name) {				\
 	.mutex = __MUTEX_INITIALIZER(_name.mutex),		\
 	.func = &_name##_func,					\