From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: Sinan Kaya <Okaya@kernel.org> Cc: dan.j.williams@intel.com, vkoul@kernel.org, Andy Gross <agross@kernel.org>, David Brown <david.brown@linaro.org>, 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 Date: Wed, 12 Jun 2019 18:47:09 +0200 [thread overview] Message-ID: <20190612164709.GA31124@kroah.com> (raw) In-Reply-To: <78da53a1-1363-fad8-16fa-4dfc6555f4e4@kernel.org> On Wed, Jun 12, 2019 at 12:17:31PM -0400, Sinan Kaya wrote: > On 6/12/2019 11:39 AM, Greg Kroah-Hartman wrote: > >> 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. > > I see. > > > > >> + 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? > > I just wanted to double check. You probably want to remove the return > value on debugfs_create_file() to prevent others from doing the same > thing. That is my long-term goal, I have a ways to go still :) > Acked-by: Sinan Kaya <okaya@kernel.org> Great, thanks for the review. greg k-h
WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: Sinan Kaya <Okaya@kernel.org> Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, David Brown <david.brown@linaro.org>, vkoul@kernel.org, Andy Gross <agross@kernel.org>, dmaengine@vger.kernel.org, dan.j.williams@intel.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 6/6] dma: qcom: hidma: no need to check return value of debugfs_create functions Date: Wed, 12 Jun 2019 18:47:09 +0200 [thread overview] Message-ID: <20190612164709.GA31124@kroah.com> (raw) In-Reply-To: <78da53a1-1363-fad8-16fa-4dfc6555f4e4@kernel.org> On Wed, Jun 12, 2019 at 12:17:31PM -0400, Sinan Kaya wrote: > On 6/12/2019 11:39 AM, Greg Kroah-Hartman wrote: > >> 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. > > I see. > > > > >> + 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? > > I just wanted to double check. You probably want to remove the return > value on debugfs_create_file() to prevent others from doing the same > thing. That is my long-term goal, I have a ways to go still :) > Acked-by: Sinan Kaya <okaya@kernel.org> Great, thanks for the review. greg k-h _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-06-12 16:47 UTC|newest] Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-06-12 12:25 [PATCH 1/6] dma: amba-pl08x: no need to cast away call to debugfs_create_file() Greg Kroah-Hartman 2019-06-12 12:25 ` [PATCH 2/6] dma: bcm-sba-raid: no need to check return value of debugfs_create functions Greg Kroah-Hartman 2019-06-12 12:25 ` [PATCH 3/6] dma: coh901318: no need to cast away call to debugfs_create_file() Greg Kroah-Hartman 2019-06-12 12:25 ` Greg Kroah-Hartman 2019-06-12 12:42 ` Linus Walleij 2019-06-12 12:42 ` Linus Walleij 2019-06-12 12:25 ` [PATCH 4/6] dma: pxa_dma: no need to check return value of debugfs_create functions Greg Kroah-Hartman 2019-06-12 12:25 ` Greg Kroah-Hartman 2019-08-10 19:27 ` Robert Jarzmik 2019-08-10 19:27 ` Robert Jarzmik 2019-08-11 7:03 ` Greg Kroah-Hartman 2019-08-11 7:03 ` Greg Kroah-Hartman 2019-08-13 21:21 ` Robert Jarzmik 2019-08-13 21:21 ` Robert Jarzmik 2019-06-12 12:25 ` [PATCH 5/6] dma: mic_x100_dma: " Greg Kroah-Hartman 2019-06-12 15:44 ` Sudeep Dutt 2019-06-12 12:25 ` [PATCH 6/6] dma: qcom: hidma: " Greg Kroah-Hartman 2019-06-12 12:25 ` Greg Kroah-Hartman 2019-06-12 15:24 ` Sinan Kaya 2019-06-12 15:24 ` Sinan Kaya 2019-06-12 15:39 ` Greg Kroah-Hartman 2019-06-12 15:39 ` Greg Kroah-Hartman 2019-06-12 16:17 ` Sinan Kaya 2019-06-12 16:17 ` Sinan Kaya 2019-06-12 16:47 ` Greg Kroah-Hartman [this message] 2019-06-12 16:47 ` Greg Kroah-Hartman 2019-06-14 5:46 ` [PATCH 1/6] dma: amba-pl08x: no need to cast away call to debugfs_create_file() Vinod Koul 2019-06-14 5:55 ` Greg Kroah-Hartman 2019-06-18 16:00 ` Greg Kroah-Hartman
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=20190612164709.GA31124@kroah.com \ --to=gregkh@linuxfoundation.org \ --cc=Okaya@kernel.org \ --cc=agross@kernel.org \ --cc=dan.j.williams@intel.com \ --cc=david.brown@linaro.org \ --cc=dmaengine@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-arm-msm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=vkoul@kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.