lkml.org 
[lkml]   [2005]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Add be*/le* types without underscores


On Sun, 30 Oct 2005, Herbert Xu wrote:
>
> Of course userspace won't see them since they're protected by
> #ifdef __KERNEL__.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

This won't work, I think.

sparse basically always creates a _new_type_ for a bitwise typedef, so
when you do

typedef u16 __bitwise le16;
typedef u16 __bitwise be16;
...

your new "le16" will be _different_ from the old __le16, and you can't use
it with "cpu_to_le16()" and other things.

I think that

typedef __le16 le16;

should do what you want, but you should check.

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

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.070 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site