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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B99E8C001DF for ; Wed, 2 Aug 2023 17:21:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231405AbjHBRVK (ORCPT ); Wed, 2 Aug 2023 13:21:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232122AbjHBRVI (ORCPT ); Wed, 2 Aug 2023 13:21:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44A0011D; Wed, 2 Aug 2023 10:21:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C16A961377; Wed, 2 Aug 2023 17:21:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5E76C433C7; Wed, 2 Aug 2023 17:21:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690996865; bh=V+7J5iMl8WESEj4Cb67K/RCJO33+poqVvT0BwhRiAxM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=IgN5nEWimzIHei44JnWou6LQO2Xz9xfPWdUscdopUP3nSooYinHWCg51jQogAfXCh IkP6GhQ+mWg9fu5H5Ylu5pp8M8S9DubR+sNfef+b7QkdlI3aLBv+VY9kbCSFXNko1M a4LpE7eIjsqQMxv6qZvfVOJI5KaJjkEcsyDVfbPAsTHiTjH7gzARVyv3ls+Rk7dAcw oFluHqcZAfL5yarEIALIealee/EZtOXpNYeHws0R8PE5Cit3KKuP7M7F5RUJEfKHvf 3h90SnbMmrxXFmpJTfEh1knoGeZOmGYAPY2XvZEweDFLZBWuON3IFtLaTBq4zHtY3D S2iJcB24T0hyg== Date: Wed, 2 Aug 2023 18:20:59 +0100 From: Conor Dooley To: Anup Patel Cc: Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Marc Zyngier , Rob Herring , Krzysztof Kozlowski , Frank Rowand , Conor Dooley , Atish Patra , Andrew Jones , Sunil V L , Saravana Kannan , Anup Patel , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v7 01/15] RISC-V: Add riscv_get_intc_hartid() function Message-ID: <20230802-deviancy-vengeful-cbecf4350526@spud> References: <20230802150018.327079-1-apatel@ventanamicro.com> <20230802150018.327079-2-apatel@ventanamicro.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="2kdZzoSQMTLDssYb" Content-Disposition: inline In-Reply-To: <20230802150018.327079-2-apatel@ventanamicro.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org --2kdZzoSQMTLDssYb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 02, 2023 at 08:30:04PM +0530, Anup Patel wrote: > +/* Find hart ID of the INTC fwnode. */ > +int riscv_get_intc_hartid(struct fwnode_handle *node, unsigned long *hartid) > +{ > + int rc; > + u64 temp; > + > + if (!is_of_node(node)) { > + rc = fwnode_property_read_u64_array(node, "hartid", &temp, 1); > + if (!rc) > + *hartid = temp; > + } else > + rc = riscv_of_parent_hartid(to_of_node(node), hartid); This branch needs to be enclosed in braces too. > + > + return rc; > +} > + > DEFINE_PER_CPU(struct riscv_cpuinfo, riscv_cpuinfo); --2kdZzoSQMTLDssYb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZMqQewAKCRB4tDGHoIJi 0oI/AP4mfxD8KI2kW8xjXStGxSzehmET1254kpoBNm9rD/RP+gEAuB0Z2Cgramuw EoCQ4U+WeJmvdDUdCguKiECHDM8AZgo= =w4op -----END PGP SIGNATURE----- --2kdZzoSQMTLDssYb--