From patchwork Thu Sep 1 06:54:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 75162 Delivered-To: patch@linaro.org Received: by 10.140.29.8 with SMTP id a8csp130084qga; Wed, 31 Aug 2016 23:56:32 -0700 (PDT) X-Received: by 10.98.22.212 with SMTP id 203mr24336484pfw.74.1472712992507; Wed, 31 Aug 2016 23:56:32 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ur7si4143224pab.3.2016.08.31.23.56.32; Wed, 31 Aug 2016 23:56:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751990AbcIAG4a (ORCPT + 7 others); Thu, 1 Sep 2016 02:56:30 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:57915 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750841AbcIAG43 (ORCPT ); Thu, 1 Sep 2016 02:56:29 -0400 Received: from 172.24.1.36 (EHLO szxeml427-hub.china.huawei.com) ([172.24.1.36]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id CHE42772; Thu, 01 Sep 2016 14:56:21 +0800 (CST) Received: from localhost (10.177.23.164) by szxeml427-hub.china.huawei.com (10.82.67.182) with Microsoft SMTP Server id 14.3.235.1; Thu, 1 Sep 2016 14:56:11 +0800 From: Zhen Lei To: Catalin Marinas , Will Deacon , linux-arm-kernel , linux-kernel , Rob Herring , "Frank Rowand" , devicetree , Andrew Morton , linux-mm CC: Zefan Li , Xinwei Hu , "Tianhong Ding" , Hanjun Guo , Zhen Lei Subject: [PATCH v8 07/16] of_numa: Use pr_fmt() Date: Thu, 1 Sep 2016 14:54:58 +0800 Message-ID: <1472712907-12700-8-git-send-email-thunder.leizhen@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1472712907-12700-1-git-send-email-thunder.leizhen@huawei.com> References: <1472712907-12700-1-git-send-email-thunder.leizhen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.23.164] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020205.57C7D115.00AE, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: d46842b0d676502e3311fdf5ded9701e Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Kefeng Wang Use pr_fmt to prefix kernel output. Signed-off-by: Kefeng Wang Acked-by: Rob Herring --- drivers/of/of_numa.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c index 0d7459b..f63d4b0d 100644 --- a/drivers/of/of_numa.c +++ b/drivers/of/of_numa.c @@ -16,6 +16,8 @@ * along with this program. If not, see . */ +#define pr_fmt(fmt) "OF: NUMA: " fmt + #include #include #include @@ -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);