From patchwork Thu Jun 2 06:03:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 69127 Delivered-To: patch@linaro.org Received: by 10.140.23.41 with SMTP id 38csp162739qgo; Wed, 1 Jun 2016 23:06:40 -0700 (PDT) X-Received: by 10.66.78.104 with SMTP id a8mr3203887pax.88.1464847599894; Wed, 01 Jun 2016 23:06:39 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id db1si16778294pac.139.2016.06.01.23.06.39; Wed, 01 Jun 2016 23:06:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752020AbcFBGGh (ORCPT + 30 others); Thu, 2 Jun 2016 02:06:37 -0400 Received: from szxga01-in.huawei.com ([58.251.152.64]:18713 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750811AbcFBGGf (ORCPT ); Thu, 2 Jun 2016 02:06:35 -0400 Received: from 172.24.1.136 (EHLO szxeml422-hub.china.huawei.com) ([172.24.1.136]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DLQ87593; Thu, 02 Jun 2016 14:04:41 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by szxeml422-hub.china.huawei.com (10.82.67.152) with Microsoft SMTP Server id 14.3.235.1; Thu, 2 Jun 2016 14:04:33 +0800 From: Kefeng Wang To: Catalin Marinas CC: Will Deacon , linux-arm-kernel , Ganapatrao Kulkarni , Robert Richter , "David Daney" , Rob Herring , linux-kernel , , , Subject: [PATCH 2/3] of_numa: Use pr_fmt() Date: Thu, 2 Jun 2016 14:03:08 +0800 Message-ID: <1464847389-11652-3-git-send-email-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 1.7.12.4 In-Reply-To: <1464847389-11652-1-git-send-email-wangkefeng.wang@huawei.com> References: <1464834491-12024-1-git-send-email-thunder.leizhen@huawei.com> <1464847389-11652-1-git-send-email-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.574FCC83.0068, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 05891fc596bb23e45b341260008347be Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use pr_fmt to prefix kernel output. Signed-off-by: Kefeng Wang --- drivers/of/of_numa.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) -- 1.7.12.4 diff --git a/drivers/of/of_numa.c b/drivers/of/of_numa.c index ed7bd22..019738f 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); } @@ -80,7 +81,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; } } @@ -94,17 +95,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; } @@ -119,7 +120,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 */ @@ -166,7 +167,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);