diff options
Diffstat (limited to 'include/linux/byteorder')
| -rw-r--r-- | include/linux/byteorder/big_endian.h | 8 | ||||
| -rw-r--r-- | include/linux/byteorder/generic.h | 8 | ||||
| -rw-r--r-- | include/linux/byteorder/little_endian.h | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/include/linux/byteorder/big_endian.h b/include/linux/byteorder/big_endian.h index c2071cc9e5a1..40d40b47959c 100644 --- a/include/linux/byteorder/big_endian.h +++ b/include/linux/byteorder/big_endian.h @@ -11,10 +11,10 @@ #include <linux/types.h> #include <linux/byteorder/swab.h> -#define __constant_htonl(x) ((__u32)(x)) -#define __constant_ntohl(x) ((__u32)(x)) -#define __constant_htons(x) ((__u16)(x)) -#define __constant_ntohs(x) ((__u16)(x)) +#define __constant_htonl(x) ((__force __be32)(__u32)(x)) +#define __constant_ntohl(x) ((__force __u32)(__be32)(x)) +#define __constant_htons(x) ((__force __be16)(__u16)(x)) +#define __constant_ntohs(x) ((__force __u16)(__be16)(x)) #define __constant_cpu_to_le64(x) ((__force __le64)___constant_swab64((x))) #define __constant_le64_to_cpu(x) ___constant_swab64((__force __u64)(__le64)(x)) #define __constant_cpu_to_le32(x) ((__force __le32)___constant_swab32((x))) diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index 5f33f565d7bf..5fde6f4d6c1e 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h @@ -147,10 +147,10 @@ * Do the prototypes. Somebody might want to take the * address or some such sick thing.. */ -extern __u32 ntohl(__u32); -extern __u32 htonl(__u32); -extern unsigned short int ntohs(unsigned short int); -extern unsigned short int htons(unsigned short int); +extern __u32 ntohl(__be32); +extern __be32 htonl(__u32); +extern __u16 ntohs(__be16); +extern __be16 htons(__u16); #if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) diff --git a/include/linux/byteorder/little_endian.h b/include/linux/byteorder/little_endian.h index be51748878ea..c05349b8448e 100644 --- a/include/linux/byteorder/little_endian.h +++ b/include/linux/byteorder/little_endian.h @@ -11,10 +11,10 @@ #include <linux/types.h> #include <linux/byteorder/swab.h> -#define __constant_htonl(x) ___constant_swab32((x)) -#define __constant_ntohl(x) ___constant_swab32((x)) -#define __constant_htons(x) ___constant_swab16((x)) -#define __constant_ntohs(x) ___constant_swab16((x)) +#define __constant_htonl(x) ((__force __be32)___constant_swab32((x))) +#define __constant_ntohl(x) ___constant_swab32((__force __be32)(x)) +#define __constant_htons(x) ((__force __be16)___constant_swab16((x))) +#define __constant_ntohs(x) ___constant_swab16((__force __be16)(x)) #define __constant_cpu_to_le64(x) ((__force __le64)(__u64)(x)) #define __constant_le64_to_cpu(x) ((__force __u64)(__le64)(x)) #define __constant_cpu_to_le32(x) ((__force __le32)(__u32)(x)) |
