diff mbox series

[ovs-dev] datapath: stt: Remove unused if statement in function stt_cleanup().

Message ID 1536315664-12812-1-git-send-email-wangyunjian@huawei.com
State Accepted
Headers show
Series [ovs-dev] datapath: stt: Remove unused if statement in function stt_cleanup(). | expand

Commit Message

Yunjian Wang Sept. 7, 2018, 10:21 a.m. UTC
From: Yunjian Wang <wangyunjian@huawei.com>

Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
---
 datapath/linux/compat/stt.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Gregory Rose Sept. 7, 2018, 4:40 p.m. UTC | #1
On 9/7/2018 3:21 AM, wangyunjian wrote:
> From: Yunjian Wang <wangyunjian@huawei.com>
>
> Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> ---
>   datapath/linux/compat/stt.c | 3 ---
>   1 file changed, 3 deletions(-)
>
> diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c
> index 8d16c1f..506f1d9 100644
> --- a/datapath/linux/compat/stt.c
> +++ b/datapath/linux/compat/stt.c
> @@ -1706,9 +1706,6 @@ static void stt_cleanup(struct net *net)
>   	int i;
>   
>   	sn->n_tunnels--;
> -	if (sn->n_tunnels)
> -		goto out;
> -out:
>   	n_tunnels--;
>   	if (n_tunnels)
>   		return;

It's always nice to snip out some dead code.  LGTM.

Reviewed-by:  Greg Rose <gvrose8192@gmail.com>
Ben Pfaff Sept. 7, 2018, 4:53 p.m. UTC | #2
On Fri, Sep 07, 2018 at 09:40:30AM -0700, Gregory Rose wrote:
> On 9/7/2018 3:21 AM, wangyunjian wrote:
> >From: Yunjian Wang <wangyunjian@huawei.com>
> >
> >Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
> >---
> >  datapath/linux/compat/stt.c | 3 ---
> >  1 file changed, 3 deletions(-)
> >
> >diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c
> >index 8d16c1f..506f1d9 100644
> >--- a/datapath/linux/compat/stt.c
> >+++ b/datapath/linux/compat/stt.c
> >@@ -1706,9 +1706,6 @@ static void stt_cleanup(struct net *net)
> >  	int i;
> >  	sn->n_tunnels--;
> >-	if (sn->n_tunnels)
> >-		goto out;
> >-out:
> >  	n_tunnels--;
> >  	if (n_tunnels)
> >  		return;
> 
> It's always nice to snip out some dead code.  LGTM.
> 
> Reviewed-by:  Greg Rose <gvrose8192@gmail.com>

Applied to master, thanks wangyunjian and Greg!
diff mbox series

Patch

diff --git a/datapath/linux/compat/stt.c b/datapath/linux/compat/stt.c
index 8d16c1f..506f1d9 100644
--- a/datapath/linux/compat/stt.c
+++ b/datapath/linux/compat/stt.c
@@ -1706,9 +1706,6 @@  static void stt_cleanup(struct net *net)
 	int i;
 
 	sn->n_tunnels--;
-	if (sn->n_tunnels)
-		goto out;
-out:
 	n_tunnels--;
 	if (n_tunnels)
 		return;