Skip to contentSkip to conversation

fs: btrfs: Fix incorrect printf qualifier

PATCH Superseded Pujin Shi 4 participants 4 messages Oct 14, 2020 – Oct 17, 2020 Btrfs file system

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Pujin Shi

author
#0 lore raw

PATCH 1/1 fs: btrfs: Fix incorrect printf qualifier

This patch addresses a compile warning:
fs/btrfs/extent-tree.c: In function '__btrfs_free_extent':
fs/btrfs/extent-tree.c:3187:4: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'unsigned int' [-Wformat=]

Fixes 3b7b6ffa4f8f ("btrfs: extent-tree: kill BUG_ON() in __btrfs_free_extent()")
---
 fs/btrfs/extent-tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/extent-tree.c +1 -1
index 3b21fee13e77..5fd60b13f4f8 100644
@@ -3185,7 +3185,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
 		struct btrfs_tree_block_info *bi;
 		if (item_size < sizeof(*ei) + sizeof(*bi)) {
 			btrfs_crit(info,
-"invalid extent item size for key (%llu, %u, %llu) owner %llu, has %u expect >= %lu",
+"invalid extent item size for key (%llu, %u, %llu) owner %llu, has %u expect >= %zu",
 				   key.objectid, key.type, key.offset,
 				   owner_objectid, item_size,
 				   sizeof(*ei) + sizeof(*bi));
Signature · 1 line
2.18.1
#1 lore raw
Quoted 6 lines · Pujin Shi

This patch addresses a compile warning:
fs/btrfs/extent-tree.c: In function '__btrfs_free_extent':
fs/btrfs/extent-tree.c:3187:4: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'unsigned int' [-Wformat=]

Fixes 3b7b6ffa4f8f ("btrfs: extent-tree: kill BUG_ON() in __btrfs_free_extent()")

Added to misc-next, thanks.

Acked-by on v1 1/1
#2 lore raw
In reply to Pujin Shi
Quoted 6 lines · Pujin Shi

This patch addresses a compile warning:
fs/btrfs/extent-tree.c: In function '__btrfs_free_extent':
fs/btrfs/extent-tree.c:3187:4: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'unsigned int' [-Wformat=]

Fixes 3b7b6ffa4f8f ("btrfs: extent-tree: kill BUG_ON() in __btrfs_free_extent()")

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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
Reviewed-by on v1 1/1
#3 lore raw
In reply to Pujin Shi
Quoted 6 lines · Pujin Shi

This patch addresses a compile warning:
fs/btrfs/extent-tree.c: In function '__btrfs_free_extent':
fs/btrfs/extent-tree.c:3187:4: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'unsigned int' [-Wformat=]

Fixes 3b7b6ffa4f8f ("btrfs: extent-tree: kill BUG_ON() in __btrfs_free_extent()")

Btw, that commit id does not exist in Linus' tree, should be 1c2a07f598d5 [1].

Quoted 1 line

Other than that it looks good,

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1c2a07f598d526e39acbf1837b8d521fc0dab9c5

Quoted 20 lines
---
 fs/btrfs/extent-tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/extent-tree.c +1 -2
index 3b21fee13e77..5fd60b13f4f8 100644
@@ -3185,7 +3185,7 @@ static int __btrfs_free_extent(struct btrfs_trans_handle *trans,
                struct btrfs_tree_block_info *bi;
                if (item_size < sizeof(*ei) + sizeof(*bi)) {
                        btrfs_crit(info,
-"invalid extent item size for key (%llu, %u, %llu) owner %llu, has %u expect >= %lu",
+"invalid extent item size for key (%llu, %u, %llu) owner %llu, has %u expect >= %zu",
                                   key.objectid, key.type, key.offset,
                                   owner_objectid, item_size,
                                   sizeof(*ei) + sizeof(*bi));
--

2.18.1

Signature · 3 lines
Filipe David Manana,

“Whether you think you can, or you think you can't — you're right.”