From: "Jan Beulich" <JBeulich@novell.com>
To: "Chris Mason" <chris.mason@oracle.com>
Cc: <linux-btrfs@vger.kernel.org>
Subject: [PATCH] btrfs: avoid compiler warnings
Date: Tue, 07 Dec 2010 14:54:09 +0000 [thread overview]
Message-ID: <4CFE58A102000078000266EC@vpn.id2.novell.com> (raw)
... regarding an unused function when !MIGRATION, and regarding a
printk() format string vs argument mismatch.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
---
fs/btrfs/disk-io.c | 6 ++----
fs/btrfs/inode.c | 6 +++---
2 files changed, 5 insertions(+), 7 deletions(-)
--- linux-2.6.37-rc5/fs/btrfs/disk-io.c
+++ 2.6.37-rc5-btrfs-warnings/fs/btrfs/disk-io.c
@@ -696,6 +696,7 @@ static int btree_submit_bio_hook(struct
__btree_submit_bio_done);
}
+#ifdef CONFIG_MIGRATION
static int btree_migratepage(struct address_space *mapping,
struct page *newpage, struct page *page)
{
@@ -712,12 +713,9 @@ static int btree_migratepage(struct addr
if (page_has_private(page) &&
!try_to_release_page(page, GFP_KERNEL))
return -EAGAIN;
-#ifdef CONFIG_MIGRATION
return migrate_page(mapping, newpage, page);
-#else
- return -ENOSYS;
-#endif
}
+#endif
static int btree_writepage(struct page *page, struct writeback_control *wbc)
{
--- linux-2.6.37-rc5/fs/btrfs/inode.c
+++ 2.6.37-rc5-btrfs-warnings/fs/btrfs/inode.c
@@ -5712,9 +5712,9 @@ static void btrfs_end_dio_bio(struct bio
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);
+ "sector %#Lx 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 = 1;
/*
reply other threads:[~2010-12-07 14:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4CFE58A102000078000266EC@vpn.id2.novell.com \
--to=jbeulich@novell.com \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/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).