[XFRM]: xfrm_spi_hash() annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Al Viro 2006-09-27 18:49:35 -07:00 коммит произвёл David S. Miller
Родитель 4324a17430
Коммит 8122adf06e
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -58,10 +58,10 @@ static inline unsigned __xfrm_src_hash(xfrm_address_t *saddr,
} }
static inline unsigned int 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 hmask)
{ {
unsigned int h = spi ^ proto; unsigned int h = (__force u32)spi ^ proto;
switch (family) { switch (family) {
case AF_INET: case AF_INET:
h ^= __xfrm4_addr_hash(daddr); h ^= __xfrm4_addr_hash(daddr);

Просмотреть файл

@ -70,7 +70,7 @@ static inline unsigned int xfrm_src_hash(xfrm_address_t *addr,
} }
static inline unsigned int 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); return __xfrm_spi_hash(daddr, spi, proto, family, xfrm_state_hmask);
} }