linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
	Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Add be*/le* types without underscores
Date: Sun, 30 Oct 2005 17:48:42 +1100	[thread overview]
Message-ID: <20051030064842.GA5933@gondor.apana.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 821 bytes --]

Hi:

I've seen a number of patches that have started to use the __le*/__be*
types within the kernel.  Nice as they are, the underscores are really
a bit of an eye sore.  Since there seems to be no name conflict within
the kernel, why don't we use them without the underscores like just as
we do with types like u32?

Here is a patch to do just that.  I've verified that there are no
conflicts by grepping the current git tree and then building it with
the patch.

Of course userspace won't see them since they're protected by
#ifdef __KERNEL__.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

[-- Attachment #2: p --]
[-- Type: text/plain, Size: 721 bytes --]

diff --git a/fs/ntfs/types.h b/fs/ntfs/types.h
--- a/fs/ntfs/types.h
+++ b/fs/ntfs/types.h
@@ -25,9 +25,6 @@
 
 #include <linux/types.h>
 
-typedef __le16 le16;
-typedef __le32 le32;
-typedef __le64 le64;
 typedef __u16 __bitwise sle16;
 typedef __u32 __bitwise sle32;
 typedef __u64 __bitwise sle64;
diff --git a/include/linux/types.h b/include/linux/types.h
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -171,6 +171,13 @@ typedef __u64 __bitwise __be64;
 #endif
 
 #ifdef __KERNEL__
+typedef u16 __bitwise le16;
+typedef u16 __bitwise be16;
+typedef u32 __bitwise le32;
+typedef u32 __bitwise be32;
+typedef u64 __bitwise le64;
+typedef u64 __bitwise be64;
+
 typedef unsigned __bitwise__ gfp_t;
 #endif
 

             reply	other threads:[~2005-10-30  6:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-30  6:48 Herbert Xu [this message]
2005-10-30 19:36 ` [PATCH] Add be*/le* types without underscores Linus Torvalds
2005-10-30 23:00   ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051030064842.GA5933@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).