Re: [PATCH 1/2] [v3] bpf: hide unused bpf_patch_call_args

Yonghong Song
2023-06-06T22:47:20Z

On 6/2/23 6:50 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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>

Acked-by: Yonghong Song <yhs@fb.com>