aboutsummaryrefslogtreecommitdiffstats
path: root/fs/sysfs/sysfs.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-09-11 22:29:09 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-26 18:34:38 -0400
commitcfec0bc835c84d3d3723d4955587f05a94879b26 (patch)
tree18c1239d9113ebc30ca037b1a0025b95ffb7c405 /fs/sysfs/sysfs.h
parent388975cccaaf11abd47525f664c76891c440481a (diff)
sysfs: @name comes before @ns
Some internal sysfs functions which take explicit namespace argument are weird in that they place the optional @ns in front of @name which is contrary to the established convention. This is confusing and error-prone especially as @ns and @name may be interchanged without causing compilation warning. Swap the positions of @name and @ns in the following internal functions. sysfs_find_dirent() sysfs_rename() sysfs_hash_and_remove() sysfs_name_hash() sysfs_name_compare() create_dir() This patch doesn't introduce any functional changes. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Kay Sievers <kay@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r--fs/sysfs/sysfs.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 6faacafda777..ee44fde199d0 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -162,8 +162,8 @@ void sysfs_remove_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd);
162void sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt); 162void sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt);
163 163
164struct sysfs_dirent *sysfs_find_dirent(struct sysfs_dirent *parent_sd, 164struct sysfs_dirent *sysfs_find_dirent(struct sysfs_dirent *parent_sd,
165 const void *ns, 165 const unsigned char *name,
166 const unsigned char *name); 166 const void *ns);
167struct sysfs_dirent *sysfs_new_dirent(const char *name, umode_t mode, int type); 167struct sysfs_dirent *sysfs_new_dirent(const char *name, umode_t mode, int type);
168 168
169void release_sysfs_dirent(struct sysfs_dirent *sd); 169void release_sysfs_dirent(struct sysfs_dirent *sd);
@@ -173,7 +173,7 @@ int sysfs_create_subdir(struct kobject *kobj, const char *name,
173void sysfs_remove_subdir(struct sysfs_dirent *sd); 173void sysfs_remove_subdir(struct sysfs_dirent *sd);
174 174
175int sysfs_rename(struct sysfs_dirent *sd, struct sysfs_dirent *new_parent_sd, 175int sysfs_rename(struct sysfs_dirent *sd, struct sysfs_dirent *new_parent_sd,
176 const void *ns, const char *new_name); 176 const char *new_name, const void *new_ns);
177 177
178static inline struct sysfs_dirent *__sysfs_get(struct sysfs_dirent *sd) 178static inline struct sysfs_dirent *__sysfs_get(struct sysfs_dirent *sd)
179{ 179{
@@ -204,8 +204,8 @@ int sysfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
204 struct kstat *stat); 204 struct kstat *stat);
205int sysfs_setxattr(struct dentry *dentry, const char *name, const void *value, 205int sysfs_setxattr(struct dentry *dentry, const char *name, const void *value,
206 size_t size, int flags); 206 size_t size, int flags);
207int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns, 207int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name,
208 const char *name); 208 const void *ns);
209int sysfs_inode_init(void); 209int sysfs_inode_init(void);
210 210
211/* 211/*