Re: [PATCH sysctl-next] sched: Fix build warning without CONFIG_SYSCTL

From: Luis Chamberlain
Date: Wed May 04 2022 - 17:00:01 EST


On Wed, Apr 27, 2022 at 09:10:02PM +0800, YueHaibing wrote:
> IF CONFIG_SYSCTL is n, build warn:
>
> kernel/sched/core.c:1782:12: warning: ‘sysctl_sched_uclamp_handler’ defined but not used [-Wunused-function]
> static int sysctl_sched_uclamp_handler(struct ctl_table *table, int write,
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> sysctl_sched_uclamp_handler() is used while CONFIG_SYSCTL enabled,
> wrap all related code with CONFIG_SYSCTL to fix this.
>
> Fixes: 3267e0156c33 ("sched: Move uclamp_util sysctls to core.c")
> 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