lkml.org 
[lkml]   [1998]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: linux-2.1.106-ac3-ac4: Some weirdness in fs/ext/ patches
Date
From
"David S. Miller" <davem@dm.cobaltmicro.com> said:
> Bill Hawes <whawes@transmeta.com> said
> Horst von Brand said:
> > OTOH, in the above mentioned part of the patch I see that the following
> > line is being added to truncate.c:
> >
> > static u32 le32_zero = cpu_to_le32(0);
> >
> > I don't see any possible changes in the representation of 0 when
> > going from big to little endian ;) Anyway, this kind of stuff should
> > be #defined as a constant, if really needed.

> The original code went to the trouble of converting endian-ness for 0,
> so I thought it best to keep this in place. Who knows, perhaps some
> future architecture will need it.

> This was just incredible anal retentiveness on my part when I did the
> original bi-endianness support. I think it can safely be changed to a
> define so it gets optimized out properly due to constant folding in
> the compiler.

OTOH, writing "LE32_ZERO" and not "cpu_to_le32(0)" buys you very
little. Just write it inline.
--
Horst von Brand vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viña del Mar, Chile +56 32 672616

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:43    [W:0.568 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site