diff options
author | Yonghong Song <[email protected]> | 2019-06-25 17:35:03 -0700 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2019-06-26 14:44:07 +0200 |
commit | 9db1ff0a415c7de8eb67df5b2c56ac409ccefc37 (patch) | |
tree | 57c28eb0281ef0cf406d7f0a3c41db4969499c0e /drivers/fpga/fpga-bridge.c | |
parent | 6bcc617f842cdb5f3d66b3a3f06614a62fab992b (diff) |
bpf: fix compiler warning with CONFIG_MODULES=n
With CONFIG_MODULES=n, the following compiler warning occurs:
/data/users/yhs/work/net-next/kernel/trace/bpf_trace.c:605:13: warning:
‘do_bpf_send_signal’ defined but not used [-Wunused-function]
static void do_bpf_send_signal(struct irq_work *entry)
The __init function send_signal_irq_work_init(), which calls
do_bpf_send_signal(), is defined under CONFIG_MODULES. Hence,
when CONFIG_MODULES=n, nobody calls static function do_bpf_send_signal(),
hence the warning.
The init function send_signal_irq_work_init() should work without
CONFIG_MODULES. Moving it out of CONFIG_MODULES
code section fixed the compiler warning, and also make bpf_send_signal()
helper work without CONFIG_MODULES.
Fixes: 8b401f9ed244 ("bpf: implement bpf_send_signal() helper")
Reported-By: Arnd Bergmann <[email protected]>
Signed-off-by: Yonghong Song <[email protected]>
Acked-by: Song Liu <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions