On Wed, 20 Sep 2000, Andi Kleen wrote:

> 
> This patch fixes an obvious bug introduced with the ext2 changes in 2.2.18pre
> (look up the definition of le32_to_cpu on BE machines without a special
> assembler version for it and on machines that have it)
> 
> Patch against 2.2.18pre9

Wrong fix. swab32() is the guilty party here - it should be

static inline __u32 swab32(__u32 x)
{
        return
                ((x & (__u32)0x000000ffUL) << 24) |
                ((x & (__u32)0x0000ff00UL) <<  8) |
                ((x & (__u32)0x00ff0000UL) >>  8) |
                ((x & (__u32)0xff000000UL) >> 24) );
}

Ditto for other stuff in linux/byteorder/swab.h

My fault - I didn't realize that the bloody thing was a macro (it
obviously shouldn't be, exactly due to problems with side effects).

Alan, what do you prefer? I think that fixing the macros in swab.h is the
Right Thing(tm).

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to