All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roi Dayan <roid@nvidia.com>
To: <netdev@vger.kernel.org>
Cc: Paul Blakey <paulb@nvidia.com>, Roi Dayan <roid@nvidia.com>
Subject: [PATCH net-next 1/1] net/sched: act_ct: Remove redundant ct get and check
Date: Wed, 28 Apr 2021 09:05:32 +0300	[thread overview]
Message-ID: <20210428060532.3330974-1-roid@nvidia.com> (raw)

The assignment is not being used and redundant.
The check for null is redundant as nf_conntrack_put() also
checks this.

Signed-off-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Paul Blakey <paulb@nvidia.com>
---
 net/sched/act_ct.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/sched/act_ct.c b/net/sched/act_ct.c
index 16e888a9601d..65e9ffe6cf7d 100644
--- a/net/sched/act_ct.c
+++ b/net/sched/act_ct.c
@@ -990,9 +990,7 @@ static int tcf_ct_act(struct sk_buff *skb, const struct tc_action *a,
 
 		/* Associate skb with specified zone. */
 		if (tmpl) {
-			ct = nf_ct_get(skb, &ctinfo);
-			if (skb_nfct(skb))
-				nf_conntrack_put(skb_nfct(skb));
+			nf_conntrack_put(skb_nfct(skb));
 			nf_conntrack_get(&tmpl->ct_general);
 			nf_ct_set(skb, tmpl, IP_CT_NEW);
 		}
-- 
2.26.2


             reply	other threads:[~2021-04-28  6:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28  6:05 Roi Dayan [this message]
2021-04-28 21:10 ` [PATCH net-next 1/1] net/sched: act_ct: Remove redundant ct get and check patchwork-bot+netdevbpf

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=20210428060532.3330974-1-roid@nvidia.com \
    --to=roid@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulb@nvidia.com \
    /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.