Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965046AbXBTPXF (ORCPT ); Tue, 20 Feb 2007 10:23:05 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965048AbXBTPXF (ORCPT ); Tue, 20 Feb 2007 10:23:05 -0500 Received: from thunk.org ([69.25.196.29]:45036 "EHLO thunker.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965046AbXBTPXD (ORCPT ); Tue, 20 Feb 2007 10:23:03 -0500 Date: Tue, 20 Feb 2007 10:22:59 -0500 From: Theodore Tso To: David Woodhouse Cc: Artem Bityutskiy , Christoph Hellwig , Linux Kernel Mailing List , Frank Haverkamp , Josh Boyer , Thomas Gleixner Subject: Re: [PATCH 05/44 take 2] [UBI] internal common header Message-ID: <20070220152259.GD3170@thunk.org> Mail-Followup-To: Theodore Tso , David Woodhouse , Artem Bityutskiy , Christoph Hellwig , Linux Kernel Mailing List , Frank Haverkamp , Josh Boyer , Thomas Gleixner References: <20070217165424.5845.4390.sendpatchset@localhost.localdomain> <20070217165449.5845.18238.sendpatchset@localhost.localdomain> <20070219105445.GA16930@infradead.org> <1171976753.4039.27.camel@sauron> <20070220145503.GC3170@thunk.org> <1171984555.3518.5.camel@hades.cambridge.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1171984555.3518.5.camel@hades.cambridge.redhat.com> User-Agent: Mutt/1.5.12-2006-07-14 X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on thunker.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 920 Lines: 22 On Tue, Feb 20, 2007 at 03:15:55PM +0000, David Woodhouse wrote: > > It would be much better to use __be32 and __be64, so you get better > > type checking, and you will catch bugs caused by forgetting to use > > be32_to_cpu, et. al. > > The technique Artem uses is derived from what I do in JFFS2. It predates > the use of sparse to catch such errors, and works in gcc for _everyone_ > without having to do anything special (like run sparse). But __be32 will catch the same errors these days because the be/le types use __bitwise now, right? So use of the __be32/__be64 types should be preferred since it also will work with sparse, I would think. Regards, - Ted - 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/