Commit 182777700d912a69824245e9ee99148ac0aa57d7

Authored by Al Viro
Committed by David S. Miller
1 parent 53576d9b99

[IPV4]: ip_fragment.c endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 8 additions and 7 deletions Side-by-side Diff

net/ipv4/ip_fragment.c
... ... @@ -77,9 +77,9 @@
77 77 struct hlist_node list;
78 78 struct list_head lru_list; /* lru list member */
79 79 u32 user;
80   - u32 saddr;
81   - u32 daddr;
82   - u16 id;
  80 + __be32 saddr;
  81 + __be32 daddr;
  82 + __be16 id;
83 83 u8 protocol;
84 84 u8 last_in;
85 85 #define COMPLETE 4
86 86  
... ... @@ -123,9 +123,10 @@
123 123 write_unlock(&ipfrag_lock);
124 124 }
125 125  
126   -static unsigned int ipqhashfn(u16 id, u32 saddr, u32 daddr, u8 prot)
  126 +static unsigned int ipqhashfn(__be16 id, __be32 saddr, __be32 daddr, u8 prot)
127 127 {
128   - return jhash_3words((u32)id << 16 | prot, saddr, daddr,
  128 + return jhash_3words((__force u32)id << 16 | prot,
  129 + (__force u32)saddr, (__force u32)daddr,
129 130 ipfrag_hash_rnd) & (IPQ_HASHSZ - 1);
130 131 }
131 132  
... ... @@ -387,8 +388,8 @@
387 388 static inline struct ipq *ip_find(struct iphdr *iph, u32 user)
388 389 {
389 390 __be16 id = iph->id;
390   - __u32 saddr = iph->saddr;
391   - __u32 daddr = iph->daddr;
  391 + __be32 saddr = iph->saddr;
  392 + __be32 daddr = iph->daddr;
392 393 __u8 protocol = iph->protocol;
393 394 unsigned int hash;
394 395 struct ipq *qp;