aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-09-27 21:49:35 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-28 21:02:44 -0400
commit8122adf06e6f93ae608cf8227e878cc44f4a8fd1 (patch)
treeb83ddb821f85c015e5414817c3d6a1f42a35630c /net
parent4324a174304d1d826582be5422a976e09d2b1e63 (diff)
[XFRM]: xfrm_spi_hash() annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/xfrm/xfrm_hash.h4
-rw-r--r--net/xfrm/xfrm_state.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/net/xfrm/xfrm_hash.h b/net/xfrm/xfrm_hash.h
index d3abb0b7dc62..6ac4e4f033ac 100644
--- a/net/xfrm/xfrm_hash.h
+++ b/net/xfrm/xfrm_hash.h
@@ -58,10 +58,10 @@ static inline unsigned __xfrm_src_hash(xfrm_address_t *saddr,
58} 58}
59 59
60static inline unsigned int 60static inline unsigned int
61__xfrm_spi_hash(xfrm_address_t *daddr, u32 spi, u8 proto, unsigned short family, 61__xfrm_spi_hash(xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family,
62 unsigned int hmask) 62 unsigned int hmask)
63{ 63{
64 unsigned int h = spi ^ proto; 64 unsigned int h = (__force u32)spi ^ proto;
65 switch (family) { 65 switch (family) {
66 case AF_INET: 66 case AF_INET:
67 h ^= __xfrm4_addr_hash(daddr); 67 h ^= __xfrm4_addr_hash(daddr);
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 25657f57fbb0..fafe1ed5f56b 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -70,7 +70,7 @@ static inline unsigned int xfrm_src_hash(xfrm_address_t *addr,
70} 70}
71 71
72static inline unsigned int 72static inline unsigned int
73xfrm_spi_hash(xfrm_address_t *daddr, u32 spi, u8 proto, unsigned short family) 73xfrm_spi_hash(xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family)
74{ 74{
75 return __xfrm_spi_hash(daddr, spi, proto, family, xfrm_state_hmask); 75 return __xfrm_spi_hash(daddr, spi, proto, family, xfrm_state_hmask);
76} 76}