Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp267348ybl; Tue, 7 Jan 2020 18:59:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxlA3AZ7vpnboIeIZ0XP6US6ujx5D0sJasnS2hAkM40H3Ukk+Gf4ZE40N62wvDXvNxYfu0u X-Received: by 2002:aca:f1c6:: with SMTP id p189mr1380236oih.159.1578452356621; Tue, 07 Jan 2020 18:59:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578452356; cv=none; d=google.com; s=arc-20160816; b=YT8ba8QxRogrjt5hR09V9tzExrxkgpc/mx+Is2PTfcmflnjuuUfVHUzSZFizREZVxw /yy4qoUDhEfHLlPql31xDy28GfqdzcKNiomVpIhgX+i9vUKrluXXCaHLwsd5t1tvrSCR YZp5y7hGpS0d5tnK11quzbpCseeoEdqmsjf+6cUYExkRZjYx3KZmO0nso3lvcTl2k0qc wzracYVERoGF1JGv7m0e12FsNcF/4u/zKgzyiWMpGYwyoMLprdDiep4WNc52E7tL/XxY 1/NFAuRJd0aNGfn7gXRjFkFF0bHBX0RAU3xPFai3VMGakyk8nmOWQ2nfQ84zI/ZVWdzP K/Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:subject:cc:to:from:message-id:date; bh=JCVB0AEwMpXawlUAXtyZZr5kZDBWc5HbQ5xrOdm9R6g=; b=sprWnsSGTPyXGPISp6oeAqbM/p9Ai8AEya8ACc/1+7BMPhawo9pMyCBKWG8UKldiIB sadq7pNK963+g/VwLkYZvbwaFze6te4qo7FU1OxA+MoQyDpiKEJ1a65E/rcM1RkvbEjg VvWz7bX3HEKXXM8KRTI6WA/tg2DJ3XLEV157pkfjRrSiWh7wI9ZHx4FxeUt+OVOo4sbk 3t5NTQrPgztDkJs2fdpxtZgZE75rYNrtMMs4qtgz83qeP9vY3vTRUoVWcMq+gPprbTdp sxt2YpQYMfyvKpS0L9JCAjwLWXOCXlg4tAcUzTRUtpuTEgcjcePQCkJl/5CupwHesoPZ FC7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j9si1037330oii.195.2020.01.07.18.59.03; Tue, 07 Jan 2020 18:59:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726313AbgAHC6P (ORCPT + 99 others); Tue, 7 Jan 2020 21:58:15 -0500 Received: from mga02.intel.com ([134.134.136.20]:28679 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725812AbgAHC6P (ORCPT ); Tue, 7 Jan 2020 21:58:15 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jan 2020 18:58:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,408,1571727600"; d="scan'208";a="271711507" Received: from njagann1-mobl.amr.corp.intel.com (HELO adixit-arch.intel.com) ([10.254.67.66]) by FMSMGA003.fm.intel.com with ESMTP; 07 Jan 2020 18:58:14 -0800 Date: Tue, 07 Jan 2020 18:58:13 -0800 Message-ID: <87zheyu01m.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" To: Xu Wang CC: , , , Subject: Re: [PATCH] mic: Remove unneeded NULL check In-Reply-To: <1578391235-603-1-git-send-email-vulab@iscas.ac.cn> References: <1578391235-603-1-git-send-email-vulab@iscas.ac.cn> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 EasyPG/1.0.0 Emacs/26 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Reviewed-by: Ashutosh Dixit 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 > --- > 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 >