mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zeng Tao <prime.zeng@hisilicon.com>
To: <pshelar@ovn.org>, <davem@davemloft.net>
Cc: Zeng Tao <prime.zeng@hisilicon.com>,
	Jakub Kicinski <kuba@kernel.org>, <netdev@vger.kernel.org>,
	<dev@openvswitch.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] net: openswitch: reuse the helper variable to improve the code readablity
Date: Fri, 18 Sep 2020 15:14:30 +0800	[thread overview]
Message-ID: <1600413270-38398-1-git-send-email-prime.zeng@hisilicon.com> (raw)

In the function ovs_ct_limit_exit, there is already a helper vaibale
which could be reused to improve the readability, so i fix it in this
patch.

Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
---
 net/openvswitch/conntrack.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/openvswitch/conntrack.c b/net/openvswitch/conntrack.c
index a3f1204..e86b960 100644
--- a/net/openvswitch/conntrack.c
+++ b/net/openvswitch/conntrack.c
@@ -1901,8 +1901,8 @@ static void ovs_ct_limit_exit(struct net *net, struct ovs_net *ovs_net)
 					 lockdep_ovsl_is_held())
 			kfree_rcu(ct_limit, rcu);
 	}
-	kfree(ovs_net->ct_limit_info->limits);
-	kfree(ovs_net->ct_limit_info);
+	kfree(info->limits);
+	kfree(info);
 }
 
 static struct sk_buff *
-- 
2.8.1


             reply	other threads:[~2020-09-18  7:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18  7:14 Zeng Tao [this message]
2020-09-18 21:24 ` David Miller

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=1600413270-38398-1-git-send-email-prime.zeng@hisilicon.com \
    --to=prime.zeng@hisilicon.com \
    --cc=davem@davemloft.net \
    --cc=dev@openvswitch.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@ovn.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®