Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47591
b: refs/heads/master
c: bfb5847
h: refs/heads/master
i:
  47589: ff58099
  47587: d62812f
  47583: 09e5e63
v: v3
  • Loading branch information
Adrian Bunk authored and Linus Torvalds committed Feb 11, 2007
1 parent a0bf493 commit 174256a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a9cccd34372f7075e8746395609bc78f0fbaf204
refs/heads/master: bfb58478fe2f8cbbb776d910ff3549515e3c8f4f
1 change: 0 additions & 1 deletion trunk/include/linux/byteorder/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
13 changes: 4 additions & 9 deletions trunk/include/linux/byteorder/swabb.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
*
*/

#include <linux/types.h>

#define ___swahw32(x) \
({ \
__u32 __x = (x); \
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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 */

0 comments on commit 174256a

Please sign in to comment.