From: Geert Uytterhoeven <geert@linux-m68k.org>
To: "David Sterba" <dsterba@suse.cz>,
"Andreas Färber" <afaerber@suse.de>, "Qu Wenruo" <wqu@suse.com>,
"David Sterba" <dsterba@suse.com>,
"Johannes Thumshirn" <jthumshirn@suse.de>,
"Chris Mason" <clm@fb.com>, "Josef Bacik" <josef@toxicpanda.com>,
linux-btrfs <linux-btrfs@vger.kernel.org>,
"Linux ARM" <linux-arm-kernel@lists.infradead.org>,
"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH next 1/2] btrfs: tree-checker: Fix error format string
Date: Tue, 26 Nov 2019 11:36:58 +0100 [thread overview]
Message-ID: <CAMuHMdVbcfB0FFS=gLDathXFM3x0WYXJEq99S_g7mjAPS94rAQ@mail.gmail.com> (raw)
In-Reply-To: <20191111183158.GT3001@twin.jikos.cz>
Hi David,
On Mon, Nov 11, 2019 at 7:32 PM David Sterba <dsterba@suse.cz> wrote:
> On Fri, Nov 08, 2019 at 10:38:52PM +0100, Andreas Färber wrote:
> > From: Andreas Färber <afaerber@suse.com>
> >
> > Argument BTRFS_FILE_EXTENT_INLINE_DATA_START is defined as offsetof(),
> > which returns type size_t, so we need %zu instead of %lu.
> >
> > This fixes a build warning on 32-bit arm:
> >
> > ../fs/btrfs/tree-checker.c: In function 'check_extent_data_item':
> > ../fs/btrfs/tree-checker.c:230:43: warning: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'unsigned int' [-Wformat=]
> > 230 | "invalid item size, have %u expect [%lu, %u)",
> > | ~~^
> > | |
> > | long unsigned int
> > | %u
>
> Is there a gcc warning option that can catch that on 64bit too?
> -Wformat=2 does not and I don't see any other of the option family to do
> that. We've had fixups of the size_t printk formats and I'd like to
> catch that when the patches are added to the devel branches. I can't run
> 32bit build check each time but this seems to be the only way so far.
Yep. On 64-bit, size_t _is_ unsigned long.
So you have to compile for both 32-bit and 64-bit.
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Fixes: a31ccb4b7ba2 ("btrfs: tree-checker: Check item size before reading file extent type")
>
> As the patch is still in the devel branch, the commit id is not stable
It indeed is not:
Fixes: 153a6d299956983d ("btrfs: tree-checker: Check item size before
reading file extent type")
> and I'll fold the change to to the patch. Thanks.
Apparently that was forgotten, and now the issue is part of Linus' tree.
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
next prev parent reply other threads:[~2019-11-26 10:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 21:38 [PATCH next 0/2] btrfs: Fix build warnings for arm Andreas Färber
2019-11-08 21:38 ` [PATCH next 1/2] btrfs: tree-checker: Fix error format string Andreas Färber
2019-11-11 18:31 ` David Sterba
2019-11-26 10:36 ` Geert Uytterhoeven [this message]
2019-11-26 15:44 ` David Sterba
2019-11-08 21:38 ` [PATCH next 2/2] btrfs: extent-tree: " Andreas Färber
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='CAMuHMdVbcfB0FFS=gLDathXFM3x0WYXJEq99S_g7mjAPS94rAQ@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=afaerber@suse.de \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=dsterba@suse.cz \
--cc=josef@toxicpanda.com \
--cc=jthumshirn@suse.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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).