Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5942280ybi; Wed, 12 Jun 2019 11:06:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzVugWXRwA/9IkefA7JsYAIdjeoXcVawSkV0wasdxOLMO32ngRWAeySJpKtpNt+Tzj25rjs X-Received: by 2002:a17:902:9897:: with SMTP id s23mr15912464plp.47.1560362784986; Wed, 12 Jun 2019 11:06:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560362784; cv=none; d=google.com; s=arc-20160816; b=V1g/SAa3tkkD6k2yUpMQNVBghyKxocG8hfFTRCOhucokGsLJw7DfJQtqYO99+nTSWk ezlEXi9edqO/NfHjJ3rk9EYawhJ+KAQtvLU/N8aJDlwvwVKd3lKR3hUL2AsEpIZj8nzL qsouPI1pydD5N+ovbNoLVierL9lAlyzIcZ8FXjQCKyb4YLD77XzX6o2YE/el947LJwuv R0v1bWSIgzw8wa9VH2fYcANconlI2NMydp8L36rc83D3Aho8gqgndJF7OXR8tSz3IwdF ZhiU8H7GA/A0ixetYp0YPTrEh0asR+JloC3OavRE0676j/jnFsd7do2NEI8d1CyF0TI5 5Qtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4JUgMlKSiPVm7TYqopynwQ5exXpa7akntwwYXwPfRms=; b=krSB5xH3OKVTbOHi2s9oZKtK/ySUmyAhMqjVSFa4OyYeFdlS9Pxsnamxpk1Tnx4Dfp KYOO4aOjQZiMF2M3JijAJ1d7bGho5sIsHMvo41zrPR6Kuj13fIgI23UCO/P1ML+tXGTo 4ZKPx/1gENKfsIBIyBQ3al3rJ7toeSqUTxGBtzovMY6MWuTGS/cwF7fSEup6FneOc/Tb ZCxWhSvjeFUogD5n3OKeHxFONxZi0+uoFu/AxImpBf/N3+3Ay8JHb+NVcMr4sFe67trj OUUbfQKP87edMWOFEC9RpVXQlHOM+FV9JlZagYU/gj4V9zGJ7Kn/fk4Im+d1cW5vZSZz MM+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zlvoertn; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 71si334630plf.156.2019.06.12.11.06.10; Wed, 12 Jun 2019 11:06:24 -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; dkim=pass header.i=@kernel.org header.s=default header.b=zlvoertn; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440077AbfFLPjv (ORCPT + 99 others); Wed, 12 Jun 2019 11:39:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:45092 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437271AbfFLPjv (ORCPT ); Wed, 12 Jun 2019 11:39:51 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 58D57215EA; Wed, 12 Jun 2019 15:39:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1560353990; bh=OkfQa1r9r/eRE11QXleOQyWPtTdH6obHCWv126tLNpI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=zlvoertnbkBTJMrAQfpkuh2QUBkBmhHgwKxKMhzLzXwM1MFXI3mAFWEQJlG02ywhQ CGL8w3YRyJNYeegaLLxeksnCagXvjwVsVqHWh7TqF8ULWUp0lu+RlFIlkzun6WZglX X/MI3qM2/MPsz8hyqx1V2TeFrrlpsp/ZLRfpytbo= Date: Wed, 12 Jun 2019 17:39:48 +0200 From: Greg Kroah-Hartman To: Sinan Kaya Cc: dan.j.williams@intel.com, vkoul@kernel.org, Andy Gross , David Brown , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 6/6] dma: qcom: hidma: no need to check return value of debugfs_create functions Message-ID: <20190612153948.GA21828@kroah.com> References: <20190612122557.24158-1-gregkh@linuxfoundation.org> <20190612122557.24158-6-gregkh@linuxfoundation.org> <8185a8b8-a0ce-4a86-84a2-b51391356052@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8185a8b8-a0ce-4a86-84a2-b51391356052@kernel.org> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 12, 2019 at 11:24:51AM -0400, Sinan Kaya wrote: > On 6/12/2019 8:25 AM, 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. > > > > Also, because there is no need to save the file dentry, remove the > > variables that were saving them as they were never even being used once > > set. > > > > Cc: Sinan Kaya > > Cc: Andy Gross > > Cc: David Brown > > Cc: Dan Williams > > Cc: Vinod Koul > > Cc: linux-arm-kernel@lists.infradead.org > > Cc: linux-arm-msm@vger.kernel.org > > Cc: dmaengine@vger.kernel.org > > Cc: linux-kernel@vger.kernel.org > > Signed-off-by: Greg Kroah-Hartman > > Interesting. Wouldn't debugfs_create_file() blow up if dir is NULL > for some reason? It will create a file in the root of debugfs. But how will that happen? debugfs_create_dir() can not return NULL. > + debugfs_create_file("stats", S_IRUGO, dir, chan, > + &hidma_chan_fops); > > Note that code ignores the return value of hidma_debug_init(); > It was just trying to do clean up on debugfs failure by calling > > debugfs_remove_recursive(dmadev->debugfs); Is that a problem? thanks, greg k-h