Re: [PATCH] Add be*/le* types without underscores

From: Linus Torvalds
Date: Sun Oct 30 2005 - 16:23:31 EST




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@xxxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/