From patchwork Wed Sep 5 19:37:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 146024 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp5340177ljw; Wed, 5 Sep 2018 12:37:51 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZC2B/ayKK6PHAG9NkbY2e+bccZYvcaX4FQtacvUn5P+UdHb+vl+hdhmcXEgbWwArc0n13M X-Received: by 2002:a63:cc04:: with SMTP id x4-v6mr37475223pgf.33.1536176271581; Wed, 05 Sep 2018 12:37:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536176271; cv=none; d=google.com; s=arc-20160816; b=QIdwHQODS1MN2X2T4Y7BYieB1rOAdqql+gbCRYTWWlWf75lOQgn/y7BfydNSqEuioX 3rd5DuL3VV11Hwaog8pehS1ZKvTDAcC1iD2i3qUDxtTbpkzPS6Sagr47+9WVOQcEuuAP Fhz4e4lE7PWGelgPhvaWTGOCAIKrapH34Hwv0DgrD+M+7UfFCuTUqD3kh94jK/BHfGHQ Oj6k2YQb0CW8iGE0yhveL91T939yZByVTftFh8vRxUoh/YYbipehcdzoT/34K9a7Sp0X w0jT4l9NYlYjpk++YrpNAr0escoLF5R16eoN9d45xahinnVRN7RENiOdWfmSzo4ex9Jg xSCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=BozMFRD6b8JP7Za+m/l6yQcG8PXXn63O1+XHPU/v3vQ=; b=oMZxwX1gxKSX3viwQO3AAjHbxc3pvis3u/Uxk/gjhriyqa4S0Oh8T2AvQDNLxM2g+o WB8O7Fdpm1Bl8VfrLcyAOEuylGZOFu9O9bSc6w0LPNvFdZidhnziaob8qR3JA6jjIIi+ NljOVq+kUzQUyI0MDEalrZ3pk1M2YxwPCWbI2N4fKZi+EwvCdo0/mncFn35YEA4c/PML yhFezK+4fBl5upyqLgl96NCSWLP+pI6JLQelPR+e70MC5KoAgm4u+NIjpra6Y+TW2lbx SN5E6mGdBTM/xNKh+sduX/1QqPFk8COoRgGBXQs1ugC0K5LFYwBk7ICzNnPnXyVQFxzB tZOw== ARC-Authentication-Results: i=1; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w190-v6si2614709pgd.482.2018.09.05.12.37.51; Wed, 05 Sep 2018 12:37:51 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727837AbeIFAJ2 (ORCPT + 6 others); Wed, 5 Sep 2018 20:09:28 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:38164 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728052AbeIFAJ1 (ORCPT ); Wed, 5 Sep 2018 20:09:27 -0400 Received: by mail-oi0-f66.google.com with SMTP id x197-v6so15932689oix.5; Wed, 05 Sep 2018 12:37:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BozMFRD6b8JP7Za+m/l6yQcG8PXXn63O1+XHPU/v3vQ=; b=p1tY0ZDUQTpli+ES36iOpJs6CPTjDYOcz3Odv85Nyj6K6QnYC2uoDLi8X6QtlB7yWi c66uP8SUr+YiUm27GVNcoZCSTdNypD5GeCnonstM96s4q5IhHs4aMIMUj+DOOVUrtuPi X7852Ek36agp4ZXMTl498PbYfXluKzUU14mdk3qrrnMmpgft8+NdYVqsK6BHlVMAjAFG aVqQ+Gxx79E965wMNF3Wc3lO6p8PuDxJFY3EoB1UpQurImNeCd03EmAYq9+MAVCPDfxs 97Y3DKQDDzgHMCfvMH9uPbC5htElUz5I7xOG3GC3i7p+6PTxg8Xetc2vurDi6ozCbiAP bduw== X-Gm-Message-State: APzg51DkjnFHj9II6ltFg9pt8JyT/oEbIh2IS3YqHxbYHNdZls7SN9b7 Ks+L+CogeykScb0wtf26GsIvidU= X-Received: by 2002:aca:fd4f:: with SMTP id b76-v6mr32231726oii.307.1536176269471; Wed, 05 Sep 2018 12:37:49 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id u21-v6sm2296053oie.22.2018.09.05.12.37.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Sep 2018 12:37:48 -0700 (PDT) From: Rob Herring To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Michal Simek Subject: [PATCH 08/21] microblaze: get cpu node with of_get_cpu_node Date: Wed, 5 Sep 2018 14:37:25 -0500 Message-Id: <20180905193738.19325-9-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180905193738.19325-1-robh@kernel.org> References: <20180905193738.19325-1-robh@kernel.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org "device_type" use is deprecated for FDT though it has continued to be used for nodes like cpu nodes. Use of_get_cpu_node() instead which works using node names by default. This will allow the eventually removal of cpu device_type properties. Also, fix a leaked reference by adding a missing of_node_put. Cc: Michal Simek Signed-off-by: Rob Herring --- Please ack and I will take via the DT tree. This is dependent on the first 2 patches. arch/microblaze/kernel/cpu/cpuinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.17.1 Tested-by: Michal Simek diff --git a/arch/microblaze/kernel/cpu/cpuinfo.c b/arch/microblaze/kernel/cpu/cpuinfo.c index 96b3f26d16be..0c52aca87478 100644 --- a/arch/microblaze/kernel/cpu/cpuinfo.c +++ b/arch/microblaze/kernel/cpu/cpuinfo.c @@ -89,7 +89,7 @@ static struct device_node *cpu; void __init setup_cpuinfo(void) { - cpu = (struct device_node *) of_find_node_by_type(NULL, "cpu"); + cpu = of_get_cpu_node(0, NULL); if (!cpu) pr_err("You don't have cpu!!!\n"); @@ -117,6 +117,8 @@ void __init setup_cpuinfo(void) if (cpuinfo.mmu_privins) pr_warn("%s: Stream instructions enabled" " - USERSPACE CAN LOCK THIS KERNEL!\n", __func__); + + of_node_put(cpu); } void __init setup_cpuinfo_clk(void)