X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Flinux%2Fbyteorder%2Fswabb.h;h=8c780c7d779e134fd9d42531b8f2e8d61b2badb4;hb=404443081ce5e6f68b5f7eda16c959835ff200c0;hp=d5f2a320510930ce7d673ed11ed2f30c96d5994f;hpb=c2d9b8387bce8b4a0fd402fab7dc1319d11a418d;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h index d5f2a320510..8c780c7d779 100644 --- a/include/linux/byteorder/swabb.h +++ b/include/linux/byteorder/swabb.h @@ -25,6 +25,8 @@ * */ +#include + #define ___swahw32(x) \ ({ \ __u32 __x = (x); \ @@ -77,19 +79,14 @@ /* * Allow constant folding */ -#if defined(__GNUC__) && (__GNUC__ >= 2) && 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 */