All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: xenbus: remove redundant condition check before debugfs_remove_recursive
@ 2018-09-08 13:35 zhong jiang
  2018-09-11  8:01 ` Paul Durrant
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: zhong jiang @ 2018-09-08 13:35 UTC (permalink / raw)
  To: davem, paul.durrant, wei.liu2; +Cc: xen-devel, netdev

debugfs_remove_recursive has taken the IS_ERR_OR_NULL into account. Just
remove the unnecessary condition check.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/net/xen-netback/xenbus.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index cd51492..fe1d522 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -254,8 +254,7 @@ static void xenvif_debugfs_delif(struct xenvif *vif)
 	if (IS_ERR_OR_NULL(xen_netback_dbg_root))
 		return;
 
-	if (!IS_ERR_OR_NULL(vif->xenvif_dbg_root))
-		debugfs_remove_recursive(vif->xenvif_dbg_root);
+	debugfs_remove_recursive(vif->xenvif_dbg_root);
 	vif->xenvif_dbg_root = NULL;
 }
 #endif /* CONFIG_DEBUG_FS */
-- 
1.7.12.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH] net: xenbus: remove redundant condition check before debugfs_remove_recursive
  2018-09-08 13:35 [PATCH] net: xenbus: remove redundant condition check before debugfs_remove_recursive zhong jiang
  2018-09-11  8:01 ` Paul Durrant
@ 2018-09-11  8:01 ` Paul Durrant
  2018-09-12  6:01 ` David Miller
  2018-09-12  6:01 ` David Miller
  3 siblings, 0 replies; 6+ messages in thread
From: Paul Durrant @ 2018-09-11  8:01 UTC (permalink / raw)
  To: 'zhong jiang', davem, Wei Liu; +Cc: xen-devel, netdev

> -----Original Message-----
> From: zhong jiang [mailto:zhongjiang@huawei.com]
> Sent: 08 September 2018 14:35
> To: davem@davemloft.net; Paul Durrant <Paul.Durrant@citrix.com>; Wei Liu
> <wei.liu2@citrix.com>
> Cc: xen-devel@lists.xenproject.org; netdev@vger.kernel.org
> Subject: [PATCH] net: xenbus: remove redundant condition check before
> debugfs_remove_recursive
> 
> debugfs_remove_recursive has taken the IS_ERR_OR_NULL into account.
> Just
> remove the unnecessary condition check.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Reviewed-by: Paul Durrant <paul.durrant@citrix.com>

> ---
>  drivers/net/xen-netback/xenbus.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-
> netback/xenbus.c
> index cd51492..fe1d522 100644
> --- a/drivers/net/xen-netback/xenbus.c
> +++ b/drivers/net/xen-netback/xenbus.c
> @@ -254,8 +254,7 @@ static void xenvif_debugfs_delif(struct xenvif *vif)
>  	if (IS_ERR_OR_NULL(xen_netback_dbg_root))
>  		return;
> 
> -	if (!IS_ERR_OR_NULL(vif->xenvif_dbg_root))
> -		debugfs_remove_recursive(vif->xenvif_dbg_root);
> +	debugfs_remove_recursive(vif->xenvif_dbg_root);
>  	vif->xenvif_dbg_root = NULL;
>  }
>  #endif /* CONFIG_DEBUG_FS */
> --
> 1.7.12.4

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: xenbus: remove redundant condition check before debugfs_remove_recursive
  2018-09-08 13:35 [PATCH] net: xenbus: remove redundant condition check before debugfs_remove_recursive zhong jiang
@ 2018-09-11  8:01 ` Paul Durrant
  2018-09-11  8:01 ` Paul Durrant
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Paul Durrant @ 2018-09-11  8:01 UTC (permalink / raw)
  To: 'zhong jiang', davem, Wei Liu; +Cc: xen-devel, netdev

> -----Original Message-----
> From: zhong jiang [mailto:zhongjiang@huawei.com]
> Sent: 08 September 2018 14:35
> To: davem@davemloft.net; Paul Durrant <Paul.Durrant@citrix.com>; Wei Liu
> <wei.liu2@citrix.com>
> Cc: xen-devel@lists.xenproject.org; netdev@vger.kernel.org
> Subject: [PATCH] net: xenbus: remove redundant condition check before
> debugfs_remove_recursive
> 
> debugfs_remove_recursive has taken the IS_ERR_OR_NULL into account.
> Just
> remove the unnecessary condition check.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Reviewed-by: Paul Durrant <paul.durrant@citrix.com>

> ---
>  drivers/net/xen-netback/xenbus.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-
> netback/xenbus.c
> index cd51492..fe1d522 100644
> --- a/drivers/net/xen-netback/xenbus.c
> +++ b/drivers/net/xen-netback/xenbus.c
> @@ -254,8 +254,7 @@ static void xenvif_debugfs_delif(struct xenvif *vif)
>  	if (IS_ERR_OR_NULL(xen_netback_dbg_root))
>  		return;
> 
> -	if (!IS_ERR_OR_NULL(vif->xenvif_dbg_root))
> -		debugfs_remove_recursive(vif->xenvif_dbg_root);
> +	debugfs_remove_recursive(vif->xenvif_dbg_root);
>  	vif->xenvif_dbg_root = NULL;
>  }
>  #endif /* CONFIG_DEBUG_FS */
> --
> 1.7.12.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: xenbus: remove redundant condition check before debugfs_remove_recursive
  2018-09-08 13:35 [PATCH] net: xenbus: remove redundant condition check before debugfs_remove_recursive zhong jiang
  2018-09-11  8:01 ` Paul Durrant
  2018-09-11  8:01 ` Paul Durrant
@ 2018-09-12  6:01 ` David Miller
  2018-09-12  6:01 ` David Miller
  3 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-09-12  6:01 UTC (permalink / raw)
  To: zhongjiang; +Cc: paul.durrant, wei.liu2, xen-devel, netdev

From: zhong jiang <zhongjiang@huawei.com>
Date: Sat, 8 Sep 2018 21:35:06 +0800

> debugfs_remove_recursive has taken the IS_ERR_OR_NULL into account. Just
> remove the unnecessary condition check.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Applied to net-next.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] net: xenbus: remove redundant condition check before debugfs_remove_recursive
  2018-09-08 13:35 [PATCH] net: xenbus: remove redundant condition check before debugfs_remove_recursive zhong jiang
                   ` (2 preceding siblings ...)
  2018-09-12  6:01 ` David Miller
@ 2018-09-12  6:01 ` David Miller
  3 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-09-12  6:01 UTC (permalink / raw)
  To: zhongjiang; +Cc: xen-devel, paul.durrant, wei.liu2, netdev

From: zhong jiang <zhongjiang@huawei.com>
Date: Sat, 8 Sep 2018 21:35:06 +0800

> debugfs_remove_recursive has taken the IS_ERR_OR_NULL into account. Just
> remove the unnecessary condition check.
> 
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>

Applied to net-next.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] net: xenbus: remove redundant condition check before debugfs_remove_recursive
@ 2018-09-08 13:35 zhong jiang
  0 siblings, 0 replies; 6+ messages in thread
From: zhong jiang @ 2018-09-08 13:35 UTC (permalink / raw)
  To: davem, paul.durrant, wei.liu2; +Cc: xen-devel, netdev

debugfs_remove_recursive has taken the IS_ERR_OR_NULL into account. Just
remove the unnecessary condition check.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
---
 drivers/net/xen-netback/xenbus.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/xen-netback/xenbus.c b/drivers/net/xen-netback/xenbus.c
index cd51492..fe1d522 100644
--- a/drivers/net/xen-netback/xenbus.c
+++ b/drivers/net/xen-netback/xenbus.c
@@ -254,8 +254,7 @@ static void xenvif_debugfs_delif(struct xenvif *vif)
 	if (IS_ERR_OR_NULL(xen_netback_dbg_root))
 		return;
 
-	if (!IS_ERR_OR_NULL(vif->xenvif_dbg_root))
-		debugfs_remove_recursive(vif->xenvif_dbg_root);
+	debugfs_remove_recursive(vif->xenvif_dbg_root);
 	vif->xenvif_dbg_root = NULL;
 }
 #endif /* CONFIG_DEBUG_FS */
-- 
1.7.12.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-09-12 11:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-08 13:35 [PATCH] net: xenbus: remove redundant condition check before debugfs_remove_recursive zhong jiang
2018-09-11  8:01 ` Paul Durrant
2018-09-11  8:01 ` Paul Durrant
2018-09-12  6:01 ` David Miller
2018-09-12  6:01 ` David Miller
2018-09-08 13:35 zhong jiang

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.