public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] smb: client: hide unused cifs_debug_dirs_proc_ops
@ 2026-04-23  6:50 Arnd Bergmann
  2026-04-23  9:01 ` Enzo Matsumiya
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Arnd Bergmann @ 2026-04-23  6: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 = {
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~

Make the #ifdef checks around them consistent by always using
the DEBUG2 variant.

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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/smb/client/cifs_debug.c b/fs/smb/client/cifs_debug.c
index f55e5cabdaee..9a2e796161d0 100644
--- a/fs/smb/client/cifs_debug.c
+++ b/fs/smb/client/cifs_debug.c
@@ -306,7 +306,7 @@ static int cifs_debug_dirs_proc_show(struct seq_file *m, void *v)
 	LIST_HEAD(entry);
 
 	seq_puts(m, "# Version:1\n");
-#ifdef CONFIG_CIFS_DEBUG
+#ifdef CONFIG_CIFS_DEBUG2
 	seq_puts(m, "# Write 0 to this file to drop all cached directory entries\n");
 #endif /* CONFIG_CIFS_DEBUG */
 	seq_puts(m, "# Format:\n");
@@ -356,7 +356,7 @@ static int cifs_debug_dirs_proc_show(struct seq_file *m, void *v)
 	return 0;
 }
 
-#ifdef CONFIG_CIFS_DEBUG
+#ifdef CONFIG_CIFS_DEBUG2
 static int cifs_debug_dirs_proc_open(struct inode *inode, struct file *file)
 {
 	return single_open(file, cifs_debug_dirs_proc_show, NULL);
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-30 12:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23  6:50 [PATCH] smb: client: hide unused cifs_debug_dirs_proc_ops Arnd Bergmann
2026-04-23  9:01 ` Enzo Matsumiya
2026-04-29 20:37 ` kernel test robot
2026-04-29 23:06 ` kernel test robot
2026-04-30 12:11 ` kernel test robot

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