Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfb58478 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds
Browse files

[PATCH] cleanup linux/byteorder/swabb.h



- no longer a userspace header
- add #include <linux/types.h> for in-kernel compilation

Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a9cccd34
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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
+4 −9
Original line number Diff line number Diff line
@@ -25,6 +25,8 @@
 *
 */

#include <linux/types.h>

#define ___swahw32(x) \
({ \
	__u32 __x = (x); \
@@ -77,7 +79,6 @@
/*
 * Allow constant folding
 */
#if defined(__GNUC__) && defined(__OPTIMIZE__)
#define __swahw32(x) \
(__builtin_constant_p((__u32)(x)) ? \
 ___swahw32((x)) : \
@@ -86,10 +87,6 @@
(__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 */