aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/netns/hash.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-03-18 14:05:33 -0700
committerDavid S. Miller <davem@davemloft.net>2015-03-18 22:00:34 -0400
commit6eada0110c8984477f5f1e57a0b7f7b2fc841e30 (patch)
treeb7f6118fe6d137d56a2264fb81a8f5718236abb9 /include/net/netns/hash.h
parentMerge branch 'txq_max_rate' (diff)
downloadlinux-dev-6eada0110c8984477f5f1e57a0b7f7b2fc841e30.tar.xz
linux-dev-6eada0110c8984477f5f1e57a0b7f7b2fc841e30.zip
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 'include/net/netns/hash.h')
-rw-r--r--include/net/netns/hash.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/netns/hash.h b/include/net/netns/hash.h
index c06ac58ca107..69a6715d9f3f 100644
--- a/include/net/netns/hash.h
+++ b/include/net/netns/hash.h
@@ -5,7 +5,7 @@
struct net;
-static inline unsigned int net_hash_mix(struct net *net)
+static inline u32 net_hash_mix(const struct net *net)
{
#ifdef CONFIG_NET_NS
/*
@@ -13,7 +13,7 @@ static inline unsigned int net_hash_mix(struct net *net)
* always zeroed
*/
- return (unsigned)(((unsigned long)net) >> L1_CACHE_SHIFT);
+ return (u32)(((unsigned long)net) >> L1_CACHE_SHIFT);
#else
return 0;
#endif