HID: bpf: use __bpf_kfunc instead of noinline
authorBenjamin Tissoires <bentiss@kernel.org>
Wed, 24 Jan 2024 11:26:59 +0000 (12:26 +0100)
committerBenjamin Tissoires <bentiss@kernel.org>
Wed, 31 Jan 2024 09:27:08 +0000 (10:27 +0100)
commit764ad6b02777d77dca3659ca490f0898aa593670
tree0e42f1b4a2b6c57fec946137e316371f90a3e69d
parent89be8aa5b0ecb3b729c7bcff64bb2af7921fec63
HID: bpf: use __bpf_kfunc instead of noinline

Follow the docs at Documentation/bpf/kfuncs.rst:
- declare the function with `__bpf_kfunc`
- disables missing prototype warnings, which allows to remove them from
  include/linux/hid-bpf.h

Removing the prototypes is not an issue because we currently have to
redeclare them when writing the BPF program. They will eventually be
generated by bpftool directly AFAIU.

Link: https://lore.kernel.org/r/20240124-b4-hid-bpf-fixes-v2-3-052520b1e5e6@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
drivers/hid/bpf/hid_bpf_dispatch.c
include/linux/hid_bpf.h