From: David Sterba <dsterba@suse.cz>
To: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Cc: 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: Tue, 6 Jan 2015 15:07:59 +0100 [thread overview]
Message-ID: <20150106140759.GA24104@suse.cz> (raw)
In-Reply-To: <54AA4551.9010900@jp.fujitsu.com>
On Mon, Jan 05, 2015 at 05:03:29PM +0900, Satoru Takeuchi wrote:
> >> - 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 *)"?
I've looked at the implied changes that set/get functions renaming would
need, also to keep the code sane. It does not seem to be small enough to
fold in this patch so please go on with adding the typecasts. The code
could use some cleanups but bugfixes first.
prev parent reply other threads:[~2015-01-06 14:08 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
2015-01-06 14:07 ` David Sterba [this message]
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=20150106140759.GA24104@suse.cz \
--to=dsterba@suse.cz \
--cc=chris@colorremedies.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=takeuchi_satoru@jp.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).