diff mbox series

[net-next,1/1] net/sched: act_ct: Remove redundant ct get and check

Message ID 20210428060532.3330974-1-roid@nvidia.com (mailing list archive)
State Accepted
Commit 9be02dd3858137f7bf83320568279eeda59faf01
Delegated to: Netdev Maintainers
Headers show
Series [net-next,1/1] net/sched: act_ct: Remove redundant ct get and check | expand

Checks

Context Check Description
netdev/cover_letter success Link
netdev/fixes_present success Link
netdev/patch_count success Link
netdev/tree_selection success Clearly marked for net-next
netdev/subject_prefix success Link
netdev/cc_maintainers fail 5 maintainers not CCed: jiri@resnulli.us jhs@mojatatu.com xiyou.wangcong@gmail.com davem@davemloft.net kuba@kernel.org
netdev/source_inline success Was 0 now: 0
netdev/verify_signedoff success Link
netdev/module_param success Was 0 now: 0
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/verify_fixes success Link
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/header_inline success Link

Commit Message

Roi Dayan April 28, 2021, 6:05 a.m. UTC
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(-)

Comments

patchwork-bot+netdevbpf@kernel.org April 28, 2021, 9:10 p.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed, 28 Apr 2021 09:05:32 +0300 you wrote:
> 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>
> 
> [...]

Here is the summary with links:
  - [net-next,1/1] net/sched: act_ct: Remove redundant ct get and check
    https://git.kernel.org/netdev/net-next/c/9be02dd38581

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
diff mbox series

Patch

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);
 		}