public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse•de>
To: Qu Wenruo <wqu@suse•com>, David Sterba <dsterba@suse•com>
Cc: linux-kernel@vger•kernel.org, Josef Bacik <josef@toxicpanda•com>,
	Chris Mason <clm@fb•com>,
	linux-btrfs@vger•kernel.org,
	Johannes Thumshirn <jthumshirn@suse•de>,
	linux-arm-kernel@lists•infradead.org
Subject: [PATCH next 1/2] btrfs: tree-checker: Fix error format string
Date: Fri,  8 Nov 2019 22:38:52 +0100	[thread overview]
Message-ID: <20191108213853.16635-2-afaerber@suse.de> (raw)
In-Reply-To: <20191108213853.16635-1-afaerber@suse.de>

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

Fixes: a31ccb4b7ba2 ("btrfs: tree-checker: Check item size before reading file extent type")
Cc: Qu Wenruo <wqu@suse•com>
Cc: David Sterba <dsterba@suse•com>
Signed-off-by: Andreas Färber <afaerber@suse•com>
---
 fs/btrfs/tree-checker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 493d4d9e0f79..092b8ece36d7 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -227,7 +227,7 @@ static int check_extent_data_item(struct extent_buffer *leaf,
 	 */
 	if (item_size < BTRFS_FILE_EXTENT_INLINE_DATA_START) {
 		file_extent_err(leaf, slot,
-				"invalid item size, have %u expect [%lu, %u)",
+				"invalid item size, have %u expect [%zu, %u)",
 				item_size, BTRFS_FILE_EXTENT_INLINE_DATA_START,
 				SZ_4K);
 		return -EUCLEAN;
-- 
2.16.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-11-08 21:39 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 ` Andreas Färber [this message]
2019-11-11 18:31   ` [PATCH next 1/2] btrfs: tree-checker: Fix error format string David Sterba
2019-11-26 10:36     ` Geert Uytterhoeven
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=20191108213853.16635-2-afaerber@suse.de \
    --to=afaerber@suse$(echo .)de \
    --cc=clm@fb$(echo .)com \
    --cc=dsterba@suse$(echo .)com \
    --cc=josef@toxicpanda$(echo .)com \
    --cc=jthumshirn@suse$(echo .)de \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-btrfs@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=wqu@suse$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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