* [-mm patch] cleanup linux/byteorder/swabb.h
@ 2007-01-11 13:49 Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2007-01-11 13:49 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
- no longer a userspace header
- add #include <linux/types.h> for in-kernel compilation
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
This patch was already sent on:
- 13 Dec 2006
include/linux/byteorder/Kbuild | 1 -
include/linux/byteorder/swabb.h | 13 ++++---------
2 files changed, 4 insertions(+), 10 deletions(-)
--- a/include/linux/byteorder/swabb.h
+++ b/include/linux/byteorder/swabb.h
@@ -25,6 +25,8 @@ #define _LINUX_BYTEORDER_SWABB_H
*
*/
+#include <linux/types.h>
+
#define ___swahw32(x) \
({ \
__u32 __x = (x); \
@@ -77,19 +79,14 @@ #endif
/*
* 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 @@ #ifdef __BYTEORDER_HAS_U64__
*/
#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 */
--- linux-2.6.19-mm1/include/linux/byteorder/Kbuild.old 2006-12-13 02:33:41.000000000 +0100
+++ linux-2.6.19-mm1/include/linux/byteorder/Kbuild 2006-12-13 02:33:46.000000000 +0100
@@ -2,5 +2,4 @@
header-y += little_endian.h
unifdef-y += generic.h
-unifdef-y += swabb.h
unifdef-y += swab.h
^ permalink raw reply [flat|nested] 2+ messages in thread* [-mm patch] cleanup linux/byteorder/swabb.h
@ 2006-12-13 13:07 Adrian Bunk
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Bunk @ 2006-12-13 13:07 UTC (permalink / raw)
To: linux-kernel
- no longer a userspace header
- add #include <linux/types.h> for in-kernel compilation
Signed-off-by: Adrian Bunk <bunk@stusta.de>
---
include/linux/byteorder/Kbuild | 1 -
include/linux/byteorder/swabb.h | 13 ++++---------
2 files changed, 4 insertions(+), 10 deletions(-)
--- a/include/linux/byteorder/swabb.h
+++ b/include/linux/byteorder/swabb.h
@@ -25,6 +25,8 @@ #define _LINUX_BYTEORDER_SWABB_H
*
*/
+#include <linux/types.h>
+
#define ___swahw32(x) \
({ \
__u32 __x = (x); \
@@ -77,19 +79,14 @@ #endif
/*
* 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 @@ #ifdef __BYTEORDER_HAS_U64__
*/
#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 */
--- linux-2.6.19-mm1/include/linux/byteorder/Kbuild.old 2006-12-13 02:33:41.000000000 +0100
+++ linux-2.6.19-mm1/include/linux/byteorder/Kbuild 2006-12-13 02:33:46.000000000 +0100
@@ -2,5 +2,4 @@
header-y += little_endian.h
unifdef-y += generic.h
-unifdef-y += swabb.h
unifdef-y += swab.h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-01-11 13:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-11 13:49 [-mm patch] cleanup linux/byteorder/swabb.h Adrian Bunk
-- strict thread matches above, loose matches on Subject: below --
2006-12-13 13:07 Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox