Re: [PATCH] ubi: kill homegrown endian macros

From: Christoph Hellwig
Date: Thu May 17 2007 - 14:36:39 EST


On Thu, May 17, 2007 at 08:23:14PM +0200, Sam Ravnborg wrote:
> On Thu, May 17, 2007 at 08:12:23PM +0200, Christoph Hellwig wrote:
> > On Thu, May 17, 2007 at 11:50:54PM +0800, David Woodhouse wrote:
> > > On Thu, 2007-05-17 at 16:32 +0200, Christoph Hellwig wrote:
> > > > Kill ubis homegrown endianess handling crap and replace it with
> > > > the normal kernel endianess handling.
> > >
> > > NAK. The 'normal' kernel stuff doesn't work in GCC; only in sparse.
> > >
> > > If you want to go removing the ones which _do_ work in GCC, then fix the
> > > 'normal' one first. _Then_ go about converting others over to it.
> >
> > Nope. gcc checking is crap and we need to run sparse anyway. It's what
> > everyone in the kernel use so it's perfect for some random code almost
> > no one uses aswell.
>
> Care to explain what is wrong with the gcc checks as used by UBI?
> Would be nice to know before someone start to migrate current
> stuff so gcc can check for correct endian.

The major wrong thing is that it makes a little subsysttem artifically
different from the rest of the kernel.

At a technical level it overdoing things. The attribute syntax is perfecltly
find to address endianess issues without introducing wrapper structs the
lead to horrible code generation in some situations (e.g. trying to return
such a value)
-
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/