lkml.org 
[lkml]   [2000]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] abuse of macros in swab.h


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/

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