LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 07/10] debugfs: Remove misleading comments.
Date: Fri, 16 Feb 2007 15:37:33 -0800 [thread overview]
Message-ID: <1171669076436-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <1171669073246-git-send-email-gregkh@suse.de>
From: Cornelia Huck <cornelia.huck@de.ibm.com>
Just mention which error will be returned if debugfs is disabled. Callers
should be able to figure out themselves what they need to check.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/debugfs/inode.c | 12 +++---------
1 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 9c51a9f..7b324cf 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -212,9 +212,7 @@ static int debugfs_create_by_name(const char *name, mode_t mode,
* you are responsible here.) If an error occurs, %NULL will be returned.
*
* If debugfs is not enabled in the kernel, the value -%ENODEV will be
- * returned. It is not wise to check for this value, but rather, check for
- * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
- * code.
+ * returned.
*/
struct dentry *debugfs_create_file(const char *name, mode_t mode,
struct dentry *parent, void *data,
@@ -264,9 +262,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_file);
* you are responsible here.) If an error occurs, %NULL will be returned.
*
* If debugfs is not enabled in the kernel, the value -%ENODEV will be
- * returned. It is not wise to check for this value, but rather, check for
- * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
- * code.
+ * returned.
*/
struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
{
@@ -297,9 +293,7 @@ EXPORT_SYMBOL_GPL(debugfs_create_dir);
* returned.
*
* If debugfs is not enabled in the kernel, the value -%ENODEV will be
- * returned. It is not wise to check for this value, but rather, check for
- * %NULL or !%NULL instead as to eliminate the need for #ifdef in the calling
- * code.
+ * returned.
*/
struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent,
const char *target)
--
1.5.0
next prev parent reply other threads:[~2007-02-16 23:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-16 23:35 [GIT PATCH] more Driver core patches for 2.6.20 Greg KH
2007-02-16 23:37 ` [PATCH 01/10] Driver.h copyright update Greg Kroah-Hartman
2007-02-16 23:37 ` [PATCH 02/10] Driver core: let request_module() send a /sys/modules/kmod/-uevent Greg Kroah-Hartman
2007-02-16 23:37 ` [PATCH 03/10] serial: Add PCMCIA IDs for Quatech DSP-100 dual RS232 adapter Greg Kroah-Hartman
2007-02-16 23:37 ` [PATCH 04/10] kobject: kobj->k_name verification fix Greg Kroah-Hartman
2007-02-16 23:37 ` [PATCH 05/10] Driver: remove redundant kobject_unregister checks Greg Kroah-Hartman
2007-02-16 23:37 ` [PATCH 06/10] debugfs: implement symbolic links Greg Kroah-Hartman
2007-02-16 23:37 ` Greg Kroah-Hartman [this message]
2007-02-16 23:37 ` [PATCH 08/10] Driver core: device_add_attrs() cleanup Greg Kroah-Hartman
2007-02-16 23:37 ` [PATCH 09/10] pcmcia: some class_device fallout Greg Kroah-Hartman
2007-02-16 23:37 ` [PATCH 10/10] sysfs: fix build errors: uevent with CONFIG_SYSFS=n 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=1171669076436-git-send-email-gregkh@suse.de \
--to=gregkh@suse.de \
--cc=cornelia.huck@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--subject='Re: [PATCH 07/10] debugfs: Remove misleading comments.' \
/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
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).