diff options
author | Eric Dumazet <edumazet@google.com> | 2015-03-18 17:05:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-18 22:00:34 -0400 |
commit | 6eada0110c8984477f5f1e57a0b7f7b2fc841e30 (patch) | |
tree | b7f6118fe6d137d56a2264fb81a8f5718236abb9 /net/ipv6 | |
parent | 8f6320de5f6a817ba360be6ae39f721c7f9b26fb (diff) |
netns: constify net_hash_mix() and various callers
const qualifiers ease code review by making clear
which objects are not written in a function.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/inet6_hashtables.c | 10 | ||||
-rw-r--r-- | net/ipv6/udp.c | 16 |
2 files changed, 13 insertions, 13 deletions
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c index 051dffb49c90..df7df99d1d7e 100644 --- a/net/ipv6/inet6_hashtables.c +++ b/net/ipv6/inet6_hashtables.c | |||
@@ -23,11 +23,11 @@ | |||
23 | #include <net/secure_seq.h> | 23 | #include <net/secure_seq.h> |
24 | #include <net/ip.h> | 24 | #include <net/ip.h> |
25 | 25 | ||
26 | static unsigned int inet6_ehashfn(struct net *net, | 26 | static u32 inet6_ehashfn(const struct net *net, |
27 | const struct in6_addr *laddr, | 27 | const struct in6_addr *laddr, |
28 | const u16 lport, | 28 | const u16 lport, |
29 | const struct in6_addr *faddr, | 29 | const struct in6_addr *faddr, |
30 | const __be16 fport) | 30 | const __be16 fport) |
31 | { | 31 | { |
32 | static u32 inet6_ehash_secret __read_mostly; | 32 | static u32 inet6_ehash_secret __read_mostly; |
33 | static u32 ipv6_hash_secret __read_mostly; | 33 | static u32 ipv6_hash_secret __read_mostly; |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 70568a4548e4..7fe0329c0d37 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -53,11 +53,11 @@ | |||
53 | #include <trace/events/skb.h> | 53 | #include <trace/events/skb.h> |
54 | #include "udp_impl.h" | 54 | #include "udp_impl.h" |
55 | 55 | ||
56 | static unsigned int udp6_ehashfn(struct net *net, | 56 | static u32 udp6_ehashfn(const struct net *net, |
57 | const struct in6_addr *laddr, | 57 | const struct in6_addr *laddr, |
58 | const u16 lport, | 58 | const u16 lport, |
59 | const struct in6_addr *faddr, | 59 | const struct in6_addr *faddr, |
60 | const __be16 fport) | 60 | const __be16 fport) |
61 | { | 61 | { |
62 | static u32 udp6_ehash_secret __read_mostly; | 62 | static u32 udp6_ehash_secret __read_mostly; |
63 | static u32 udp_ipv6_hash_secret __read_mostly; | 63 | static u32 udp_ipv6_hash_secret __read_mostly; |
@@ -104,9 +104,9 @@ int ipv6_rcv_saddr_equal(const struct sock *sk, const struct sock *sk2) | |||
104 | return 0; | 104 | return 0; |
105 | } | 105 | } |
106 | 106 | ||
107 | static unsigned int udp6_portaddr_hash(struct net *net, | 107 | static u32 udp6_portaddr_hash(const struct net *net, |
108 | const struct in6_addr *addr6, | 108 | const struct in6_addr *addr6, |
109 | unsigned int port) | 109 | unsigned int port) |
110 | { | 110 | { |
111 | unsigned int hash, mix = net_hash_mix(net); | 111 | unsigned int hash, mix = net_hash_mix(net); |
112 | 112 | ||