From: Arnd Bergmann <arnd@arndb.de>
To: Chris Mason <clm@fb.com>
Cc: Miao Xie <miaox@cn.fujitsu.com>, Josef Bacik <jbacik@fb.com>,
David Sterba <dsterba@suse.cz>,
linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Btrfs: avoid build warning on 32-bit
Date: Tue, 13 Jan 2015 15:09:03 +0100 [thread overview]
Message-ID: <4264141.3m7C7LgF5c@wuerfel> (raw)
A recent change introduced a type cast from a private 64-bit
value to a pointer, which works fine on 64-bit architectures,
but not on 32-bit ones, where it produces a harmless compiler
warning:
fs/btrfs/extent_io.c: In function 'btrfs_free_io_failure_record':
fs/btrfs/extent_io.c:2193:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
This adds an intermediate cast to 'unsigned long', which tells
the compiler to ignore the type mismatch.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: f612496bca664 ("Btrfs: cleanup the read failure record after write
or when the inode is freeing")
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 4ebabd237153..790dbae3343c 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2190,7 +2190,7 @@ void btrfs_free_io_failure_record(struct inode *inode, u64 start, u64 end)
next = next_state(state);
- failrec = (struct io_failure_record *)state->private;
+ failrec = (struct io_failure_record *)(unsigned long)state->private;
free_extent_state(state);
kfree(failrec);
next reply other threads:[~2015-01-13 14:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-13 14:09 Arnd Bergmann [this message]
2015-01-14 0:16 ` David Sterba
2015-01-14 1:12 ` Chris Mason
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=4264141.3m7C7LgF5c@wuerfel \
--to=arnd@arndb.de \
--cc=clm@fb.com \
--cc=dsterba@suse.cz \
--cc=jbacik@fb.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
Powered by JetHome