Re: [PATCH sysctl-next] reboot: Fix build warning without CONFIG_SYSFS

From: Luis Chamberlain
Date: Wed May 04 2022 - 16:59:29 EST


On Wed, Apr 27, 2022 at 08:54:01PM +0800, YueHaibing wrote:
> If CONFIG_SYSFS is n, build warn:
>
> kernel/reboot.c:443:20: error: ‘kernel_reboot_sysctls_init’ defined but not used [-Werror=unused-function]
> static void __init kernel_reboot_sysctls_init(void)
> ^~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Move kernel_reboot_sysctls_init() to #ifdef block to fix this.
>
> Fixes: 06d177662fb8 ("kernel/reboot: move reboot sysctls to its own file")
> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>

Thanks! Merged and pushed onto sysctl-testing. If there are no issues I'll move
it to sysctl-next.

Luis