]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, x86: Fix "no previous prototype" warning
authorBjörn Töpel <bjorn@kernel.org>
Wed, 17 Nov 2021 12:57:08 +0000 (13:57 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 17 Nov 2021 14:38:17 +0000 (15:38 +0100)
commitaed39b88da982185abed4c241481c7c3b7298b43
tree1a1a19b0bcb48e2c61196f5a909e21f2cf90dc55
parent3819a9c89349c49b392e8f26783bcbcb4aa536d8
bpf, x86: Fix "no previous prototype" warning

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: 8fb55c0c1473 ("bpf: Introduce BPF dispatcher")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Björn Töpel <bjorn@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20211117125708.769168-1-bjorn@kernel.org
include/linux/bpf.h