sysctl: Fix unused function warning
The newly added bpf_stats_handler function has the wrong #ifdef check around it, leading to an unused-function warning when CONFIG_SYSCTL is disabled: kernel/sysctl.c:205:12: error: unused function 'bpf_stats_handler' [-Werror,-Wunused-function] static int bpf_stats_handler(struct ctl_table *table, int write, Fix the check to match the reference. Fixes: d46edd67 ("bpf: Sharing bpf runtime stats with BPF_ENABLE_STATS") Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NAlexei Starovoitov <ast@kernel.org> Reviewed-by: NLuis Chamberlain <mcgrof@kernel.org> Acked-by: NMartin KaFai Lau <kafai@fb.com> Acked-by: NSong Liu <songliubraving@fb.com> Link: https://lore.kernel.org/bpf/20200505140734.503701-1-arnd@arndb.de
Showing
想要评论请 注册 或 登录