public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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] [v2] smb: client: hide unused cifs_debug_dirs_proc_ops
Date: Thu, 23 Apr 2026 11:50:33 +0200	[thread overview]
Message-ID: <20260423095040.3169763-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 = {
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~

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


                 reply	other threads:[~2026-04-23  9:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260423095040.3169763-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