* [PATCH bpf] bpf, x86: Fix "no previous prototype" warning
@ 2021-11-17 12:57 Björn Töpel
2021-11-17 14:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Björn Töpel @ 2021-11-17 12:57 UTC (permalink / raw)
To: ast, daniel, netdev, bpf; +Cc: Björn Töpel, kernel test robot
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(+)
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, \
base-commit: 3751c3d34cd5a750c86d1c8eaf217d8faf7f9325
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH bpf] bpf, x86: Fix "no previous prototype" warning
2021-11-17 12:57 [PATCH bpf] bpf, x86: Fix "no previous prototype" warning Björn Töpel
@ 2021-11-17 14:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-17 14:50 UTC (permalink / raw)
To: =?utf-8?b?QmrDtnJuIFTDtnBlbCA8Ympvcm5Aa2VybmVsLm9yZz4=?=
Cc: ast, daniel, netdev, bpf, lkp
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-17 14:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-17 12:57 [PATCH bpf] bpf, x86: Fix "no previous prototype" warning Björn Töpel
2021-11-17 14:50 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.