From: Arnd Bergmann <arnd@kernel.org>
To: Steve French <sfrench@samba.org>, Enzo Matsumiya <ematsumiya@suse.de>
Cc: Arnd Bergmann <arnd@arndb.de>, Paulo Alcantara <pc@manguebit.org>,
Ronnie Sahlberg <ronniesahlberg@gmail.com>,
Shyam Prasad N <sprasad@microsoft.com>,
Tom Talpey <tom@talpey.com>, Bharath SM <bharathsm@microsoft.com>,
Stefan Metzmacher <metze@samba.org>,
Namjae Jeon <linkinjeon@kernel.org>,
linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] smb: client: hide unused cifs_debug_dirs_proc_ops
Date: Thu, 23 Apr 2026 08:50:30 +0200 [thread overview]
Message-ID: <20260423065042.1898971-1-arnd@kernel.org> (raw)
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
next reply other threads:[~2026-04-23 6:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 6:50 Arnd Bergmann [this message]
2026-04-23 9:01 ` [PATCH] smb: client: hide unused cifs_debug_dirs_proc_ops 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260423065042.1898971-1-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=arnd@arndb.de \
--cc=bharathsm@microsoft.com \
--cc=ematsumiya@suse.de \
--cc=linkinjeon@kernel.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=metze@samba.org \
--cc=pc@manguebit.org \
--cc=ronniesahlberg@gmail.com \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=sprasad@microsoft.com \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox