Re: [PATCH 05/44 take 2] [UBI] internal common header

From: Theodore Tso
Date: Tue Feb 20 2007 - 10:23:35 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/