[PATCH] [v2] smb: client: hide unused cifs_debug_dirs_proc_ops
Arnd Bergmann <[email protected]> Thu, 23 Apr 2026 11:50:33 +0200
| Newsgroups | gmane.linux.kernel,gmane.linux.kernel.cifs,gmane.network.samba.internals |
|---|---|
| Message-ID | <[email protected]> |
From: Arnd Bergmann <[email protected]> When CONFIG_CIFS_DEBUG2 is disabled, the only reference to this function is hidden, causing a harmless warning: fs/smb/client/cifs_debug.c:395:30: error: 'cifs_debug_dirs_proc_ops' defined but not used [-Werror=unused-const-variable=] 395 | static const struct proc_ops cifs_debug_dirs_proc_ops = { | ^~~~~~~~~~~~~~~~~~~~~~~~ Since the operations are now protected by CONFIG_CIFS_DEBUG, change the reference to use the same one instead of the DEBUG2 version. Fixes: 63bff18d4aa0 ("smb: client: fix (remove) drop_dir_cache module parameter") Signed-off-by: Arnd Bergmann <[email protected]> --- fs/smb/client/cifs_debug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c index f55e5cabdaee..1b5139a5e1f4 100644 --- a/fs/smb/client/cifs_debug.c +++ b/fs/smb/client/cifs_debug.c @@ -933,11 +933,11 @@ cifs_proc_init(void) proc_create_single("open_files", 0400, proc_fs_cifs, cifs_debug_files_proc_show); -#ifdef CONFIG_CIFS_DEBUG2 +#ifdef CONFIG_CIFS_DEBUG proc_create("open_dirs", 0644, proc_fs_cifs, &cifs_debug_dirs_proc_ops); -#else /* CONFIG_CIFS_DEBUG2 */ +#else /* CONFIG_CIFS_DEBUG */ proc_create_single("open_dirs", 0400, proc_fs_cifs, cifs_debug_dirs_proc_show); -#endif /* !CONFIG_CIFS_DEBUG2 */ +#endif /* !CONFIG_CIFS_DEBUG */ proc_create("Stats", 0644, proc_fs_cifs, &cifs_stats_proc_ops); proc_create("cifsFYI", 0644, proc_fs_cifs, &cifsFYI_proc_ops); proc_create("traceSMB", 0644, proc_fs_cifs, &traceSMB_proc_ops); -- 2.39.5