From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
To: <dsterba@suse.cz>, Btrfs BTRFS <linux-btrfs@vger.kernel.org>,
Chris Murphy <chris@colorremedies.com>
Subject: Re: [PATCH] btrfs: suppress a build warning on building 32bit kernel
Date: Mon, 5 Jan 2015 17:03:29 +0900 [thread overview]
Message-ID: <54AA4551.9010900@jp.fujitsu.com> (raw)
In-Reply-To: <20141229150903.GH6490@twin.jikos.cz>
Hi David,
On 2014/12/30 0:09, David Sterba wrote:
> On Thu, Dec 25, 2014 at 06:21:41PM +0900, Satoru Takeuchi wrote:
>> From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
>> --- 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;
>
> We're always using the 'private' data to store a pointer to
> 'struct io_failure_record *', please change the defintion in
> 'struct extent_state' instead of the typecasting.
Current definition is as follow.
===============================================================================
struct extent_state {
...
/* for use by the FS */
u64 private;
};
===============================================================================
It it OK to changing "u64 private" to "struct io_failure_record *failrec"
and change "{set,get}_state_private()" to "{set,get}_state_failrec()?
Or is it better to keep the name "private" as is and just change its type
to "unsigned long" or "(void *)"?
Thanks,
Satoru
>
>> free_extent_state(state);
>> kfree(failrec);
next prev parent reply other threads:[~2015-01-05 8:04 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 ` [PATCH] btrfs: suppress a build warning on building 32bit kernel Satoru Takeuchi
2014-12-29 15:09 ` David Sterba
2015-01-05 8:03 ` Satoru Takeuchi [this message]
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=54AA4551.9010900@jp.fujitsu.com \
--to=takeuchi_satoru@jp.fujitsu.com \
--cc=chris@colorremedies.com \
--cc=dsterba@suse.cz \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.