Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6548527rwp; Tue, 18 Jul 2023 02:01:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlGUWYu9zmDYGV9qSHz2SQzEkKI5YfSybgvw7wpoNBbXfuzDy4+a+uX0oa2Ua0Gxq/8ugXaV X-Received: by 2002:a17:903:32c9:b0:1b8:9598:6508 with SMTP id i9-20020a17090332c900b001b895986508mr20073940plr.18.1689670907854; Tue, 18 Jul 2023 02:01:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689670907; cv=none; d=google.com; s=arc-20160816; b=koknrPXgUl80clGiWs4IQ3QLlSP+P8FrqPtfDXUYwsq9cfxyNdw+y0/tzlDweVdL52 SNpM5WWXj266lf1jYdk1au4qExFyJMDSg1CU7yR+gbyGrcXF+HiALMUmWfiLt1Q9tQY5 9YZ01vZya1UdnzDQN/zFiqRZ75oxEZvSsCMR5tNu0/8thFrrKPxi8+PLF/xijDUK7qfd gIav9NtyQ2g2rFdtcnaTfOKXc5Q3QcUkRjpl9dUiqPQ4G2UAacsFeTa22VB4hvogTkU9 tBvjKTG7cNms8umhb9me689pxc7eDoDzYa89GWuouGmqt3O7nxAVx4vEbKVgZUrcV1VH Z91A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=imRJhX+DAuePTiIrZx6zj99NPqO51ElDCVb4S9mNRCY=; fh=FI1Ca5vFHkU5m52Aw6CGEsFeQ3wMFkLotNkM+sWbdAs=; b=Cj5cEQDLHvm4+NivG7DSYiCH37AJ8zVLO9qf1SZ76Pqtb+RA1JHWgGoVL9rUdmU9eD H8xGZF+QEejjDtP2n+el4mXXzKJZaEO7geC6iYVk+zwQyi6p7+aPSe6iU5ziRCu8F43N STBva/7PgeP97M1phn3nuW/Nsq8JOH5mg6oFopcYnEBtlHuUVNBdOutwqsZBlrZPfaGP IEgHFL/PstVJyohTXPttw/a/HoAfqwEnLMkM1rgK4W1WrJ0zTx1xWPDp9cV200uEiMGJ lsU+Da7zztFxLq+O0r2xsoRryMacQETVmqrek/ygF3FRjx4XXGDuoOq/LZ6XVjnINk16 mjuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b6-20020a170902650600b001b8b437b01esi1285610plk.350.2023.07.18.02.01.35; Tue, 18 Jul 2023 02:01:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229901AbjGRIsv (ORCPT + 99 others); Tue, 18 Jul 2023 04:48:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230397AbjGRIss (ORCPT ); Tue, 18 Jul 2023 04:48:48 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4B841197 for ; Tue, 18 Jul 2023 01:48:46 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 851E62F4; Tue, 18 Jul 2023 01:49:29 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EB6AE3F67D; Tue, 18 Jul 2023 01:48:44 -0700 (PDT) Date: Tue, 18 Jul 2023 09:48:42 +0100 From: Sudeep Holla To: Marc Zyngier Cc: Punit Agrawal , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sudeep Holla , Vikram Sethi , Shanker Donthineni Subject: Re: [PATCH] firmware: smccc: Fix use of uninitialised results structure Message-ID: <20230718084842.6edna54m5njijdiz@bogus> References: <20230717171702.424253-1-punit.agrawal@bytedance.com> <86351lvcl9.wl-maz@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86351lvcl9.wl-maz@kernel.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 18, 2023 at 09:38:26AM +0100, Marc Zyngier wrote: > 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? > Sure I will route it via (arm-)soc team. -- Regards, Sudeep