From 99fcd77d15357e8ba51005c25cc750b9c28b2688 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Fri, 25 Jul 2008 19:45:41 -0700 Subject: Use WARN() in fs/sysfs Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes part of the warning section for better reporting/collection. Also, with this, one fo the if() sections collapses entirely into the WARN(). Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/sysfs/group.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/sysfs/group.c') diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index eeba38417b1..fe611949a7f 100644 --- a/fs/sysfs/group.c +++ b/fs/sysfs/group.c @@ -134,9 +134,8 @@ void sysfs_remove_group(struct kobject * kobj, if (grp->name) { sd = sysfs_get_dirent(dir_sd, grp->name); if (!sd) { - printk(KERN_WARNING "sysfs group %p not found for " + WARN(!sd, KERN_WARNING "sysfs group %p not found for " "kobject '%s'\n", grp, kobject_name(kobj)); - WARN_ON(!sd); return; } } else -- cgit v1.2.3