From nobody Thu May 2 14:33:00 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+91087+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+91087+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1657096695; cv=none; d=zohomail.com; s=zohoarc; b=lcGtFyOfJEa+K2v706WcKEIGWKqXgwNWufcf8PSIvB6y/IViGTHmlAaHJZl9tJA72+vcwha5tX/XItmYa2mo2gmGtrJlwpdHHmDIB3InakPv0hYfeWtCwUl9AM08m1bAkhG7vnD9tcSRnEH1ifd6a6ac897FKfGFlXbsCKQn/bU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1657096695; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=vLAkOrQUUx8RiLGO1RreXuTbKi8ZIgHfPLFzMN1XU8U=; b=hgCPKaEu9xpsrI2u6d87wmCtqVmR5axw3HvO/6oqXY00khdALers95M594/ixMeQeaVJqOEXr65kaNmkwH41rSO1K+uVwMEzcbvsUqBMDkVaVYDwG9ul9IzhBINC8Xqr555shAIOQBqiyh86+ZKKVJT6U7aDtnRpcdPRsWgrweA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+91087+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1657096695580895.724977534821; Wed, 6 Jul 2022 01:38:15 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 03qoYY1788612x4Q6sK27CBl; Wed, 06 Jul 2022 01:38:15 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web08.3896.1657096694424209019 for ; Wed, 06 Jul 2022 01:38:14 -0700 X-Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-614-dIYcLyFiNc2hdndMm8-30g-1; Wed, 06 Jul 2022 04:38:12 -0400 X-MC-Unique: dIYcLyFiNc2hdndMm8-30g-1 X-Received: by mail-lf1-f72.google.com with SMTP id bi38-20020a0565120ea600b0047f640eaee0so4863600lfb.4 for ; Wed, 06 Jul 2022 01:38:12 -0700 (PDT) X-Gm-Message-State: D2FGjVN6ba6GZxsvGokP2iTzx1787277AA= X-Received: by 2002:a05:6512:288:b0:484:306d:a4d4 with SMTP id j8-20020a056512028800b00484306da4d4mr4007749lfp.282.1657096690707; Wed, 06 Jul 2022 01:38:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tC13IhKcV/lUEKzKJuWB+KliWGhBHPfEcoTTg6VE79qhOwSbjsJY/iOoGtl1mF73w6g4OMGA== X-Received: by 2002:a05:6512:288:b0:484:306d:a4d4 with SMTP id j8-20020a056512028800b00484306da4d4mr4007729lfp.282.1657096690297; Wed, 06 Jul 2022 01:38:10 -0700 (PDT) X-Received: from fedora.. ([93.177.91.185]) by smtp.gmail.com with ESMTPSA id q14-20020ac24a6e000000b0047255d2117bsm6146095lfp.170.2022.07.06.01.38.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 01:38:09 -0700 (PDT) From: =?UTF-8?B?UGF3ZcWCIFBvxYJhd3NraQ==?= To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar Subject: [edk2-devel][PATCH v2 1/1] UefiCpuPkg: Coding style bug fix Date: Wed, 6 Jul 2022 10:37:54 +0200 Message-Id: <31031bca1bb7c251560c5aafc6d464a0e8b061b3.1657096082.git.ppolawsk@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ppolawsk@redhat.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1657096695; bh=VRb0o0CDpox3nJBCsIrapF6Cj6RUGZdkYrKkILbAtbM=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=r8UNK2Z3pPv8+jn4U3bqrqQsluWrkpaN7tU8IOk4gK1QHCXtxeBfasgxHcHOnwk7y39 8aHXMJDlTuHzIxUd4BpzzLA49M41lKCo7QF1TxpzmX1kt+C8mH4QrMj0Bo5h6F+txBw5X bjOqi8lIAmkBmKi7DLnoK9+YnJSgUc+SimQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1657096697179100007 Content-Type: text/plain; charset="utf-8" Local variable name overlaped with function name. Variable name has been updated to remove name duplication. Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Signed-off-by: Pawe=C5=82 Po=C5=82awski Acked-by: Gerd Hoffmann --- UefiCpuPkg/CpuMpPei/CpuBist.c | 40 ++++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/UefiCpuPkg/CpuMpPei/CpuBist.c b/UefiCpuPkg/CpuMpPei/CpuBist.c index 7dc93cd784d4..32b78e84c727 100644 --- a/UefiCpuPkg/CpuMpPei/CpuBist.c +++ b/UefiCpuPkg/CpuMpPei/CpuBist.c @@ -91,7 +91,7 @@ GetBistInfoFromPpi ( { EFI_STATUS Status; EFI_SEC_PLATFORM_INFORMATION2_PPI *SecPlatformInformation2Ppi; - EFI_SEC_PLATFORM_INFORMATION_RECORD2 *SecPlatformInformation2; + EFI_SEC_PLATFORM_INFORMATION_RECORD2 *SecPlatformInformationRecord2; UINT64 InformationSize; =20 Status =3D PeiServicesLocatePpi ( @@ -108,17 +108,17 @@ GetBistInfoFromPpi ( // // Get the size of the sec platform information2(BSP/APs' BIST data) // - InformationSize =3D 0; - SecPlatformInformation2 =3D NULL; - Status =3D SecPlatformInformation2Ppi->PlatformInform= ation2 ( - PeiServices, - &InformationSi= ze, - SecPlatformInf= ormation2 - ); + InformationSize =3D 0; + SecPlatformInformationRecord2 =3D NULL; + Status =3D SecPlatformInformation2Ppi->Platform= Information2 ( + PeiServi= ces, + &Informa= tionSize, + SecPlatf= ormInformationRecord2 + ); if (Status =3D=3D EFI_BUFFER_TOO_SMALL) { Status =3D PeiServicesAllocatePool ( (UINTN)InformationSize, - (VOID **)&SecPlatformInformation2 + (VOID **)&SecPlatformInformationRecord2 ); if (Status =3D=3D EFI_SUCCESS) { // @@ -127,10 +127,10 @@ GetBistInfoFromPpi ( Status =3D SecPlatformInformation2Ppi->PlatformInformation2 ( PeiServices, &InformationSize, - SecPlatformInformation2 + SecPlatformInformationRecor= d2 ); if (Status =3D=3D EFI_SUCCESS) { - *BistInformationData =3D SecPlatformInformation2; + *BistInformationData =3D SecPlatformInformationRecord2; if (BistInformationSize !=3D NULL) { *BistInformationSize =3D InformationSize; } @@ -160,7 +160,7 @@ CollectBistDataFromPpi ( { EFI_STATUS Status; EFI_PEI_PPI_DESCRIPTOR *SecInformationDescriptor; - EFI_SEC_PLATFORM_INFORMATION_RECORD2 *SecPlatformInformation2; + EFI_SEC_PLATFORM_INFORMATION_RECORD2 *SecPlatformInformationRecord2; EFI_SEC_PLATFORM_INFORMATION_RECORD *SecPlatformInformation; UINTN NumberOfData; EFI_SEC_PLATFORM_INFORMATION_CPU *CpuInstance; @@ -186,10 +186,10 @@ CollectBistDataFromPpi ( ASSERT_EFI_ERROR (Status); PlatformInformationRecord2->NumberOfCpus =3D (UINT32)NumberOfProcessors; =20 - SecPlatformInformation2 =3D NULL; - SecPlatformInformation =3D NULL; - NumberOfData =3D 0; - CpuInstance =3D NULL; + SecPlatformInformationRecord2 =3D NULL; + SecPlatformInformation =3D NULL; + NumberOfData =3D 0; + CpuInstance =3D NULL; // // Get BIST information from Sec Platform Information2 Ppi firstly // @@ -197,15 +197,15 @@ CollectBistDataFromPpi ( PeiServices, &gEfiSecPlatformInformation2PpiGuid, &SecInformationDescriptor, - (VOID *)&SecPlatformInformation2, + (VOID *)&SecPlatformInformationRecord2, NULL ); if (Status =3D=3D EFI_SUCCESS) { // // Sec Platform Information2 PPI includes BSP/APs' BIST information // - NumberOfData =3D SecPlatformInformation2->NumberOfCpus; - CpuInstance =3D SecPlatformInformation2->CpuInstance; + NumberOfData =3D SecPlatformInformationRecord2->NumberOfCpus; + CpuInstance =3D SecPlatformInformationRecord2->CpuInstance; } else { // // Otherwise, get BIST information from Sec Platform Information Ppi @@ -274,7 +274,7 @@ CollectBistDataFromPpi ( (UINTN)BistInformationSize ); =20 - if (SecPlatformInformation2 !=3D NULL) { + if (SecPlatformInformationRecord2 !=3D NULL) { if (NumberOfData < NumberOfProcessors) { // // Reinstall SecPlatformInformation2 PPI to include new BIST informa= tion --=20 2.36.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#91087): https://edk2.groups.io/g/devel/message/91087 Mute This Topic: https://groups.io/mt/92202424/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-