reboot: Fix build warning without CONFIG_SYSCTL
authorYueHaibing <yuehaibing@huawei.com>
Wed, 27 Apr 2022 12:54:01 +0000 (20:54 +0800)
committerLuis Chamberlain <mcgrof@kernel.org>
Mon, 9 May 2022 23:54:56 +0000 (16:54 -0700)
commit764aaf44cd64dd1f760268ee0b22d2dc53cd5bc0
tree9322cd4ea89474a6740ce8fdc3671552f8f9ee5a
parenta467257ffe4bdb13eacddec0137013f6a1140b81
reboot: Fix build warning without CONFIG_SYSCTL

If CONFIG_SYSCTL 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@huawei.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
kernel/reboot.c