* [PATCH] orangefs: bufmap: fix size_t format string
@ 2026-04-13 8:08 Arnd Bergmann
2026-04-13 16:22 ` Mike Marshall
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2026-04-13 8:08 UTC (permalink / raw)
To: Mike Marshall
Cc: Arnd Bergmann, Martin Brandenburg, Kees Cook, devel, linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] orangefs: bufmap: fix size_t format string
2026-04-13 8:08 [PATCH] orangefs: bufmap: fix size_t format string Arnd Bergmann
@ 2026-04-13 16:22 ` Mike Marshall
2026-04-13 16:53 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Mike Marshall @ 2026-04-13 16:22 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Arnd Bergmann, Kees Cook, devel, linux-kernel, Mike Marshall
Thanks Arnd...
I made a V2 of my patch, you suggested %zd,
I used %zu which I think is OK too. I added
some suggestions from Dan Williams to my
V2 as well, I'll post the V2 version as soon as
xfstests completes and I update my linux-next...
-Mike
On Mon, Apr 13, 2026 at 4:09 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> 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
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] orangefs: bufmap: fix size_t format string
2026-04-13 16:22 ` Mike Marshall
@ 2026-04-13 16:53 ` Arnd Bergmann
0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2026-04-13 16:53 UTC (permalink / raw)
To: Mike Marshall, Arnd Bergmann; +Cc: Kees Cook, devel, linux-kernel
On Mon, Apr 13, 2026, at 18:22, Mike Marshall wrote:
> Thanks Arnd...
>
> I made a V2 of my patch, you suggested %zd,
> I used %zu which I think is OK too. I added
> some suggestions from Dan Williams to my
> V2 as well, I'll post the V2 version as soon as
> xfstests completes and I update my linux-next...
>
Sounds good, thanks!
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-13 16:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13 8:08 [PATCH] orangefs: bufmap: fix size_t format string Arnd Bergmann
2026-04-13 16:22 ` Mike Marshall
2026-04-13 16:53 ` Arnd Bergmann
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.