diff options
Diffstat (limited to 'include/linux/byteorder')
| -rw-r--r-- | include/linux/byteorder/swab.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/byteorder/swab.h b/include/linux/byteorder/swab.h index 814b4519ff21..02ad0b5246e9 100644 --- a/include/linux/byteorder/swab.h +++ b/include/linux/byteorder/swab.h @@ -15,6 +15,8 @@ * */ +#include <linux/compiler.h> + /* casts are necessary for constants, because we never know how for sure * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way. */ @@ -128,7 +130,7 @@ #endif /* OPTIMIZE */ -static __inline__ __const__ __u16 __fswab16(__u16 x) +static __inline__ __attribute_const__ __u16 __fswab16(__u16 x) { return __arch__swab16(x); } @@ -141,7 +143,7 @@ static __inline__ void __swab16s(__u16 *addr) __arch__swab16s(addr); } -static __inline__ __const__ __u32 __fswab32(__u32 x) +static __inline__ __attribute_const__ __u32 __fswab32(__u32 x) { return __arch__swab32(x); } @@ -155,7 +157,7 @@ static __inline__ void __swab32s(__u32 *addr) } #ifdef __BYTEORDER_HAS_U64__ -static __inline__ __const__ __u64 __fswab64(__u64 x) +static __inline__ __attribute_const__ __u64 __fswab64(__u64 x) { # ifdef __SWAB_64_THRU_32__ __u32 h = x >> 32; |
