Skip to contentSkip to conversation

ext4: get rid of compile warning

PATCH Applied Heiko Carstens 3 participants 3 messages Feb 20, 2012 – Feb 21, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: get rid of compile warning

Get rid of this one:

fs/ext4/balloc.c: In function 'ext4_wait_block_bitmap':
fs/ext4/balloc.c:405:3: warning: format '%llu' expects argument of
type 'long long unsigned int', but argument 6 has type 'sector_t' [-Wformat]

Happens because sector_t is u64 (unsigned long long) or unsigned long dependent on CONFIG_64BIT.

---
 fs/ext4/balloc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ext4/balloc.c +1 -1
index 95c87ab..c355890 100644
@@ -404,7 +404,7 @@ int ext4_wait_block_bitmap(struct super_block *sb, ext4_group_t block_group,
 	if (!buffer_uptodate(bh)) {
 		ext4_error(sb, "Cannot read block bitmap - "
 			   "block_group = %u, block_bitmap = %llu",
-			   block_group, bh->b_blocknr);
+			   block_group, (unsigned long long) bh->b_blocknr);
 		return 1;
 	}
 	/* Panic or remount fs read-only if block bitmap is invalid */
Signature · 1 line
1.7.9.1
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Heiko Carstens

Get rid of this one:

fs/ext4/balloc.c: In function 'ext4_wait_block_bitmap':
fs/ext4/balloc.c:405:3: warning: format '%llu' expects argument of
type 'long long unsigned int', but argument 6 has type 'sector_t' [-Wformat]

Happens because sector_t is u64 (unsigned long long) or unsigned long dependent on CONFIG_64BIT.

I sent the same patch on Jan. 30. I wonder what happened to it?

Thanks.

Quoted 17 lines
---
  fs/ext4/balloc.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
fs/ext4/balloc.c +1 -1
index 95c87ab..c355890 100644
@@ -404,7 +404,7 @@ int ext4_wait_block_bitmap(struct super_block *sb, ext4_group_t block_group,
  	if (!buffer_uptodate(bh)) {
  		ext4_error(sb, "Cannot read block bitmap - "
  			   "block_group = %u, block_bitmap = %llu",
-			   block_group, bh->b_blocknr);
+			   block_group, (unsigned long long) bh->b_blocknr);
  		return 1;
  	}
  	/* Panic or remount fs read-only if block bitmap is invalid */
Signature · 1 line
~Randy
maintainer Applied
#2 lore raw
Quoted 7 lines · Randy Dunlap
Quoted 6 lines · Heiko Carstens

Get rid of this one:

fs/ext4/balloc.c: In function 'ext4_wait_block_bitmap':
fs/ext4/balloc.c:405:3: warning: format '%llu' expects argument of
type 'long long unsigned int', but argument 6 has type 'sector_t' [-Wformat]

Quoted 8 lines
Quoted 4 lines

Happens because sector_t is u64 (unsigned long long) or unsigned long dependent on CONFIG_64BIT.

I sent the same patch on Jan. 30. I wonder what happened to it?

Applied, thanks. Sorry, Randy for not getting to your patch before this. I tend to review and apply patches in a fairly bursty fashion.

- Ted