From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 56FEEC433F5 for ; Wed, 27 Oct 2021 14:42:43 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 653DC60F6F for ; Wed, 27 Oct 2021 14:42:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 653DC60F6F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=libc.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HfWcw5P1jz3c9h for ; Thu, 28 Oct 2021 01:42:40 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=libc.org (client-ip=216.12.86.13; helo=brightrain.aerifal.cx; envelope-from=dalias@libc.org; receiver=) X-Greylist: delayed 907 seconds by postgrey-1.36 at boromir; Thu, 28 Oct 2021 01:42:16 AEDT Received: from brightrain.aerifal.cx (brightrain.aerifal.cx [216.12.86.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HfWcS5h2yz2xrx for ; Thu, 28 Oct 2021 01:42:15 +1100 (AEDT) Date: Wed, 27 Oct 2021 10:26:54 -0400 From: Rich Felker To: Rob Herring Subject: Re: [PATCH 09/12] sh: Use of_get_cpu_hwid() Message-ID: <20211027142651.GW7074@brightrain.aerifal.cx> References: <20211006164332.1981454-1-robh@kernel.org> <20211006164332.1981454-10-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211006164332.1981454-10-robh@kernel.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Guo Ren , "H. Peter Anvin" , linux-riscv@lists.infradead.org, Will Deacon , Stafford Horne , Jonas Bonn , Florian Fainelli , Yoshinori Sato , linux-sh@vger.kernel.org, x86@kernel.org, Russell King , linux-csky@vger.kernel.org, Ingo Molnar , bcm-kernel-feedback-list@broadcom.com, Catalin Marinas , Palmer Dabbelt , devicetree@vger.kernel.org, Albert Ou , Ray Jui , Stefan Kristiansson , openrisc@lists.librecores.org, Borislav Petkov , Paul Walmsley , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, Scott Branden , Greg Kroah-Hartman , Frank Rowand , James Morse , Paul Mackerras , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Wed, Oct 06, 2021 at 11:43:29AM -0500, Rob Herring wrote: > Replace open coded parsing of CPU nodes' 'reg' property with > of_get_cpu_hwid(). > > Cc: Yoshinori Sato > Cc: Rich Felker > Cc: linux-sh@vger.kernel.org > Signed-off-by: Rob Herring > --- > arch/sh/boards/of-generic.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c > index 921d76fc3358..f7f3e618e85b 100644 > --- a/arch/sh/boards/of-generic.c > +++ b/arch/sh/boards/of-generic.c > @@ -62,9 +62,8 @@ static void sh_of_smp_probe(void) > init_cpu_possible(cpumask_of(0)); > > for_each_of_cpu_node(np) { > - const __be32 *cell = of_get_property(np, "reg", NULL); > - u64 id = -1; > - if (cell) id = of_read_number(cell, of_n_addr_cells(np)); > + u64 id = of_get_cpu_hwid(np, 0); > + > if (id < NR_CPUS) { > if (!method) > of_property_read_string(np, "enable-method", &method); > -- > 2.30.2 Acked-by: Rich Felker