patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: dsterba@suse.cz
Cc: clm@fb.com, dsterba@suse.com, linux-btrfs@vger.kernel.org,
	nathan@kernel.org, patches@lists.linux.dev, wqu@suse.com,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH] btrfs: Fix PAGE_SIZE format specifier in open_ctree()
Date: Wed,  1 Oct 2025 16:02:54 +0200	[thread overview]
Message-ID: <20251001140254.2784891-1-geert@linux-m68k.org> (raw)
In-Reply-To: <20250926065401.GR5333@suse.cz>

	Hi David,

On Fri, 26 Sep 2025 at 08:54:01 +0200, David Sterba wrote:
> On Thu, Sep 25, 2025 at 07:03:04PM -0400, Nathan Chancellor wrote:
> > There is an instance of -Wformat when targeting 32-bit architectures due
> > to using a 'size_t' specifier (which is 'unsigned int' for 32-bit
> > platforms) to print PAGE_SIZE:
> > 
> >   In file included from fs/btrfs/compression.h:17,
> >                    from fs/btrfs/extent_io.h:15,
> >                    from fs/btrfs/locking.h:13,
> >                    from fs/btrfs/ctree.h:19,
> >                    from fs/btrfs/disk-io.c:22:
> >   fs/btrfs/disk-io.c: In function 'open_ctree':
> >   include/linux/kern_levels.h:5:25: error: format '%zu' expects argument of type 'size_t', but argument 4 has type 'long unsigned int' [-Werror=format=]
> >   ...
> >   fs/btrfs/disk-io.c:3398:17: note: in expansion of macro 'btrfs_warn'
> >    3398 |                 btrfs_warn(fs_info,
> >         |                 ^~~~~~~~~~
> > 
> > PAGE_SIZE is consistently defined as an 'unsigned long' in
> > include/vsdo/page.h so use '%lu' to clear up the warning.
> > 
> > Fixes: 98077f7f2180 ("btrfs: enable experimental bs > ps support")
> > Signed-off-by: Nathan Chancellor <nathan@kernel.org>
>
> Thanks, I'm planning to send it as fixup once the main pull request is
> merged, until then it'll be in linux-next.

The build failure is now upstream, and I can confirm this patch
fixes it, so
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>

Thanks!

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

      reply	other threads:[~2025-10-01 14:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-25 23:03 [PATCH] btrfs: Fix PAGE_SIZE format specifier in open_ctree() Nathan Chancellor
2025-09-25 23:53 ` Qu Wenruo
2025-09-26  6:54 ` David Sterba
2025-10-01 14:02   ` Geert Uytterhoeven [this message]

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=20251001140254.2784891-1-geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nathan@kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=wqu@suse.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;
as well as URLs for NNTP newsgroup(s).