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

From: Alexander Viro (viro@math.psu.edu)
Date: Tue Sep 19 2000 - 19:49:44 EDT

  • Next message: David S. Miller: "Re: Linux-2.4.0-test9-pre2"

    On Wed, 20 Sep 2000, Andrea Arcangeli wrote:

    > 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)

    <self-LART> Ouch! </self-LART>

    Sorry about that, folks - ___swab32 and ___swab64, indeed.

    -
    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 : Tue Sep 19 2000 - 19:51:10 EDT