mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] debugfs: document that debugfs_remove*() accepts NULL and error values
@ 2015-09-07 17:03 ulfalizer.lkml
  0 siblings, 0 replies; 2+ messages in thread
From: ulfalizer.lkml @ 2015-09-07 17:03 UTC (permalink / raw)
  To: corbet; +Cc: gregkh, shane.seymour, ulfalizer, linux-doc, linux-kernel

From: Ulf Magnusson <ulfalizer@gmail.com>

According to commit a59d6293e537 ("debugfs: change parameter check in
debugfs_remove() functions"), this is meant to make cleanup easier for
callers. In that case it ought to be documented.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
---
 fs/debugfs/inode.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index c711be8..5d8f35f 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -533,7 +533,8 @@ static int __debugfs_remove(struct dentry *dentry, struct dentry *parent)
 /**
  * debugfs_remove - removes a file or directory from the debugfs filesystem
  * @dentry: a pointer to a the dentry of the file or directory to be
- *          removed.
+ *          removed.  If this parameter is NULL or an error value, nothing
+ *          will be done.
  *
  * This function removes a file or directory in debugfs that was previously
  * created with a call to another debugfs function (like
@@ -565,7 +566,8 @@ EXPORT_SYMBOL_GPL(debugfs_remove);
 
 /**
  * debugfs_remove_recursive - recursively removes a directory
- * @dentry: a pointer to a the dentry of the directory to be removed.
+ * @dentry: a pointer to a the dentry of the directory to be removed.  If this
+ *          parameter is NULL or an error value, nothing will be done.
  *
  * This function recursively removes a directory tree in debugfs that
  * was previously created with a call to another debugfs function
-- 
2.1.4


^ permalink raw reply	[flat|nested] 2+ messages in thread
* [PATCH] debugfs: document that debugfs_remove*() accepts NULL and error values
@ 2015-09-03 23:54 ulfalizer.lkml
  0 siblings, 0 replies; 2+ messages in thread
From: ulfalizer.lkml @ 2015-09-03 23:54 UTC (permalink / raw)
  To: linux-kernel; +Cc: gregkh, ulfalizer, trivial

From: Ulf Magnusson <ulfalizer@gmail.com>

According to commit a59d6293e537 ("debugfs: change parameter check in
debugfs_remove() functions"), this is meant to make cleanup easier for
callers. In that case it ought to be documented.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
---
 fs/debugfs/inode.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index c711be8..5d8f35f 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -533,7 +533,8 @@ static int __debugfs_remove(struct dentry *dentry, struct dentry *parent)
 /**
  * debugfs_remove - removes a file or directory from the debugfs filesystem
  * @dentry: a pointer to a the dentry of the file or directory to be
- *          removed.
+ *          removed.  If this parameter is NULL or an error value, nothing
+ *          will be done.
  *
  * This function removes a file or directory in debugfs that was previously
  * created with a call to another debugfs function (like
@@ -565,7 +566,8 @@ EXPORT_SYMBOL_GPL(debugfs_remove);
 
 /**
  * debugfs_remove_recursive - recursively removes a directory
- * @dentry: a pointer to a the dentry of the directory to be removed.
+ * @dentry: a pointer to a the dentry of the directory to be removed.  If this
+ *          parameter is NULL or an error value, nothing will be done.
  *
  * This function recursively removes a directory tree in debugfs that
  * was previously created with a call to another debugfs function
-- 
2.1.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-07 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-07 17:03 [PATCH] debugfs: document that debugfs_remove*() accepts NULL and error values ulfalizer.lkml
  -- strict thread matches above, loose matches on Subject: below --
2015-09-03 23:54 ulfalizer.lkml

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®