From: Andreas Dilger <adilger@turbolabs.com>
To: Daniel Phillips <phillips@bonn-fries.net>
Cc: linux-kernel@vger.kernel.org, ext2-devel@lists.sourceforge.net,
Arnaldo Carvalho de Melo <acme@conectiva.com.br>,
Alexander Viro <viro@math.psu.edu>,
Marcelo Tosatti <marcelo@conectiva.com.br>,
Linus Torvalds <torvalds@transmeta.com>
Subject: Re: [Ext2-devel] [RFC] [PATCH] Clean up fs.h union for ext2
Date: Thu, 27 Dec 2001 11:14:15 -0700 [thread overview]
Message-ID: <20011227111415.D12868@lynx.no> (raw)
In-Reply-To: <E16JR71-0000cU-00@starship.berlin>
In-Reply-To: <E16JR71-0000cU-00@starship.berlin>; from phillips@bonn-fries.net on Thu, Dec 27, 2001 at 04:21:42AM +0100
On Dec 27, 2001 04:21 +0100, Daniel Phillips wrote:
> The strategy is to abstract all references to the struct inode union through
> an inline function:
>
> static inline struct ext2_inode_info *ext2_i (struct inode *inode)
> {
> return &(inode->u.ext2_inode_info);
> }
>
> There is some grist here for the mills of language lawyers here. Note the
> compilation warning:
>
> ialloc.c:336: warning: passing arg 1 of `ext2_i' discards qualifiers from
> pointer target type
Why not just declare ext2_i like the following? It _should_ work:
static inline struct ext2_inode_info *ext2_i(const struct inode *inode)
{
return &(inode->u.ext2_inode_info);
}
Minor nit: this is already done for the ext3 code, but it looks like:
#define EXT3_I (&((inode)->u.ext3_i))
We already have the EXT3_SB, so I thought I would be consistent with it:
#define EXT3_SB (&((sb)->u.ext3_sb))
Do people like the inline version better? Either way, I would like to make
the ext2 and ext3 codes more similar, rather than less.
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/
next prev parent reply other threads:[~2001-12-27 18:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-27 3:21 [RFC] [PATCH] Clean up fs.h union for ext2 Daniel Phillips
2001-12-27 3:28 ` Legacy Fishtank
2001-12-27 3:35 ` Arnaldo Carvalho de Melo
2001-12-27 3:52 ` Daniel Phillips
2002-01-05 14:29 ` Anton Altaparmakov
2002-01-05 14:47 ` Daniel Phillips
2002-01-05 14:56 ` Anton Altaparmakov
2002-01-06 3:32 ` Daniel Phillips
2002-01-06 4:04 ` Anton Altaparmakov
2002-01-06 22:42 ` Daniel Phillips
2002-01-07 0:30 ` Anton Altaparmakov
2002-01-07 1:27 ` Arnaldo Carvalho de Melo
2002-01-07 2:12 ` Daniel Phillips
2002-01-07 2:18 ` Arnaldo Carvalho de Melo
2002-01-07 2:22 ` Arnaldo Carvalho de Melo
2001-12-27 18:14 ` Andreas Dilger [this message]
2001-12-28 1:55 ` [Ext2-devel] " Daniel Phillips
2001-12-29 16:04 ` Oliver Xymoron
2001-12-29 21:01 ` Andreas Dilger
2001-12-29 21:30 ` Oliver Xymoron
2001-12-29 21:08 ` Andrew Morton
2002-01-02 10:26 ` Pavel Machek
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=20011227111415.D12868@lynx.no \
--to=adilger@turbolabs.com \
--cc=acme@conectiva.com.br \
--cc=ext2-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=phillips@bonn-fries.net \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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