All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steffen Klassert <steffen.klassert@secunet.com>
To: David Miller <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	Steffen Klassert <steffen.klassert@secunet.com>,
	<netdev@vger.kernel.org>
Subject: [PATCH 02/24] xfrm: Drop unused argument
Date: Sun, 2 Oct 2022 10:16:50 +0200	[thread overview]
Message-ID: <20221002081712.757515-3-steffen.klassert@secunet.com> (raw)
In-Reply-To: <20221002081712.757515-1-steffen.klassert@secunet.com>

From: Hongbin Wang <wh_bin@126.com>

Drop unused argument from xfrm_policy_match,
__xfrm_policy_eval_candidates and xfrm_policy_eval_candidates.
No functional changes intended.

Signed-off-by: Hongbin Wang <wh_bin@126.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
 net/xfrm/xfrm_policy.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index f1a0bab920a5..6264680b1f08 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1889,7 +1889,7 @@ EXPORT_SYMBOL(xfrm_policy_walk_done);
  */
 static int xfrm_policy_match(const struct xfrm_policy *pol,
 			     const struct flowi *fl,
-			     u8 type, u16 family, int dir, u32 if_id)
+			     u8 type, u16 family, u32 if_id)
 {
 	const struct xfrm_selector *sel = &pol->selector;
 	int ret = -ESRCH;
@@ -2014,7 +2014,7 @@ static struct xfrm_policy *
 __xfrm_policy_eval_candidates(struct hlist_head *chain,
 			      struct xfrm_policy *prefer,
 			      const struct flowi *fl,
-			      u8 type, u16 family, int dir, u32 if_id)
+			      u8 type, u16 family, u32 if_id)
 {
 	u32 priority = prefer ? prefer->priority : ~0u;
 	struct xfrm_policy *pol;
@@ -2028,7 +2028,7 @@ __xfrm_policy_eval_candidates(struct hlist_head *chain,
 		if (pol->priority > priority)
 			break;
 
-		err = xfrm_policy_match(pol, fl, type, family, dir, if_id);
+		err = xfrm_policy_match(pol, fl, type, family, if_id);
 		if (err) {
 			if (err != -ESRCH)
 				return ERR_PTR(err);
@@ -2053,7 +2053,7 @@ static struct xfrm_policy *
 xfrm_policy_eval_candidates(struct xfrm_pol_inexact_candidates *cand,
 			    struct xfrm_policy *prefer,
 			    const struct flowi *fl,
-			    u8 type, u16 family, int dir, u32 if_id)
+			    u8 type, u16 family, u32 if_id)
 {
 	struct xfrm_policy *tmp;
 	int i;
@@ -2061,8 +2061,7 @@ xfrm_policy_eval_candidates(struct xfrm_pol_inexact_candidates *cand,
 	for (i = 0; i < ARRAY_SIZE(cand->res); i++) {
 		tmp = __xfrm_policy_eval_candidates(cand->res[i],
 						    prefer,
-						    fl, type, family, dir,
-						    if_id);
+						    fl, type, family, if_id);
 		if (!tmp)
 			continue;
 
@@ -2101,7 +2100,7 @@ static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
 
 	ret = NULL;
 	hlist_for_each_entry_rcu(pol, chain, bydst) {
-		err = xfrm_policy_match(pol, fl, type, family, dir, if_id);
+		err = xfrm_policy_match(pol, fl, type, family, if_id);
 		if (err) {
 			if (err == -ESRCH)
 				continue;
@@ -2120,7 +2119,7 @@ static struct xfrm_policy *xfrm_policy_lookup_bytype(struct net *net, u8 type,
 		goto skip_inexact;
 
 	pol = xfrm_policy_eval_candidates(&cand, ret, fl, type,
-					  family, dir, if_id);
+					  family, if_id);
 	if (pol) {
 		ret = pol;
 		if (IS_ERR(pol))
-- 
2.25.1


  parent reply	other threads:[~2022-10-02  8:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-02  8:16 [PATCH 0/24] pull request (net-next): ipsec-next 2022-10-02 Steffen Klassert
2022-10-02  8:16 ` [PATCH 01/24] selftests/net: Refactor xfrm_fill_key() to use array of structs Steffen Klassert
2022-10-03  7:10   ` patchwork-bot+netdevbpf
2022-10-02  8:16 ` Steffen Klassert [this message]
2022-10-02  8:16 ` [PATCH 03/24] net: allow storing xfrm interface metadata in metadata_dst Steffen Klassert
2022-10-02  8:16 ` [PATCH 04/24] xfrm: interface: support collect metadata mode Steffen Klassert
2022-10-02  8:16 ` [PATCH 05/24] xfrm: lwtunnel: add lwtunnel support for xfrm interfaces in collect_md mode Steffen Klassert
2022-10-02  8:16 ` [PATCH 06/24] xfrm: propagate extack to all netlink doit handlers Steffen Klassert
2022-10-02  8:16 ` [PATCH 07/24] xfrm: add extack support to verify_newpolicy_info Steffen Klassert
2022-10-02  8:16 ` [PATCH 08/24] xfrm: add extack to verify_policy_dir Steffen Klassert
2022-10-02  8:16 ` [PATCH 09/24] xfrm: add extack to verify_policy_type Steffen Klassert
2022-10-02  8:16 ` [PATCH 10/24] xfrm: add extack to validate_tmpl Steffen Klassert
2022-10-02  8:16 ` [PATCH 11/24] xfrm: add extack to verify_sec_ctx_len Steffen Klassert
2022-10-02  8:17 ` [PATCH 12/24] xfrm: add extack support to verify_newsa_info Steffen Klassert
2022-10-02  8:17 ` [PATCH 13/24] xfrm: add extack to verify_replay Steffen Klassert
2022-10-02  8:17 ` [PATCH 14/24] xfrm: add extack to verify_one_alg, verify_auth_trunc, verify_aead Steffen Klassert
2022-10-02  8:17 ` [PATCH 15/24] xfrm: add extack support to xfrm_dev_state_add Steffen Klassert
2022-10-02  8:17 ` [PATCH 16/24] xfrm: add extack to attach_* Steffen Klassert
2022-10-02  8:17 ` [PATCH 17/24] xfrm: add extack to __xfrm_init_state Steffen Klassert
2022-10-02  8:17 ` [PATCH 18/24] xfrm: add extack support to xfrm_init_replay Steffen Klassert
2022-10-02  8:17 ` [PATCH 19/24] xfrm: pass extack down to xfrm_type ->init_state Steffen Klassert
2022-10-02  8:17 ` [PATCH 20/24] xfrm: ah: add extack to ah_init_state, ah6_init_state Steffen Klassert
2022-10-02  8:17 ` [PATCH 21/24] xfrm: esp: add extack to esp_init_state, esp6_init_state Steffen Klassert
2022-10-02  8:17 ` [PATCH 22/24] xfrm: tunnel: add extack to ipip_init_state, xfrm6_tunnel_init_state Steffen Klassert
2022-10-02  8:17 ` [PATCH 23/24] xfrm: ipcomp: add extack to ipcomp{4,6}_init_state Steffen Klassert
2022-10-02  8:17 ` [PATCH 24/24] xfrm: mip6: add extack to mip6_destopt_init_state, mip6_rthdr_init_state Steffen Klassert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221002081712.757515-3-steffen.klassert@secunet.com \
    --to=steffen.klassert@secunet.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.