[PATCH 18/29] fs/sysfs: Update WARN uses
From: Joe Perches
Date: Mon Dec 06 2010 - 17:08:35 EST
Coalesce long formats.
Align arguments.
Remove KERN_<level>.
Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---
fs/sysfs/dir.c | 3 +--
fs/sysfs/file.c | 4 ++--
fs/sysfs/group.c | 4 ++--
fs/sysfs/symlink.c | 10 ++++------
4 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index 7e54bac..387cf47 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -444,8 +444,7 @@ int sysfs_add_one(struct sysfs_addrm_cxt *acxt, struct sysfs_dirent *sd)
ret = __sysfs_add_one(acxt, sd);
if (ret == -EEXIST) {
char *path = kzalloc(PATH_MAX, GFP_KERNEL);
- WARN(1, KERN_WARNING
- "sysfs: cannot create duplicate filename '%s'\n",
+ WARN(1, "sysfs: cannot create duplicate filename '%s'\n",
(path == NULL) ? sd->s_name :
strcat(strcat(sysfs_pathname(acxt->parent_sd, path), "/"),
sd->s_name));
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index da3fefe..c061516 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -351,8 +351,8 @@ static int sysfs_open_file(struct inode *inode, struct file *file)
if (kobj->ktype && kobj->ktype->sysfs_ops)
ops = kobj->ktype->sysfs_ops;
else {
- WARN(1, KERN_ERR "missing sysfs attribute operations for "
- "kobject: %s\n", kobject_name(kobj));
+ WARN(1, "missing sysfs attribute operations for kobject: %s\n",
+ kobject_name(kobj));
goto err_out;
}
diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c
index c8769dc..fa82099 100644
--- a/fs/sysfs/group.c
+++ b/fs/sysfs/group.c
@@ -134,8 +134,8 @@ void sysfs_remove_group(struct kobject * kobj,
if (grp->name) {
sd = sysfs_get_dirent(dir_sd, NULL, grp->name);
if (!sd) {
- WARN(!sd, KERN_WARNING "sysfs group %p not found for "
- "kobject '%s'\n", grp, kobject_name(kobj));
+ WARN(!sd, "sysfs group %p not found for kobject '%s'\n",
+ grp, kobject_name(kobj));
return;
}
} else
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c
index a7ac78f..3169da8 100644
--- a/fs/sysfs/symlink.c
+++ b/fs/sysfs/symlink.c
@@ -75,12 +75,10 @@ static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target,
error = __sysfs_add_one(&acxt, sd);
} else {
error = -EINVAL;
- WARN(1, KERN_WARNING
- "sysfs: symlink across ns_types %s/%s -> %s/%s\n",
- parent_sd->s_name,
- sd->s_name,
- sd->s_symlink.target_sd->s_parent->s_name,
- sd->s_symlink.target_sd->s_name);
+ WARN(1, "sysfs: symlink across ns_types %s/%s -> %s/%s\n",
+ parent_sd->s_name, sd->s_name,
+ sd->s_symlink.target_sd->s_parent->s_name,
+ sd->s_symlink.target_sd->s_name);
}
sysfs_addrm_finish(&acxt);
--
1.7.3.2.245.g03276.dirty
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/