linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabian Frederick <fabf@skynet.be>
To: linux-kernel@vger.kernel.org
Cc: Fabian Frederick <fabf@skynet.be>,
	Sumit Semwal <sumit.semwal@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-media@vger.kernel.org
Subject: [PATCH 1/1] drivers/base/dma-buf.c: replace dma_buf_uninit_debugfs by debugfs_remove_recursive
Date: Fri, 27 Jun 2014 22:32:10 +0200	[thread overview]
Message-ID: <1403901130-8156-1-git-send-email-fabf@skynet.be> (raw)

null test before debugfs_remove_recursive is not needed so one line function
dma_buf_uninit_debugfs can be removed.

This patch calls debugfs_remove_recursive under CONFIG_DEBUG_FS

Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---

This is untested.

 drivers/base/dma-buf.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c
index 840c7fa..184c0cb 100644
--- a/drivers/base/dma-buf.c
+++ b/drivers/base/dma-buf.c
@@ -701,12 +701,6 @@ static int dma_buf_init_debugfs(void)
 	return err;
 }
 
-static void dma_buf_uninit_debugfs(void)
-{
-	if (dma_buf_debugfs_dir)
-		debugfs_remove_recursive(dma_buf_debugfs_dir);
-}
-
 int dma_buf_debugfs_create_file(const char *name,
 				int (*write)(struct seq_file *))
 {
@@ -722,9 +716,6 @@ static inline int dma_buf_init_debugfs(void)
 {
 	return 0;
 }
-static inline void dma_buf_uninit_debugfs(void)
-{
-}
 #endif
 
 static int __init dma_buf_init(void)
@@ -738,6 +729,8 @@ subsys_initcall(dma_buf_init);
 
 static void __exit dma_buf_deinit(void)
 {
-	dma_buf_uninit_debugfs();
+#ifdef CONFIG_DEBUG_FS
+	debugfs_remove_recursive(dma_buf_debugfs_dir);
+#endif
 }
 __exitcall(dma_buf_deinit);
-- 
1.8.4.5


             reply	other threads:[~2014-06-27 20:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-27 20:32 Fabian Frederick [this message]
2014-07-10  0:34 ` [PATCH 1/1] drivers/base/dma-buf.c: replace dma_buf_uninit_debugfs by debugfs_remove_recursive Greg Kroah-Hartman
2014-07-12 12:26   ` Fabian Frederick

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=1403901130-8156-1-git-send-email-fabf@skynet.be \
    --to=fabf@skynet.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sumit.semwal@linaro.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: 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;
as well as URLs for NNTP newsgroup(s).