LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] ext4: fix some s64 printing warnings
@ 2008-11-12 0:10 Stephen Rothwell
2008-11-20 6:11 ` Theodore Tso
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Rothwell @ 2008-11-12 0:10 UTC (permalink / raw)
To: Theodore Ts'o, adilger; +Cc: linux-ext4, LKML, ppc-dev
A powerpc ppc64_defconfig build of Linus' current tree produces these
warnings:
fs/ext4/balloc.c: In function 'ext4_has_free_blocks':
fs/ext4/balloc.c:617: warning: format '%lld' expects type 'long long int', but argument 2 has type 's64'
fs/ext4/inode.c: In function 'ext4_print_free_blocks':
fs/ext4/inode.c:1833: warning: format '%lld' expects type 'long long int', but argument 2 has type 's64'
fs/ext4/inode.c:1835: warning: format '%lld' expects type 'long long int', but argument 2 has type 's64'
Fix them up with the usual casts.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
fs/ext4/balloc.c | 2 +-
fs/ext4/inode.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index d2003cd..9ce2fcd 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -614,7 +614,7 @@ int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
if (dirty_blocks < 0) {
printk(KERN_CRIT "Dirty block accounting "
"went wrong %lld\n",
- dirty_blocks);
+ (long long)dirty_blocks);
}
}
/* Check whether we have space after
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index be21a5a..2a3804e 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -1830,9 +1830,9 @@ static void ext4_print_free_blocks(struct inode *inode)
ext4_count_free_blocks(inode->i_sb));
printk(KERN_EMERG "Free/Dirty block details\n");
printk(KERN_EMERG "free_blocks=%lld\n",
- percpu_counter_sum(&sbi->s_freeblocks_counter));
+ (long long)percpu_counter_sum(&sbi->s_freeblocks_counter));
printk(KERN_EMERG "dirty_blocks=%lld\n",
- percpu_counter_sum(&sbi->s_dirtyblocks_counter));
+ (long long)percpu_counter_sum(&sbi->s_dirtyblocks_counter));
printk(KERN_EMERG "Block reservation details\n");
printk(KERN_EMERG "i_reserved_data_blocks=%lu\n",
EXT4_I(inode)->i_reserved_data_blocks);
--
1.5.6.5
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ext4: fix some s64 printing warnings
2008-11-12 0:10 [PATCH] ext4: fix some s64 printing warnings Stephen Rothwell
@ 2008-11-20 6:11 ` Theodore Tso
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Tso @ 2008-11-20 6:11 UTC (permalink / raw)
To: Stephen Rothwell; +Cc: adilger, linux-ext4, LKML, ppc-dev
On Wed, Nov 12, 2008 at 11:10:49AM +1100, Stephen Rothwell wrote:
> A powerpc ppc64_defconfig build of Linus' current tree produces these
> warnings:
Hi Stephen,
Thanks for submitting the patch! As it turns out, a patch that was
pretty much identical to yours was submitted by Alexander Beregalov
and was merged into mainline as of 2.6.28-rc5, as commit ID ba8292e2.
Regards,
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-20 6:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-12 0:10 [PATCH] ext4: fix some s64 printing warnings Stephen Rothwell
2008-11-20 6:11 ` Theodore Tso
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).