All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Mike Marshall <hubcap@omnibond.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Martin Brandenburg <martin@omnibond.com>,
	Kees Cook <kees@kernel.org>,
	devel@lists.orangefs.org, linux-kernel@vger.kernel.org
Subject: [PATCH] orangefs: bufmap: fix size_t format string
Date: Mon, 13 Apr 2026 10:08:57 +0200	[thread overview]
Message-ID: <20260413080911.3840909-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

One of the printk() formats was accidentally changed from %zd to
%ld, causing a build time warning on 32-bit targets:

In file included  from fs/orangefs/orangefs-bufmap.c:7:
fs/orangefs/orangefs-bufmap.c: In function 'orangefs_bufmap_copy_to_iovec':
include/linux/kern_levels.h:5:25: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
fs/orangefs/orangefs-bufmap.c:759:29: note: in expansion of macro 'pr_info'
  759 |         if (size > 4194304) pr_info("%s: size:%ld\n", __func__, size);
      |                             ^~~~~~~

Change this back to the correct version.

Fixes: df6fd4485d7a ("bufmap: manage as folios.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 fs/orangefs/orangefs-bufmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/orangefs/orangefs-bufmap.c b/fs/orangefs/orangefs-bufmap.c
index d476bd4df37c..122526f26b19 100644
--- a/fs/orangefs/orangefs-bufmap.c
+++ b/fs/orangefs/orangefs-bufmap.c
@@ -756,7 +756,7 @@ int orangefs_bufmap_copy_to_iovec(struct iov_iter *iter,
 	from = &__orangefs_bufmap->desc_array[buffer_index];
 
 	/* shouldn't happen... */
-	if (size > 4194304) pr_info("%s: size:%ld\n", __func__, size);
+	if (size > 4194304) pr_info("%s: size:%zd\n", __func__, size);
 
 	gossip_debug(GOSSIP_BUFMAP_DEBUG,
 		"%s: buffer_index:%d size:%zu folio_count:%d\n",
-- 
2.39.5


             reply	other threads:[~2026-04-13  8:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13  8:08 Arnd Bergmann [this message]
2026-04-13 16:22 ` [PATCH] orangefs: bufmap: fix size_t format string Mike Marshall
2026-04-13 16:53   ` Arnd Bergmann

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=20260413080911.3840909-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=arnd@arndb.de \
    --cc=devel@lists.orangefs.org \
    --cc=hubcap@omnibond.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@omnibond.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.