of_numa: Use pr_fmt()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Thu, 1 Sep 2016 06:54:58 +0000 (14:54 +0800)
committerWill Deacon <will.deacon@arm.com>
Fri, 9 Sep 2016 13:59:09 +0000 (14:59 +0100)
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>
drivers/of/of_numa.c

index 0d7459bd31f05e5ce7c8b851ef99825bb03574bd..f63d4b0deff009ad8963b61034b95d8563ca919b 100644 (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);