Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc4acb1b authored by YueHaibing's avatar YueHaibing Committed by Steffen Klassert
Browse files

xfrm: policy: remove set but not used variable 'priority'



Fixes gcc '-Wunused-but-set-variable' warning:

net/xfrm/xfrm_policy.c: In function 'xfrm_policy_lookup_bytype':
net/xfrm/xfrm_policy.c:2079:6: warning:
 variable 'priority' set but not used [-Wunused-but-set-variable]

It not used since commit 6be3b0db ("xfrm: policy: add inexact policy
search tree infrastructure")

Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent 33f18c96
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -2076,7 +2076,6 @@ static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
	struct xfrm_policy *pol, *ret;
	struct hlist_head *chain;
	unsigned int sequence;
	u32 priority;
	int err;

	daddr = xfrm_flowi_daddr(fl, family);
@@ -2091,7 +2090,6 @@ static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
		chain = policy_hash_direct(net, daddr, saddr, family, dir);
	} while (read_seqcount_retry(&xfrm_policy_hash_generation, sequence));

	priority = ~0U;
	ret = NULL;
	hlist_for_each_entry_rcu(pol, chain, bydst) {
		err = xfrm_policy_match(pol, fl, type, family, dir, if_id);
@@ -2104,7 +2102,6 @@ static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
			}
		} else {
			ret = pol;
			priority = ret->priority;
			break;
		}
	}