Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bfb58478fe2f8cbbb776d910ff3549515e3c8f4f
Commit:     bfb58478fe2f8cbbb776d910ff3549515e3c8f4f
Parent:     a9cccd34372f7075e8746395609bc78f0fbaf204
Author:     Adrian Bunk <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 10 01:46:06 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Feb 11 10:51:34 2007 -0800

    [PATCH] cleanup linux/byteorder/swabb.h
    
    - no longer a userspace header
    - add #include <linux/types.h> for in-kernel compilation
    
    Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/byteorder/Kbuild  |    1 -
 include/linux/byteorder/swabb.h |   13 ++++---------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild
index d39dc0f..79beddd 100644
--- a/include/linux/byteorder/Kbuild
+++ b/include/linux/byteorder/Kbuild
@@ -2,5 +2,4 @@ header-y += big_endian.h
 header-y += little_endian.h
 
 unifdef-y += generic.h
-unifdef-y += swabb.h
 unifdef-y += swab.h
diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h
index ae5e5f9..8c780c7 100644
--- a/include/linux/byteorder/swabb.h
+++ b/include/linux/byteorder/swabb.h
@@ -25,6 +25,8 @@
  *
  */
 
+#include <linux/types.h>
+
 #define ___swahw32(x) \
 ({ \
        __u32 __x = (x); \
@@ -77,19 +79,14 @@
 /*
  * Allow constant folding
  */
-#if defined(__GNUC__) && defined(__OPTIMIZE__)
-#  define __swahw32(x) \
+#define __swahw32(x) \
 (__builtin_constant_p((__u32)(x)) ? \
  ___swahw32((x)) : \
  __fswahw32((x)))
-#  define __swahb32(x) \
+#define __swahb32(x) \
 (__builtin_constant_p((__u32)(x)) ? \
  ___swahb32((x)) : \
  __fswahb32((x)))
-#else
-#  define __swahw32(x) __fswahw32(x)
-#  define __swahb32(x) __fswahb32(x)
-#endif /* OPTIMIZE */
 
 
 static inline __u32 __fswahw32(__u32 x)
@@ -128,13 +125,11 @@ static inline void __swahb32s(__u32 *addr)
  */
 #endif /* __BYTEORDER_HAS_U64__ */
 
-#if defined(__KERNEL__)
 #define swahw32 __swahw32
 #define swahb32 __swahb32
 #define swahw32p __swahw32p
 #define swahb32p __swahb32p
 #define swahw32s __swahw32s
 #define swahb32s __swahb32s
-#endif
 
 #endif /* _LINUX_BYTEORDER_SWABB_H */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to