bpf: Hide unused bpf_patch_call_args
authorArnd Bergmann <arnd@arndb.de>
Fri, 2 Jun 2023 13:50:18 +0000 (15:50 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 12 Jun 2023 17:00:08 +0000 (19:00 +0200)
commitba49f976885869835a1783863376221dc24f1817
tree857376557b2d1d90930db13e64f594351836456a
parentb23ed4d74c4d583b5f621ee4c776699442833554
bpf: Hide unused bpf_patch_call_args

This function is only used when CONFIG_BPF_JIT_ALWAYS_ON is disabled, but
CONFIG_BPF_SYSCALL is enabled. When both are turned off, the prototype is
missing but the unused function is still compiled, as seen from this W=1
warning:

  [...]
  kernel/bpf/core.c:2075:6: error: no previous prototype for 'bpf_patch_call_args' [-Werror=missing-prototypes]
  [...]

Add a matching #ifdef for the definition to leave it out.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20230602135128.1498362-1-arnd@kernel.org
kernel/bpf/core.c