From: Al Viro Date: Thu, 28 Sep 2006 01:49:35 +0000 (-0700) Subject: [XFRM]: xfrm_spi_hash() annotations X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8122adf06e6f93ae608cf8227e878cc44f4a8fd1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [XFRM]: xfrm_spi_hash() annotations Signed-off-by: Al Viro Signed-off-by: David S. Miller --- 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, } 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); 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, } 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); }