public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Xu Wang <vulab@iscas.ac.cn>
Cc: <sudeep.dutt@intel.com>, <gregkh@linuxfoundation.org>,
	<arnd@arndb.de>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mic: Remove unneeded NULL check
Date: Tue, 07 Jan 2020 18:58:13 -0800	[thread overview]
Message-ID: <87zheyu01m.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <1578391235-603-1-git-send-email-vulab@iscas.ac.cn>

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

On Tue, 07 Jan 2020 02:00:35 -0800, Xu Wang wrote:
>
> debugfs_remove_recursive will do NULL check, so remove
> the redundant null check.
>
> Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
> ---
>  drivers/misc/mic/card/mic_debugfs.c  | 3 ---
>  drivers/misc/mic/cosm/cosm_debugfs.c | 3 ---
>  drivers/misc/mic/host/mic_debugfs.c  | 3 ---
>  3 files changed, 9 deletions(-)
>
> diff --git a/drivers/misc/mic/card/mic_debugfs.c b/drivers/misc/mic/card/mic_debugfs.c
> index 3ee3d24..b586088 100644
> --- a/drivers/misc/mic/card/mic_debugfs.c
> +++ b/drivers/misc/mic/card/mic_debugfs.c
> @@ -65,9 +65,6 @@ void __init mic_create_card_debug_dir(struct mic_driver *mdrv)
>   */
>  void mic_delete_card_debug_dir(struct mic_driver *mdrv)
>  {
> -	if (!mdrv->dbg_dir)
> -		return;
> -
>	debugfs_remove_recursive(mdrv->dbg_dir);
>  }
>
> diff --git a/drivers/misc/mic/cosm/cosm_debugfs.c b/drivers/misc/mic/cosm/cosm_debugfs.c
> index 2fc9f4b..68a731f 100644
> --- a/drivers/misc/mic/cosm/cosm_debugfs.c
> +++ b/drivers/misc/mic/cosm/cosm_debugfs.c
> @@ -102,9 +102,6 @@ void cosm_create_debug_dir(struct cosm_device *cdev)
>
>  void cosm_delete_debug_dir(struct cosm_device *cdev)
>  {
> -	if (!cdev->dbg_dir)
> -		return;
> -
>	debugfs_remove_recursive(cdev->dbg_dir);
>  }
>
> diff --git a/drivers/misc/mic/host/mic_debugfs.c b/drivers/misc/mic/host/mic_debugfs.c
> index 8a8e416..ab0db7a 100644
> --- a/drivers/misc/mic/host/mic_debugfs.c
> +++ b/drivers/misc/mic/host/mic_debugfs.c
> @@ -129,9 +129,6 @@ void mic_create_debug_dir(struct mic_device *mdev)
>   */
>  void mic_delete_debug_dir(struct mic_device *mdev)
>  {
> -	if (!mdev->dbg_dir)
> -		return;
> -
>	debugfs_remove_recursive(mdev->dbg_dir);
>  }
>
> --
> 2.7.4
>

      reply	other threads:[~2020-01-08  2:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-07 10:00 [PATCH] mic: Remove unneeded NULL check Xu Wang
2020-01-08  2:58 ` Dixit, Ashutosh [this message]

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=87zheyu01m.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudeep.dutt@intel.com \
    --cc=vulab@iscas.ac.cn \
    /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