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 D50DAEB64DA for ; Wed, 19 Jul 2023 08:11:24 +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:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=y5yD4TyU/874Vh6T1ReRcaaEnU/nHFhT26tYhuQ0N5Q=; b=UMZ5ywnxwCPBjQ XWwWOOAv8pVVP8wwCuePqgmqF9rSM8LFECeRMKjHNsTQ/TDxyjP140U9qgh9sihJluH1yFjlwCCiW /sncut7+VhC6r06vZREjFX5BPKaoIvZcQWpRSnQHrL9fMiOhrciizvNE4ptYlM8rXrTf7d1nss1l2 gngsvFlOyDYiTrOLWoWA5QBcg51zL9+vxTepvSljdSgoJsVNWwpFeCvcdPPlY3fAe5Gyco23Pqplc WCHvDh9Ks82/gqDMZkZkeHyqmzUXVmD57kdCaX+BK1DTGgynbgtu6fD1AdJ3plLOI/8GMom4Ap6Cf V92//EU+PdkRlicPmosw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qM2H8-006FeZ-1t; Wed, 19 Jul 2023 08:11:10 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qM2Gx-006FWb-2E for linux-arm-kernel@lists.infradead.org; Wed, 19 Jul 2023 08:11:01 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3fbea147034so61417265e9.0 for ; Wed, 19 Jul 2023 01:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1689754252; x=1690359052; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=DB8criZo6AbFo5qjEs0dVBSfJlNbNWGYcf/cf1O+Q8E=; b=JT/wM98mQbJ6ia2uQQPCmPE6EnHODf6qSp3Fn5jk+PJun5XjQCksasfNWUWVQ8OhD+ rmxUvnuEdLSrCdv4j79PBCzvoYFMQmjLNUfHsePnysaFTHtzqHCT4i1ybRLQTCvTKZso ss/jbIj9tXnMEe3L7Qrwxm2zsJQpF4FnEjGytizn6s3zcF+xdQTfd0+wRB1pWyoisuFy PSWgUE6Z0DSqoCfSZRlLedDbcQDbkoziVT2GMy6w5qrZMTe8UJLGwv7VjGhDqu1K3WSh HR/FqU+b7YPbxNIK32Hnj+XHe7HzvMdixJpL8UHCBoQmdletTr3vMVEYaE8SPt621+nl FHBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689754252; x=1690359052; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=DB8criZo6AbFo5qjEs0dVBSfJlNbNWGYcf/cf1O+Q8E=; b=F/X1thIu0q6E5pI19KqfiDKEJrEdS3JeZqB/SKtmiVgxTu5PLwlAUyHkEhQ/EcAGUa 4oQghZv1cSeaK+TYv8w1XX4uff1+qcEoToG0mi8OssuKeWwW1PF3lh/qPq6xYmrbGoW8 eYyfvos2kUEIRp243bk4jDrXBxawTMJ8GG0P8i4PXI1dwAUdzEhD8SpUG+5H+F4TEHyd pXna3r6XM7yiMVZ3n+ZbSZnt8Z1smNPWCyrxr17pJtzIqZ2jALGZl2HzaO60vxnL9gdB zkl1c+WAS6lzxNsGBp5QiaIiwa+Gy/t4SvEEymx7nhrlZS/2+dNhuAfebV9uEX872ctl fueQ== X-Gm-Message-State: ABy/qLaNiZ4Ijv90ouhdymsQcLVM2B9TOArUUO5nOs8LfizPiAxmLYy2 /yUtZD7DnpDw/lvCmzHPSQ7pZcvqW5j3UtgIvwIuMw== X-Google-Smtp-Source: APBJJlEBFVOmFB+WVGVADDPKUznecdigzGyP+Ynvi9/LBFS6Ki5yO1dCyRU/KhCg1u1K5YNfCmCCLA== X-Received: by 2002:a1c:7709:0:b0:3f5:878:c0c2 with SMTP id t9-20020a1c7709000000b003f50878c0c2mr1335024wmi.3.1689754252431; Wed, 19 Jul 2023 01:10:52 -0700 (PDT) Received: from localhost ([95.148.15.113]) by smtp.gmail.com with ESMTPSA id n19-20020a7bc5d3000000b003fc02e8ea68sm1073654wmk.13.2023.07.19.01.10.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 01:10:52 -0700 (PDT) From: Punit Agrawal To: Sudeep Holla Cc: Marc Zyngier , Punit Agrawal , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Vikram Sethi , Shanker Donthineni Subject: Re: [External] Re: [PATCH] firmware: smccc: Fix use of uninitialised results structure In-Reply-To: <20230718084842.6edna54m5njijdiz@bogus> (Sudeep Holla's message of "Tue, 18 Jul 2023 09:48:42 +0100") References: <20230717171702.424253-1-punit.agrawal@bytedance.com> <86351lvcl9.wl-maz@kernel.org> <20230718084842.6edna54m5njijdiz@bogus> Date: Wed, 19 Jul 2023 09:10:51 +0100 Message-ID: <87a5vsb9tg.fsf@bytedance.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230719_011059_734584_A0AF2184 X-CRM114-Status: GOOD ( 22.00 ) 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 Sudeep Holla writes: > 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 Thanks Marc. >> Sudeep, I assume you'll take that one directly? >> > > Sure I will route it via (arm-)soc team. Sudeep, hope you can add the tag while applying. Let me know if you'd like me to resend. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel