diff mbox series

net: ipv6: remove unused arg exact_dif in compute_score

Message ID 20200829090420.6351-1-linmiaohe@huawei.com
State Superseded
Delegated to: David Miller
Headers show
Series net: ipv6: remove unused arg exact_dif in compute_score | expand

Commit Message

Miaohe Lin Aug. 29, 2020, 9:04 a.m. UTC
The arg exact_dif is not used anymore, remove it.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 net/ipv6/inet6_hashtables.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

David Ahern Aug. 29, 2020, 7:28 p.m. UTC | #1
On 8/29/20 3:04 AM, Miaohe Lin wrote:
> @@ -138,15 +138,13 @@ static struct sock *inet6_lhash2_lookup(struct net *net,
>  		const __be16 sport, const struct in6_addr *daddr,
>  		const unsigned short hnum, const int dif, const int sdif)
>  {
> -	bool exact_dif = inet6_exact_dif_match(net, skb);

inet6_exact_dif_match is no longer needed after the above is removed.
diff mbox series

Patch

diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
index 2d3add9e6116..55c290d55605 100644
--- a/net/ipv6/inet6_hashtables.c
+++ b/net/ipv6/inet6_hashtables.c
@@ -94,7 +94,7 @@  EXPORT_SYMBOL(__inet6_lookup_established);
 static inline int compute_score(struct sock *sk, struct net *net,
 				const unsigned short hnum,
 				const struct in6_addr *daddr,
-				const int dif, const int sdif, bool exact_dif)
+				const int dif, const int sdif)
 {
 	int score = -1;
 
@@ -138,15 +138,13 @@  static struct sock *inet6_lhash2_lookup(struct net *net,
 		const __be16 sport, const struct in6_addr *daddr,
 		const unsigned short hnum, const int dif, const int sdif)
 {
-	bool exact_dif = inet6_exact_dif_match(net, skb);
 	struct inet_connection_sock *icsk;
 	struct sock *sk, *result = NULL;
 	int score, hiscore = 0;
 
 	inet_lhash2_for_each_icsk_rcu(icsk, &ilb2->head) {
 		sk = (struct sock *)icsk;
-		score = compute_score(sk, net, hnum, daddr, dif, sdif,
-				      exact_dif);
+		score = compute_score(sk, net, hnum, daddr, dif, sdif);
 		if (score > hiscore) {
 			result = lookup_reuseport(net, sk, skb, doff,
 						  saddr, sport, daddr, hnum);