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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7CA3BEB64DA for ; Wed, 19 Jul 2023 06:08:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3pFMo7KA7Y7Qq3pVrUl74z9tZa239BrJSAhfMrOm8JY=; b=mPtAnGIlb605h8 6b8jAiFwOVNiiBg6gQYSS/tdWZvCllkOYFYBk8JABfj5hGEP7+xi2Yx2VUh6iAgpvVredWFHkpB6M vl+0e1fwNNHeH9ctln4sWRfEmpM43pwAbCrMQLjhVZSXy937+ABaepVABYVJmB0uAz08OWg1TzQrc rpPoa272uZEAvdeeIRJpeTdpSGO+OJrRs8JgyfbP9J2PWz8oKycEl0BCNBQPBnoIW9zuQI5V6c0yC GMxRJTvZ33QiP/I4RpS0TBaiUR8SaPREgQ69s8N5oZZn1DrwHPpx7XpWoe+OoRWi1psAOUS6jgbnw qEP7YSvFC4jkNCwPQQ9w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qM0MT-005Z6i-03; Wed, 19 Jul 2023 06:08:33 +0000 Received: from desiato.infradead.org ([90.155.92.199]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qM0MP-005Z4r-0f for linux-arm-kernel@bombadil.infradead.org; Wed, 19 Jul 2023 06:08:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:MIME-Version:References: In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=zxBuLqWFsaoQBrZjXkiy6x3MQY4GjC1vBhYvjMnlsQs=; b=V7VuL+1ZpQXzT8ccVE0+jdkTKu f4XSCTdW20R/NHFT9RR2kzplPNa+FX+vNraiUInMH8hspcSTuQZrxKjTQHRcQr8JMnCeSErT94wq1 bwUFY9GIgVh7+F3qiwMsQ8R7jUBh+PWaP28C0WrQ0dZf4AFr7gpwdyopayGcJN3xSm3glxNxeWKDE pBSV7+rDbMc32/8OpQ/775gE3pVb1IxY+3DDjfebwkHBSvDLfiDte0TQxX5J2Wa7E84NL5sGZ0eTL UNNiRaAr3qHqIkxBShaXycU6J0DAhEkjZah8Ap/YlMPe5NR8pa6teIoEcjoSzxB5Vs6/TAEMTyscG VSpdJiig==; Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qLgEC-00BJPN-37 for linux-arm-kernel@lists.infradead.org; Tue, 18 Jul 2023 08:38:43 +0000 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 246AA611DF; Tue, 18 Jul 2023 08:38:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D23BC4160E; Tue, 18 Jul 2023 08:38:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689669509; bh=mBzdz1+zGo4OGF4RbMLBZa0bdU4OVhGULkKCfrVy5gY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=G87Lw1v1/JJWw2Esl16WVFIRDfAkXhiq/r6KeQe1miMPoEtCZSNB1V9ZPRfY/7zA/ 0LKihbS/qwJByyqtGJhaOzjQ9LHTzyWP3hMUl0cxT6tDik6wb9jJbMftT+tbTc1kqI OWxrIMoayU4qVebK06vh65i0sGPh9jT8QxkTOeyh5v5ECjwgiF7ft/g6c2p2OtWAA4 PfibXFfXqG2ZDnEW333Df0d14rdz6TRuMNuwgyWxLEadkRW5aFND5cCg441OfHmsdV eJQMK+rOu/nRb1jp31NUYIJUdxgkU38sUWWLUlPaAJ1DmRRtFLy8dFTcIhfJ7S258I qIu79ls2RsIhw== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1qLgDy-00DynT-Sa; Tue, 18 Jul 2023 09:38:26 +0100 Date: Tue, 18 Jul 2023 09:38:26 +0100 Message-ID: <86351lvcl9.wl-maz@kernel.org> From: Marc Zyngier To: Punit Agrawal Cc: sudeep.holla@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Vikram Sethi , Shanker Donthineni Subject: Re: [PATCH] firmware: smccc: Fix use of uninitialised results structure In-Reply-To: <20230717171702.424253-1-punit.agrawal@bytedance.com> References: <20230717171702.424253-1-punit.agrawal@bytedance.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: punit.agrawal@bytedance.com, sudeep.holla@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, vsethi@nvidia.com, sdonthineni@nvidia.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230718_093841_634254_64A5B948 X-CRM114-Status: GOOD ( 23.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, 17 Jul 2023 18:17:02 +0100, Punit Agrawal wrote: > > Commit 35727af2b15d ("irqchip/gicv3: Workaround for NVIDIA erratum > T241-FABRIC-4") moved the initialisation of the SoC version to > arm_smccc_version_init() but forgot to update the results structure > and it's usage. > > Fix the use of the uninitialised results structure and update the > error strings. > > Fixes: 35727af2b15d ("irqchip/gicv3: Workaround for NVIDIA erratum T241-FABRIC-4") > Signed-off-by: Punit Agrawal > Cc: Sudeep Holla > Cc: Marc Zyngier > Cc: Vikram Sethi > Cc: Shanker Donthineni > --- > drivers/firmware/smccc/soc_id.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/firmware/smccc/soc_id.c b/drivers/firmware/smccc/soc_id.c > index 890eb454599a..1990263fbba0 100644 > --- a/drivers/firmware/smccc/soc_id.c > +++ b/drivers/firmware/smccc/soc_id.c > @@ -34,7 +34,6 @@ static struct soc_device_attribute *soc_dev_attr; > > static int __init smccc_soc_init(void) > { > - struct arm_smccc_res res; > int soc_id_rev, soc_id_version; > static char soc_id_str[20], soc_id_rev_str[12]; > static char soc_id_jep106_id_str[12]; > @@ -49,13 +48,13 @@ static int __init smccc_soc_init(void) > } > > if (soc_id_version < 0) { > - pr_err("ARCH_SOC_ID(0) returned error: %lx\n", res.a0); > + pr_err("Invalid SoC Version: %x\n", soc_id_version); > return -EINVAL; > } > > soc_id_rev = arm_smccc_get_soc_id_revision(); > if (soc_id_rev < 0) { > - pr_err("ARCH_SOC_ID(1) returned error: %lx\n", res.a0); > + pr_err("Invalid SoC Revision: %x\n", soc_id_rev); > return -EINVAL; > } > Ah, indeed. Well caught. FWIW: Acked-by: Marc Zyngier Sudeep, I assume you'll take that one directly? Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel