Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 29 Dec 2001 16:30:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 29 Dec 2001 16:30:30 -0500 Received: from waste.org ([209.173.204.2]:16340 "EHLO waste.org") by vger.kernel.org with ESMTP id ; Sat, 29 Dec 2001 16:30:28 -0500 Date: Sat, 29 Dec 2001 15:30:16 -0600 (CST) From: Oliver Xymoron To: Andreas Dilger cc: Daniel Phillips , , Subject: Re: [Ext2-devel] [RFC] [PATCH] Clean up fs.h union for ext2 In-Reply-To: <20011229140105.A12868@lynx.no> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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/