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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
388975ccca
commit
cfec0bc835
@@ -162,8 +162,8 @@ void sysfs_remove_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd);
|
||||
void sysfs_addrm_finish(struct sysfs_addrm_cxt *acxt);
|
||||
|
||||
struct sysfs_dirent *sysfs_find_dirent(struct sysfs_dirent *parent_sd,
|
||||
const void *ns,
|
||||
const unsigned char *name);
|
||||
const unsigned char *name,
|
||||
const void *ns);
|
||||
struct sysfs_dirent *sysfs_new_dirent(const char *name, umode_t mode, int type);
|
||||
|
||||
void release_sysfs_dirent(struct sysfs_dirent *sd);
|
||||
@@ -173,7 +173,7 @@ int sysfs_create_subdir(struct kobject *kobj, const char *name,
|
||||
void sysfs_remove_subdir(struct sysfs_dirent *sd);
|
||||
|
||||
int sysfs_rename(struct sysfs_dirent *sd, struct sysfs_dirent *new_parent_sd,
|
||||
const void *ns, const char *new_name);
|
||||
const char *new_name, const void *new_ns);
|
||||
|
||||
static inline struct sysfs_dirent *__sysfs_get(struct sysfs_dirent *sd)
|
||||
{
|
||||
@@ -204,8 +204,8 @@ int sysfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
|
||||
struct kstat *stat);
|
||||
int sysfs_setxattr(struct dentry *dentry, const char *name, const void *value,
|
||||
size_t size, int flags);
|
||||
int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns,
|
||||
const char *name);
|
||||
int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const char *name,
|
||||
const void *ns);
|
||||
int sysfs_inode_init(void);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user