of: use pr_fmt prefix for all console printing
Clean-up all the DT printk functions to use common pr_fmt prefix.
Some print statements such as kmalloc errors were redundant, so just
drop those.
Cc: Frank Rowand <frowand.list@gmail.com>
Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Reviewed-by: Frank Rowand <frank.rowand@am.sony.com>
Signed-off-by: Rob Herring <robh@kernel.org>
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 8bb3d1a..a4b6087 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -17,6 +17,9 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
+
+#define pr_fmt(fmt) "OF: " fmt
+
#include <linux/console.h>
#include <linux/ctype.h>
#include <linux/cpu.h>
@@ -130,7 +133,7 @@
if (name == orig_name) {
name = kstrdup(orig_name, GFP_KERNEL);
} else {
- pr_warn("device-tree: Duplicate name in %s, renamed to \"%s\"\n",
+ pr_warn("Duplicate name in %s, renamed to \"%s\"\n",
kobject_name(kobj), name);
}
return name;
@@ -204,7 +207,7 @@
of_kset = kset_create_and_add("devicetree", NULL, firmware_kobj);
if (!of_kset) {
mutex_unlock(&of_mutex);
- pr_err("devicetree: failed to register existing nodes\n");
+ pr_err("failed to register existing nodes\n");
return;
}
for_each_of_allnodes(np)
@@ -2269,8 +2272,8 @@
of_node_put(node);
if (!port) {
- pr_err("%s(): no port node found in %s\n",
- __func__, parent->full_name);
+ pr_err("graph: no port node found in %s\n",
+ parent->full_name);
return NULL;
}
} else {