Messages in this thread | | | Date | Wed, 29 Mar 2023 11:44:07 +0200 | From | Jan Kara <> | Subject | Re: [PATCH] fs: quota: avoid unused function warning for !CONFIG_SYSCTL |
| |
On Tue 28-03-23 10:48:20, Luis Chamberlain wrote: > On Tue, Mar 28, 2023 at 02:22:31PM +0200, Arnd Bergmann wrote: > > From: Arnd Bergmann <arnd@arndb.de> > > 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.
Ah, indeed, register_sysctl_init() is exactly what we need here. I didn't know about that helper. Thanks for letting me know.
Honza -- Jan Kara <jack@suse.com> SUSE Labs, CR
| |