mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
net: Fix various endianness glitches
Sparse can help us find endianness bugs, but we need to make some cleanups to be able to more easily spot real bugs. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
cb903bf4ee
commit
0eae88f31c
17 changed files with 65 additions and 61 deletions
|
|
@ -16,7 +16,8 @@ static inline unsigned int __xfrm6_addr_hash(xfrm_address_t *addr)
|
|||
|
||||
static inline unsigned int __xfrm4_daddr_saddr_hash(xfrm_address_t *daddr, xfrm_address_t *saddr)
|
||||
{
|
||||
return ntohl(daddr->a4 + saddr->a4);
|
||||
u32 sum = (__force u32)daddr->a4 + (__force u32)saddr->a4;
|
||||
return ntohl((__force __be32)sum);
|
||||
}
|
||||
|
||||
static inline unsigned int __xfrm6_daddr_saddr_hash(xfrm_address_t *daddr, xfrm_address_t *saddr)
|
||||
|
|
|
|||
Loading…
Reference in a new issue