linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
To: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Cc: Chris Murphy <chris@colorremedies.com>
Subject: [PATCH] btrfs: suppress a build warning on building 32bit kernel
Date: Thu, 25 Dec 2014 18:21:41 +0900	[thread overview]
Message-ID: <549BD725.8040603@jp.fujitsu.com> (raw)
In-Reply-To: <CAJCQCtQWS9j0g44c5VKp0Cv=PRC=GAJwpspF5eeRk0siibGXKg@mail.gmail.com>

From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>

Suppress the following warning displayed on building 32bit (i686) kernel.

===============================================================================
...
   CC [M]  fs/btrfs/extent_io.o
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]
    failrec = (struct io_failure_record *)state->private;
...
===============================================================================

Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Reported-by: Chris Murphy <chris@colorremedies.com>

---
  fs/btrfs/extent_io.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 4ebabd2..790dbae 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);
  
-- 
1.8.3.1


  reply	other threads:[~2014-12-25  9:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23 21:46 3.19rc1, extent_io.c:2193:13: warning: cast to pointer from integer of different size Chris Murphy
2014-12-25  9:21 ` Satoru Takeuchi [this message]
2014-12-29 15:09   ` [PATCH] btrfs: suppress a build warning on building 32bit kernel David Sterba
2015-01-05  8:03     ` Satoru Takeuchi
2015-01-06 14:07       ` David Sterba

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=549BD725.8040603@jp.fujitsu.com \
    --to=takeuchi_satoru@jp.fujitsu.com \
    --cc=chris@colorremedies.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).