Re: [Ext2-devel] [RFC] [PATCH] Clean up fs.h union for ext2

Oliver Xymoron (oxymoron@waste.org)
Sat, 29 Dec 2001 15:30:16 -0600 (CST)


On Sat, 29 Dec 2001, Andreas Dilger wrote:

> > The ext3 macros are rather revolting, simply because they assume the
> > variable name. A parameterized macro might be the best compromise:
> >
> > #define EXT2_I(i) (&(i->u.ext2_inode_info))
>
> My mistake, the Ext3 macros _do_ take an inode/sb parameter. It's not that
> I'm a huge fan of macros over inline functions, it's just that I would like
> to have a consensus about how it should be done so that it is consistent
> between ext2 and ext3.

The inline route is the way to go. The const guarantee on *inode doesn't
get propagated down to the objects it points to by the compiler anyway so
when the unions go away being const-correct gains us nothing.

-- 
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.."

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/