mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Steve French <sfrench@samba.org>, Shyam Prasad N <sprasad@microsoft.com>
Cc: Arnd Bergmann <arnd@arndb.de>, Paulo Alcantara <pc@cjr.nz>,
	Ronnie Sahlberg <lsahlber@redhat.com>,
	Tom Talpey <tom@talpey.com>, Enzo Matsumiya <ematsumiya@suse.de>,
	linux-cifs@vger.kernel.org, samba-technical@lists.samba.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] cifs: fix debug format string in cifs_debug_data_proc_show
Date: Thu, 19 Jan 2023 12:18:43 +0100	[thread overview]
Message-ID: <20230119111853.596560-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

Printing a size_t as %lu causes a warning on some architectures:

fs/cifs/cifs_debug.c: In function 'cifs_debug_data_proc_show':
fs/cifs/cifs_debug.c:478:75: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
  478 |                                 seq_printf(m, "\t\tWeight (cur,total): (%lu,%lu)"

Use the correct %zu format string instead.

Fixes: 962a0fd04791 ("cifs: distribute channels across interfaces based on speed")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 fs/cifs/cifs_debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifs/cifs_debug.c b/fs/cifs/cifs_debug.c
index f5f07019fc7e..2e644d926e62 100644
--- a/fs/cifs/cifs_debug.c
+++ b/fs/cifs/cifs_debug.c
@@ -475,7 +475,7 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
 				cifs_dump_iface(m, iface);
 
 				iface_weight = iface->speed / iface_min_speed;
-				seq_printf(m, "\t\tWeight (cur,total): (%lu,%lu)"
+				seq_printf(m, "\t\tWeight (cur,total): (%zu,%zu)"
 					   "\n\t\tAllocated channels: %u\n",
 					   iface->weight_fulfilled,
 					   iface_weight,
-- 
2.39.0


             reply	other threads:[~2023-01-19 11:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 11:18 Arnd Bergmann [this message]
2023-01-19 13:46 ` Shyam Prasad N
2023-01-20 19:17   ` Steve French

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=20230119111853.596560-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=arnd@arndb.de \
    --cc=ematsumiya@suse.de \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --cc=pc@cjr.nz \
    --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

Powered by JetHome