[XFRM]: xfrm_spi_hash() annotations
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 28 Sep 2006 01:49:35 +0000 (18:49 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 29 Sep 2006 01:02:44 +0000 (18:02 -0700)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_hash.h
net/xfrm/xfrm_state.c

index d3abb0b7dc62190259c941fb28cdfc068d32c1df..6ac4e4f033aca67e1d7178efb4347c98a672aa1b 100644 (file)
@@ -58,10 +58,10 @@ static inline unsigned __xfrm_src_hash(xfrm_address_t *saddr,
 }
 
 static inline unsigned int
-__xfrm_spi_hash(xfrm_address_t *daddr, u32 spi, u8 proto, unsigned short family,
+__xfrm_spi_hash(xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family,
                unsigned int hmask)
 {
-       unsigned int h = spi ^ proto;
+       unsigned int h = (__force u32)spi ^ proto;
        switch (family) {
        case AF_INET:
                h ^= __xfrm4_addr_hash(daddr);
index 25657f57fbb0d544f3c3b920980b8d75f28b44a7..fafe1ed5f56b8499a706ed8e84b94549e82197ef 100644 (file)
@@ -70,7 +70,7 @@ static inline unsigned int xfrm_src_hash(xfrm_address_t *addr,
 }
 
 static inline unsigned int
-xfrm_spi_hash(xfrm_address_t *daddr, u32 spi, u8 proto, unsigned short family)
+xfrm_spi_hash(xfrm_address_t *daddr, __be32 spi, u8 proto, unsigned short family)
 {
        return __xfrm_spi_hash(daddr, spi, proto, family, xfrm_state_hmask);
 }