diff options
author | Eric Dumazet <edumazet@google.com> | 2012-12-02 07:33:10 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-02 20:23:01 -0500 |
commit | 077b393d05915f04e2629bfc47c6fce95cae7d3f (patch) | |
tree | 5eac1986bc8d1d8dd4cef0b0c07909773ecc3ebf /include/net/sock.h | |
parent | 049b467d7a57e7b978ce063ee3639670f383fb5c (diff) | |
download | linux-stable-077b393d05915f04e2629bfc47c6fce95cae7d3f.tar.gz linux-stable-077b393d05915f04e2629bfc47c6fce95cae7d3f.tar.bz2 linux-stable-077b393d05915f04e2629bfc47c6fce95cae7d3f.zip |
net: fix sparse endianness warnings on sock_common
# make C=2 CF=-D__CHECK_ENDIAN__ net/ipv4/inet_hashtables.o
...
net/ipv4/inet_hashtables.c:242:7: warning: restricted __portpair degrades to integer
net/ipv4/inet_hashtables.c:242:7: warning: restricted __addrpair degrades to integer
...
Move __portpair/__addrpair from include/net/inet_hashtables.h
to include/net/sock.h where we need them in struct sock_common
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ling Ma <ling.ma.program@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index c4132c1b63a8..0a9a01a5b0d7 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -126,6 +126,9 @@ struct sock; struct proto; struct net; +typedef __u32 __bitwise __portpair; +typedef __u64 __bitwise __addrpair; + /** * struct sock_common - minimal network layer representation of sockets * @skc_daddr: Foreign IPv4 addr @@ -155,7 +158,7 @@ struct sock_common { * address on 64bit arches : cf INET_MATCH() and INET_TW_MATCH() */ union { - unsigned long skc_addrpair; + __addrpair skc_addrpair; struct { __be32 skc_daddr; __be32 skc_rcv_saddr; @@ -167,7 +170,7 @@ struct sock_common { }; /* skc_dport && skc_num must be grouped as well */ union { - u32 skc_portpair; + __portpair skc_portpair; struct { __be16 skc_dport; __u16 skc_num; |