Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5940478ybi; Wed, 12 Jun 2019 11:04:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzqCjKHlvTKRWu29zKv5hMPBaE0IbOMIoQ8taqj7fSq1I8XjeAUfmdcCXXWOZA40zQK1xnt X-Received: by 2002:a17:902:20ec:: with SMTP id v41mr3290021plg.142.1560362683001; Wed, 12 Jun 2019 11:04:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560362682; cv=none; d=google.com; s=arc-20160816; b=THnK1dWjgbJN/m9LvQEbv+tMMNSyC8YBT76WUkti9WaUYmzzptSeMmDzEN7oiLwGDu MWJ/HFWZBv0ZNm2qDfBNsMtndPckuKGATIsq3pHn2js+6tmNXLieUQM817vqhNoHIRTg mPNBCN4nPn62YZOx5sDMvPNFK1dkLK2RjGCzUL4lCh9UiJYfObYGA0NPn0d1fXNIkz8G kuP8QmjVoQsRwg4DqndOneAMuCKiJdMP4zZhdLhLHDsojdcLPe0LiH7MYi7Bvh2cozVz gRiNlcYvarWtVQnSO4vTAE8563oJL2tVghgPKA2sKChb4B9JB5gYMSgW86VRzxnBDu6Q ed0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id; bh=7YjUmTOgDsCbbKiZxAxNxt4TQv0Z20HLpnYH3AGqWr0=; b=tTi2oNRbDrMxZCB3twqAL4LmU1PLBnrZRKKrCQ5UrjaO7/f30vuFoI83ZjiJXyGleF S2Sd2SO6ennwHu+fYqsHKZ6bIUj8S4APUCEmiYDVxe5Zjg1OrRs4M+mU0yXYe+Jueq9B 8SYCD3b/YwY/BSYPdCKhHSu/eVhfGVpvIYT74x+lfI5sU1PgI6Of2r8ThBg+ohV1pYnn mTkNKBRYBPBXPwyHAymOFVtlPKXv1B8O8mGmCTEmJgTF6WLQYKvWFn2PXYG8kP++OAUh KSXlrsmTFKt03soPnbtIrrIY1su7h3SL2Ntd4mHKLdv7FTF94zY0ASPuH1ImcL1jpAa1 KfJg== 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 q17si403300pgm.479.2019.06.12.11.04.27; Wed, 12 Jun 2019 11:04:42 -0700 (PDT) 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 S2437892AbfFLPSZ (ORCPT + 99 others); Wed, 12 Jun 2019 11:18:25 -0400 Received: from mga12.intel.com ([192.55.52.136]:5808 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407138AbfFLPSZ (ORCPT ); Wed, 12 Jun 2019 11:18:25 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Jun 2019 08:18:24 -0700 X-ExtLoop1: 1 Received: from unknown (HELO localhost.localdomain) ([10.10.37.186]) by orsmga003.jf.intel.com with ESMTP; 12 Jun 2019 08:18:24 -0700 Message-ID: <1560354254.22001.3.camel@intel.com> Subject: Re: [PATCH 5/6] dma: mic_x100_dma: no need to check return value of debugfs_create functions From: Sudeep Dutt To: Greg Kroah-Hartman Cc: Sudeep Dutt , dan.j.williams@intel.com, vkoul@kernel.org, Ashutosh Dixit , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 12 Jun 2019 08:44:14 -0700 In-Reply-To: <20190612122557.24158-5-gregkh@linuxfoundation.org> References: <20190612122557.24158-1-gregkh@linuxfoundation.org> <20190612122557.24158-5-gregkh@linuxfoundation.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.11 (3.12.11-15.el7) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-06-12 at 14:25 +0200, Greg Kroah-Hartman wrote: > When calling debugfs functions, there is no need to ever check the > return value. The function can work or not, but the code logic should > never do something different based on this. > Thanks Greg. Reviewed-by: Sudeep Dutt > Cc: Sudeep Dutt > Cc: Ashutosh Dixit > Cc: Dan Williams > Cc: Vinod Koul > Cc: dmaengine@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Greg Kroah-Hartman > --- > drivers/dma/mic_x100_dma.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c > index 6a91e28d537d..584e09661507 100644 > --- a/drivers/dma/mic_x100_dma.c > +++ b/drivers/dma/mic_x100_dma.c > @@ -728,10 +728,8 @@ static int mic_dma_driver_probe(struct mbus_device *mbdev) > if (mic_dma_dbg) { > mic_dma_dev->dbg_dir = debugfs_create_dir(dev_name(&mbdev->dev), > mic_dma_dbg); > - if (mic_dma_dev->dbg_dir) > - debugfs_create_file("mic_dma_reg", 0444, > - mic_dma_dev->dbg_dir, mic_dma_dev, > - &mic_dma_reg_fops); > + debugfs_create_file("mic_dma_reg", 0444, mic_dma_dev->dbg_dir, > + mic_dma_dev, &mic_dma_reg_fops); > } > return 0; > }