[PATCH] kobject: quiet errors in kobject_add

From: Greg Kroah-Hartman
Date: Thu May 18 2006 - 14:17:31 EST


People don't like released kernels yelling at them, no matter how real
the error might be. So only report it if CONFIG_KOBJECT_DEBUG is
enabled.

Sent on request of Andrew Morton.

Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
lib/kobject.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

--- gregkh-2.6.orig/lib/kobject.c
+++ gregkh-2.6/lib/kobject.c
@@ -198,14 +198,14 @@ int kobject_add(struct kobject * kobj)

/* be noisy on error issues */
if (error == -EEXIST)
- printk("kobject_add failed for %s with -EEXIST, "
+ pr_debug("kobject_add failed for %s with -EEXIST, "
"don't try to register things with the "
"same name in the same directory.\n",
kobject_name(kobj));
else
- printk("kobject_add failed for %s (%d)\n",
+ pr_debug("kobject_add failed for %s (%d)\n",
kobject_name(kobj), error);
- dump_stack();
+ /* dump_stack(); */
}

return error;

-
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/