Commit 967680e0 authored by Duan Jiong's avatar Duan Jiong Committed by David S. Miller

ipv4: remove the useless argument from ip_tunnel_hash()

Since commit c5441932("GRE: Refactor GRE tunneling code")
introduced function ip_tunnel_hash(), the argument itn is no
longer in use, so remove it.
Signed-off-by: default avatarDuan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8d783163
...@@ -61,8 +61,7 @@ ...@@ -61,8 +61,7 @@
#include <net/ip6_route.h> #include <net/ip6_route.h>
#endif #endif
static unsigned int ip_tunnel_hash(struct ip_tunnel_net *itn, static unsigned int ip_tunnel_hash(__be32 key, __be32 remote)
__be32 key, __be32 remote)
{ {
return hash_32((__force u32)key ^ (__force u32)remote, return hash_32((__force u32)key ^ (__force u32)remote,
IP_TNL_HASH_BITS); IP_TNL_HASH_BITS);
...@@ -204,7 +203,7 @@ struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn, ...@@ -204,7 +203,7 @@ struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn,
struct ip_tunnel *t, *cand = NULL; struct ip_tunnel *t, *cand = NULL;
struct hlist_head *head; struct hlist_head *head;
hash = ip_tunnel_hash(itn, key, remote); hash = ip_tunnel_hash(key, remote);
head = &itn->tunnels[hash]; head = &itn->tunnels[hash];
hlist_for_each_entry_rcu(t, head, hash_node) { hlist_for_each_entry_rcu(t, head, hash_node) {
...@@ -236,7 +235,7 @@ struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn, ...@@ -236,7 +235,7 @@ struct ip_tunnel *ip_tunnel_lookup(struct ip_tunnel_net *itn,
cand = t; cand = t;
} }
hash = ip_tunnel_hash(itn, key, 0); hash = ip_tunnel_hash(key, 0);
head = &itn->tunnels[hash]; head = &itn->tunnels[hash];
hlist_for_each_entry_rcu(t, head, hash_node) { hlist_for_each_entry_rcu(t, head, hash_node) {
...@@ -292,7 +291,7 @@ static struct hlist_head *ip_bucket(struct ip_tunnel_net *itn, ...@@ -292,7 +291,7 @@ static struct hlist_head *ip_bucket(struct ip_tunnel_net *itn,
else else
remote = 0; remote = 0;
h = ip_tunnel_hash(itn, parms->i_key, remote); h = ip_tunnel_hash(parms->i_key, remote);
return &itn->tunnels[h]; return &itn->tunnels[h];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment