public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [v2] smb: client: hide unused cifs_debug_dirs_proc_ops
@ 2026-04-23  9:50 Arnd Bergmann
  0 siblings, 0 replies; only message in thread
From: Arnd Bergmann @ 2026-04-23  9:50 UTC (permalink / raw)
  To: Steve French, Enzo Matsumiya
  Cc: Arnd Bergmann, Paulo Alcantara, Ronnie Sahlberg, Shyam Prasad N,
	Tom Talpey, Bharath SM, Stefan Metzmacher, Namjae Jeon,
	linux-cifs, samba-technical, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

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 <arnd@arndb.de>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-23  9:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23  9:50 [PATCH] [v2] smb: client: hide unused cifs_debug_dirs_proc_ops Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox