aboutsummaryrefslogtreecommitdiff
path: root/drivers/of/of_reserved_mem.c
diff options
context:
space:
mode:
authorRob Herring2016-06-15 08:32:18 -0500
committerRob Herring2016-07-18 16:57:42 -0500
commit606ad42aa3b1fe8bb122305bef5aea79a6cef54b (patch)
treef744cc2b9cfb4f560a08ab5c99059a414dda0b37 /drivers/of/of_reserved_mem.c
parent15cc2ed6dcf91a8658e084be4e140147161819d7 (diff)
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>
Diffstat (limited to 'drivers/of/of_reserved_mem.c')
-rw-r--r--drivers/of/of_reserved_mem.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 216648233874..eed788698268 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -13,6 +13,8 @@
* License or (at your optional) any later version of the license.
*/
+#define pr_fmt(fmt) "OF: reserved mem: " fmt
+
#include <linux/err.h>
#include <linux/of.h>
#include <linux/of_fdt.h>
@@ -75,7 +77,7 @@ void __init fdt_reserved_mem_save_node(unsigned long node, const char *uname,
struct reserved_mem *rmem = &reserved_mem[reserved_mem_count];
if (reserved_mem_count == ARRAY_SIZE(reserved_mem)) {
- pr_err("Reserved memory: not enough space all defined regions.\n");
+ pr_err("not enough space all defined regions.\n");
return;
}
@@ -108,8 +110,7 @@ static int __init __reserved_mem_alloc_size(unsigned long node,
return -EINVAL;
if (len != dt_root_size_cells * sizeof(__be32)) {
- pr_err("Reserved memory: invalid size property in '%s' node.\n",
- uname);
+ pr_err("invalid size property in '%s' node.\n", uname);
return -EINVAL;
}
size = dt_mem_next_cell(dt_root_size_cells, &prop);
@@ -119,7 +120,7 @@ static int __init __reserved_mem_alloc_size(unsigned long node,
prop = of_get_flat_dt_prop(node, "alignment", &len);
if (prop) {
if (len != dt_root_addr_cells * sizeof(__be32)) {
- pr_err("Reserved memory: invalid alignment property in '%s' node.\n",
+ pr_err("invalid alignment property in '%s' node.\n",
uname);
return -EINVAL;
}
@@ -141,7 +142,7 @@ static int __init __reserved_mem_alloc_size(unsigned long node,
if (prop) {
if (len % t_len != 0) {
- pr_err("Reserved memory: invalid alloc-ranges property in '%s', skipping node.\n",
+ pr_err("invalid alloc-ranges property in '%s', skipping node.\n",
uname);
return -EINVAL;
}
@@ -156,7 +157,7 @@ static int __init __reserved_mem_alloc_size(unsigned long node,
ret = early_init_dt_alloc_reserved_memory_arch(size,
align, start, end, nomap, &base);
if (ret == 0) {
- pr_debug("Reserved memory: allocated memory for '%s' node: base %pa, size %ld MiB\n",
+ pr_debug("allocated memory for '%s' node: base %pa, size %ld MiB\n",
uname, &base,
(unsigned long)size / SZ_1M);
break;
@@ -168,13 +169,12 @@ static int __init __reserved_mem_alloc_size(unsigned long node,
ret = early_init_dt_alloc_reserved_memory_arch(size, align,
0, 0, nomap, &base);
if (ret == 0)
- pr_debug("Reserved memory: allocated memory for '%s' node: base %pa, size %ld MiB\n",
+ pr_debug("allocated memory for '%s' node: base %pa, size %ld MiB\n",
uname, &base, (unsigned long)size / SZ_1M);
}
if (base == 0) {
- pr_info("Reserved memory: failed to allocate memory for node '%s'\n",
- uname);
+ pr_info("failed to allocate memory for node '%s'\n", uname);
return -ENOMEM;
}
@@ -203,7 +203,7 @@ static int __init __reserved_mem_init_node(struct reserved_mem *rmem)
continue;
if (initfn(rmem) == 0) {
- pr_info("Reserved memory: initialized node %s, compatible id %s\n",
+ pr_info("initialized node %s, compatible id %s\n",
rmem->name, compat);
return 0;
}
@@ -245,7 +245,7 @@ static void __init __rmem_check_for_overlap(void)
this_end = this->base + this->size;
next_end = next->base + next->size;
- pr_err("Reserved memory: OVERLAP DETECTED!\n%s (%pa--%pa) overlaps with %s (%pa--%pa)\n",
+ pr_err("OVERLAP DETECTED!\n%s (%pa--%pa) overlaps with %s (%pa--%pa)\n",
this->name, &this->base, &this_end,
next->name, &next->base, &next_end);
}