[PATCH] orangefs: bufmap: fix size_t format string

From: Arnd Bergmann

Date: Mon Apr 13 2026 - 04:09:23 EST


From: Arnd Bergmann <arnd@xxxxxxxx>

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@xxxxxxxx>
---
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