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>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user