Re: [PATCH] abuse of macros in swab.h

From: Andrea Arcangeli (andrea@suse.de)
Date: Tue Sep 19 2000 - 18:54:26 EST


On Tue, Sep 19, 2000 at 07:13:31PM -0400, Alexander Viro wrote:
> +static inline __u16 ___swab16(__u16 x)
> +{
> + return ((x & (__u16)0x00ffU) << 8) | ((x & (__u16)0xff00U) >> 8);
> +}
> +static inline __u32 ___swab16(__u32 x)
                       ^^^^^^^^^
> +{
> + return ((x & (__u32)0x000000ffUL) << 24) |
> + ((x & (__u32)0x0000ff00UL) << 8) |
> + ((x & (__u32)0x00ff0000UL) >> 8) |
> + ((x & (__u32)0xff000000UL) >> 24);
> +}
> +static inline __u64 ___swab16(__u64 x)
                       ^^^^^^^^^

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Sep 23 2000 - 21:00:22 EST