Re: [PATCH] fs: quota: avoid unused function warning for !CONFIG_SYSCTL

From: Luis Chamberlain
Date: Tue Mar 28 2023 - 13:48:46 EST


On Tue, Mar 28, 2023 at 02:22:31PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
> Note: it may be better to just revert the 63d00e08515b patch, as the
> -#ifdef CONFIG_SYSCTL
> - if (!register_sysctl("fs/quota", fs_dqstats_table))
> - pr_notice("quota sysctl registration failed!\n");
> -#endif
> + if (IS_ENABLED(CONFIG_SYSCTL)) {
> + if (!register_sysctl("fs/quota", fs_dqstats_table))
> + pr_notice("quota sysctl registration failed!\n");
> + }

I'd agree to drop that patch and instead just use register_sysctl_init()
iwht Arnd's strategy.

Luis