From 1b866757fc4cb135674f46c96909e900fcea91a2 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 21 Aug 2013 16:17:47 -0700 Subject: sysfs: fix placement of EXPORT_SYMBOL() The export should happen after the function, not at the bottom of the file, so fix that up. Signed-off-by: Greg Kroah-Hartman --- fs/sysfs/symlink.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'fs/sysfs/symlink.c') diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index 8c940df97a52..bb097ad1d860 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c @@ -125,6 +125,7 @@ int sysfs_create_link(struct kobject *kobj, struct kobject *target, { return sysfs_do_create_link(kobj, target, name, 1); } +EXPORT_SYMBOL_GPL(sysfs_create_link); /** * sysfs_create_link_nowarn - create symlink between two objects. @@ -166,7 +167,6 @@ void sysfs_delete_link(struct kobject *kobj, struct kobject *targ, * @kobj: object we're acting for. * @name: name of the symlink to remove. */ - void sysfs_remove_link(struct kobject * kobj, const char * name) { struct sysfs_dirent *parent_sd = NULL; @@ -178,6 +178,7 @@ void sysfs_remove_link(struct kobject * kobj, const char * name) sysfs_hash_and_remove(parent_sd, NULL, name); } +EXPORT_SYMBOL_GPL(sysfs_remove_link); /** * sysfs_rename_link - rename symlink in object's directory. @@ -223,6 +224,7 @@ out: sysfs_put(sd); return result; } +EXPORT_SYMBOL_GPL(sysfs_rename_link); static int sysfs_get_target_path(struct sysfs_dirent *parent_sd, struct sysfs_dirent *target_sd, char *path) @@ -319,8 +321,3 @@ const struct inode_operations sysfs_symlink_inode_operations = { .getattr = sysfs_getattr, .permission = sysfs_permission, }; - - -EXPORT_SYMBOL_GPL(sysfs_create_link); -EXPORT_SYMBOL_GPL(sysfs_remove_link); -EXPORT_SYMBOL_GPL(sysfs_rename_link); -- cgit v1.2.3 From ab9bf4be4dd58f8ae1961180e008b7e3022f08b5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 21 Aug 2013 16:21:17 -0700 Subject: sysfs: remove trailing whitespace This removes all trailing whitespace errors in the sysfs code. Signed-off-by: Greg Kroah-Hartman --- fs/sysfs/symlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/sysfs/symlink.c') diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index bb097ad1d860..9fab2e7f7357 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c @@ -297,7 +297,7 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) int error = -ENOMEM; unsigned long page = get_zeroed_page(GFP_KERNEL); if (page) { - error = sysfs_getlink(dentry, (char *) page); + error = sysfs_getlink(dentry, (char *) page); if (error < 0) free_page((unsigned long)page); } -- cgit v1.2.3 From 1b18dc2beb31f588db1c75901b0112324c72124f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 21 Aug 2013 16:28:26 -0700 Subject: sysfs: fix up space coding style issues This fixes up all of the space-related coding style issues for the sysfs code. Signed-off-by: Greg Kroah-Hartman --- fs/sysfs/symlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/sysfs/symlink.c') diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index 9fab2e7f7357..c6d815653125 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c @@ -167,7 +167,7 @@ void sysfs_delete_link(struct kobject *kobj, struct kobject *targ, * @kobj: object we're acting for. * @name: name of the symlink to remove. */ -void sysfs_remove_link(struct kobject * kobj, const char * name) +void sysfs_remove_link(struct kobject *kobj, const char *name) { struct sysfs_dirent *parent_sd = NULL; @@ -278,7 +278,7 @@ static int sysfs_get_target_path(struct sysfs_dirent *parent_sd, return 0; } -static int sysfs_getlink(struct dentry *dentry, char * path) +static int sysfs_getlink(struct dentry *dentry, char *path) { struct sysfs_dirent *sd = dentry->d_fsdata; struct sysfs_dirent *parent_sd = sd->s_parent; -- cgit v1.2.3 From ddfd6d074e0fadd14b6670394a6a7fb6a955de18 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 21 Aug 2013 16:33:34 -0700 Subject: sysfs: fix up 80 column coding style issues This fixes up the 80 column coding style issues in the sysfs .c files. Signed-off-by: Greg Kroah-Hartman --- fs/sysfs/symlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/sysfs/symlink.c') diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index c6d815653125..2dd4507d9edd 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c @@ -305,7 +305,8 @@ static void *sysfs_follow_link(struct dentry *dentry, struct nameidata *nd) return NULL; } -static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie) +static void sysfs_put_link(struct dentry *dentry, struct nameidata *nd, + void *cookie) { char *page = nd_get_link(nd); if (!IS_ERR(page)) -- cgit v1.2.3