of_numa: Use pr_fmt()

Use pr_fmt to prefix kernel output.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
This commit is contained in:
Kefeng Wang 2016-09-01 14:54:58 +08:00 committed by Will Deacon
parent 837dae1b43
commit ad02180515

View file

@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define pr_fmt(fmt) "OF: NUMA: " fmt
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/nodemask.h>
@ -49,10 +51,9 @@ static void __init of_numa_parse_cpu_nodes(void)
if (r)
continue;
pr_debug("NUMA: CPU on %u\n", nid);
pr_debug("CPU on %u\n", nid);
if (nid >= MAX_NUMNODES)
pr_warn("NUMA: Node id %u exceeds maximum value\n",
nid);
pr_warn("Node id %u exceeds maximum value\n", nid);
else
node_set(nid, numa_nodes_parsed);
}
@ -76,7 +77,7 @@ static int __init of_numa_parse_memory_nodes(void)
continue;
if (nid >= MAX_NUMNODES) {
pr_warn("NUMA: Node id %u exceeds maximum value\n", nid);
pr_warn("Node id %u exceeds maximum value\n", nid);
r = -EINVAL;
}
@ -85,7 +86,7 @@ static int __init of_numa_parse_memory_nodes(void)
if (!i || r) {
of_node_put(np);
pr_err("NUMA: bad property in memory node\n");
pr_err("bad property in memory node\n");
return r ? : -EINVAL;
}
}
@ -99,17 +100,17 @@ static int __init of_numa_parse_distance_map_v1(struct device_node *map)
int entry_count;
int i;
pr_info("NUMA: parsing numa-distance-map-v1\n");
pr_info("parsing numa-distance-map-v1\n");
matrix = of_get_property(map, "distance-matrix", NULL);
if (!matrix) {
pr_err("NUMA: No distance-matrix property in distance-map\n");
pr_err("No distance-matrix property in distance-map\n");
return -EINVAL;
}
entry_count = of_property_count_u32_elems(map, "distance-matrix");
if (entry_count <= 0) {
pr_err("NUMA: Invalid distance-matrix\n");
pr_err("Invalid distance-matrix\n");
return -EINVAL;
}
@ -124,7 +125,7 @@ static int __init of_numa_parse_distance_map_v1(struct device_node *map)
matrix++;
numa_set_distance(nodea, nodeb, distance);
pr_debug("NUMA: distance[node%d -> node%d] = %d\n",
pr_debug("distance[node%d -> node%d] = %d\n",
nodea, nodeb, distance);
/* Set default distance of node B->A same as A->B */
@ -171,7 +172,7 @@ int of_node_to_nid(struct device_node *device)
np = of_get_next_parent(np);
}
if (np && r)
pr_warn("NUMA: Invalid \"numa-node-id\" property in node %s\n",
pr_warn("Invalid \"numa-node-id\" property in node %s\n",
np->name);
of_node_put(np);