From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Miao Xie <miaox@cn.fujitsu.com>, Chris Mason <chris.mason@oracle.com>
Cc: linux-btrfs@vger.kernel.org,
Linux Kernel Development <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] btrfs: Correct printing of sector_t
Date: Tue, 30 Nov 2010 21:30:01 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.00.1011302128450.6502@ayla.of.borg> (raw)
If CONFIG_LBDAF=3Dy, `sector_t' becomes `u64' instead of `unsigned long=
':
fs/btrfs/inode.c: In function =A1btrfs_end_dio_bio=A2:
fs/btrfs/inode.c:5717: warning: format =A1%lu=A2 expects type =A1long u=
nsigned int=A2, but argument 4 has type =A1sector_t=A2
Hence always cast it to `unsigned long long' for printing.
Introduced by commit e65e1535542931e51189832264cd282e5899e4b9 ("btrfs: =
fix
panic caused by direct IO")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
fs/btrfs/inode.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 8039390..fbffe5f 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -5712,9 +5712,9 @@ static void btrfs_end_dio_bio(struct bio *bio, in=
t err)
=20
if (err) {
printk(KERN_ERR "btrfs direct IO failed ino %lu rw %lu "
- "disk_bytenr %lu len %u err no %d\n",
- dip->inode->i_ino, bio->bi_rw, bio->bi_sector,
- bio->bi_size, err);
+ "disk_bytenr %llu len %u err no %d\n",
+ dip->inode->i_ino, bio->bi_rw,
+ (unsigned long long)bio->bi_sector, bio->bi_size, err);
dip->errors =3D 1;
=20
/*
--=20
1.7.0.4
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=
=2E But
when I'm talking to journalists I just say "programmer" or something li=
ke that.
-- Linus Torvalds
next reply other threads:[~2010-11-30 20:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 20:30 Geert Uytterhoeven [this message]
2010-11-30 20:33 ` [PATCH] btrfs: Correct printing of sector_t Randy Dunlap
2010-12-01 1:33 ` Li Zefan
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=alpine.DEB.2.00.1011302128450.6502@ayla.of.borg \
--to=geert@linux-m68k.org \
--cc=akpm@linux-foundation.org \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miaox@cn.fujitsu.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).