Skip to content

Commit

Permalink
of_numa: Use pr_fmt()
Browse files Browse the repository at this point in the history
Use pr_fmt to prefix kernel output.

Signed-off-by: Kefeng Wang <[email protected]>
Acked-by: Rob Herring <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
Kefeng Wang authored and wildea01 committed Sep 9, 2016
1 parent 837dae1 commit ad02180
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions drivers/of/of_numa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
}
Expand All @@ -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;
}

Expand All @@ -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;
}
}
Expand All @@ -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;
}

Expand All @@ -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 */
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit ad02180

Please sign in to comment.