From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: ebiederm@xmission.com (Eric W. Biederman), Greg K-H <greg@kroah.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] sysfs: Remove sysfs_do_create_link().
Date: Thu, 18 Sep 2008 14:28:06 +0200 [thread overview]
Message-ID: <20080918142806.20568dda@gondolin.boeblingen.de.ibm.com> (raw)
In-Reply-To: <m1y71pvg5d.fsf@frodo.ebiederm.org>
Since sysfs_create_link_nowarn() is gone, sysfs_do_create_link()
is an unneeded indirection: Remove it.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
---
fs/sysfs/symlink.c | 27 +++++++++------------------
1 file changed, 9 insertions(+), 18 deletions(-)
--- linux-2.6.orig/fs/sysfs/symlink.c
+++ linux-2.6/fs/sysfs/symlink.c
@@ -19,8 +19,14 @@
#include "sysfs.h"
-static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target,
- const char *name, int warn)
+/**
+ * sysfs_create_link - create symlink between two objects.
+ * @kobj: object whose directory we're creating the link in.
+ * @target: object we're pointing to.
+ * @name: name of the symlink.
+ */
+int sysfs_create_link(struct kobject *kobj, struct kobject *target,
+ const char *name)
{
struct sysfs_dirent *parent_sd = NULL;
struct sysfs_dirent *target_sd = NULL;
@@ -60,10 +66,7 @@ static int sysfs_do_create_link(struct k
target_sd = NULL; /* reference is now owned by the symlink */
sysfs_addrm_start(&acxt, parent_sd);
- if (warn)
- error = sysfs_add_one(&acxt, sd);
- else
- error = __sysfs_add_one(&acxt, sd);
+ error = sysfs_add_one(&acxt, sd);
sysfs_addrm_finish(&acxt);
if (error)
@@ -78,18 +81,6 @@ static int sysfs_do_create_link(struct k
}
/**
- * sysfs_create_link - create symlink between two objects.
- * @kobj: object whose directory we're creating the link in.
- * @target: object we're pointing to.
- * @name: name of the symlink.
- */
-int sysfs_create_link(struct kobject *kobj, struct kobject *target,
- const char *name)
-{
- return sysfs_do_create_link(kobj, target, name, 1);
-}
-
-/**
* sysfs_delete_link - remove symlink in object's directory.
* @kobj: object we're acting for.
* @targ: object we're pointing to.
next prev parent reply other threads:[~2008-09-18 13:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-17 11:08 [PATCH]sysfs: Don't emit a warning when sysfs_rename_link() fails Cornelia Huck
2008-09-17 18:55 ` Eric W. Biederman
2008-09-18 7:07 ` Cornelia Huck
2008-09-18 10:00 ` Eric W. Biederman
2008-09-18 10:50 ` Cornelia Huck
2008-09-18 11:37 ` Eric W. Biederman
2008-09-18 12:28 ` Cornelia Huck [this message]
2008-10-07 4:19 ` [PATCH] sysfs: Remove sysfs_do_create_link() Greg KH
2008-10-07 7:23 ` Cornelia Huck
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=20080918142806.20568dda@gondolin.boeblingen.de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=ebiederm@xmission.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.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: 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