diff options
| author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2016-09-01 02:54:58 -0400 |
|---|---|---|
| committer | Will Deacon <will.deacon@arm.com> | 2016-09-09 09:59:09 -0400 |
| commit | ad02180515d4856702bc656f754e9df83ab0345b (patch) | |
| tree | 43d762c351a215f4044cb62d52e4955e3a8ddf46 /drivers/of | |
| parent | 837dae1b4308f2dfc9c5bc76c367553670198c63 (diff) | |
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>
Diffstat (limited to 'drivers/of')
| -rw-r--r-- | drivers/of/of_numa.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c index 0d7459bd31f0..f63d4b0deff0 100644 --- a/drivers/of/of_numa.c +++ b/drivers/of/of_numa.c | |||
| @@ -16,6 +16,8 @@ | |||
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 17 | */ | 17 | */ |
| 18 | 18 | ||
| 19 | #define pr_fmt(fmt) "OF: NUMA: " fmt | ||
| 20 | |||
| 19 | #include <linux/of.h> | 21 | #include <linux/of.h> |
| 20 | #include <linux/of_address.h> | 22 | #include <linux/of_address.h> |
| 21 | #include <linux/nodemask.h> | 23 | #include <linux/nodemask.h> |
| @@ -49,10 +51,9 @@ static void __init of_numa_parse_cpu_nodes(void) | |||
| 49 | if (r) | 51 | if (r) |
| 50 | continue; | 52 | continue; |
| 51 | 53 | ||
| 52 | pr_debug("NUMA: CPU on %u\n", nid); | 54 | pr_debug("CPU on %u\n", nid); |
| 53 | if (nid >= MAX_NUMNODES) | 55 | if (nid >= MAX_NUMNODES) |
| 54 | pr_warn("NUMA: Node id %u exceeds maximum value\n", | 56 | pr_warn("Node id %u exceeds maximum value\n", nid); |
| 55 | nid); | ||
| 56 | else | 57 | else |
| 57 | node_set(nid, numa_nodes_parsed); | 58 | node_set(nid, numa_nodes_parsed); |
| 58 | } | 59 | } |
| @@ -76,7 +77,7 @@ static int __init of_numa_parse_memory_nodes(void) | |||
| 76 | continue; | 77 | continue; |
| 77 | 78 | ||
| 78 | if (nid >= MAX_NUMNODES) { | 79 | if (nid >= MAX_NUMNODES) { |
| 79 | pr_warn("NUMA: Node id %u exceeds maximum value\n", nid); | 80 | pr_warn("Node id %u exceeds maximum value\n", nid); |
| 80 | r = -EINVAL; | 81 | r = -EINVAL; |
| 81 | } | 82 | } |
| 82 | 83 | ||
| @@ -85,7 +86,7 @@ static int __init of_numa_parse_memory_nodes(void) | |||
| 85 | 86 | ||
| 86 | if (!i || r) { | 87 | if (!i || r) { |
| 87 | of_node_put(np); | 88 | of_node_put(np); |
| 88 | pr_err("NUMA: bad property in memory node\n"); | 89 | pr_err("bad property in memory node\n"); |
| 89 | return r ? : -EINVAL; | 90 | return r ? : -EINVAL; |
| 90 | } | 91 | } |
| 91 | } | 92 | } |
| @@ -99,17 +100,17 @@ static int __init of_numa_parse_distance_map_v1(struct device_node *map) | |||
| 99 | int entry_count; | 100 | int entry_count; |
| 100 | int i; | 101 | int i; |
| 101 | 102 | ||
| 102 | pr_info("NUMA: parsing numa-distance-map-v1\n"); | 103 | pr_info("parsing numa-distance-map-v1\n"); |
| 103 | 104 | ||
| 104 | matrix = of_get_property(map, "distance-matrix", NULL); | 105 | matrix = of_get_property(map, "distance-matrix", NULL); |
| 105 | if (!matrix) { | 106 | if (!matrix) { |
| 106 | pr_err("NUMA: No distance-matrix property in distance-map\n"); | 107 | pr_err("No distance-matrix property in distance-map\n"); |
| 107 | return -EINVAL; | 108 | return -EINVAL; |
| 108 | } | 109 | } |
| 109 | 110 | ||
| 110 | entry_count = of_property_count_u32_elems(map, "distance-matrix"); | 111 | entry_count = of_property_count_u32_elems(map, "distance-matrix"); |
| 111 | if (entry_count <= 0) { | 112 | if (entry_count <= 0) { |
| 112 | pr_err("NUMA: Invalid distance-matrix\n"); | 113 | pr_err("Invalid distance-matrix\n"); |
| 113 | return -EINVAL; | 114 | return -EINVAL; |
| 114 | } | 115 | } |
| 115 | 116 | ||
| @@ -124,7 +125,7 @@ static int __init of_numa_parse_distance_map_v1(struct device_node *map) | |||
| 124 | matrix++; | 125 | matrix++; |
| 125 | 126 | ||
| 126 | numa_set_distance(nodea, nodeb, distance); | 127 | numa_set_distance(nodea, nodeb, distance); |
| 127 | pr_debug("NUMA: distance[node%d -> node%d] = %d\n", | 128 | pr_debug("distance[node%d -> node%d] = %d\n", |
| 128 | nodea, nodeb, distance); | 129 | nodea, nodeb, distance); |
| 129 | 130 | ||
| 130 | /* Set default distance of node B->A same as A->B */ | 131 | /* Set default distance of node B->A same as A->B */ |
| @@ -171,7 +172,7 @@ int of_node_to_nid(struct device_node *device) | |||
| 171 | np = of_get_next_parent(np); | 172 | np = of_get_next_parent(np); |
| 172 | } | 173 | } |
| 173 | if (np && r) | 174 | if (np && r) |
| 174 | pr_warn("NUMA: Invalid \"numa-node-id\" property in node %s\n", | 175 | pr_warn("Invalid \"numa-node-id\" property in node %s\n", |
| 175 | np->name); | 176 | np->name); |
| 176 | of_node_put(np); | 177 | of_node_put(np); |
| 177 | 178 | ||
