From: Paul Durrant <Paul.Durrant@citrix.com>
To: 'zhong jiang' <zhongjiang@huawei.com>,
"davem@davemloft.net" <davem@davemloft.net>,
Wei Liu <wei.liu2@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [PATCH] net: xenbus: remove redundant condition check before debugfs_remove_recursive
Date: Tue, 11 Sep 2018 08:01:50 +0000 [thread overview]
Message-ID: <a2da243c370c4447bd5d0fcc9c2a6fdf@AMSPEX02CL03.citrite.net> (raw)
In-Reply-To: <1536413706-31838-1-git-send-email-zhongjiang@huawei.com>
> -----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
next prev parent reply other threads:[~2018-09-11 12:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2018-09-12 6:01 ` 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=a2da243c370c4447bd5d0fcc9c2a6fdf@AMSPEX02CL03.citrite.net \
--to=paul.durrant@citrix.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
--cc=zhongjiang@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).