From nobody Fri May 3 22:36:37 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+90742+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+90742+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1656048857325898.8387776088111; Thu, 23 Jun 2022 22:34:17 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id F5QqYY1788612xyikNDGmCMu; Thu, 23 Jun 2022 22:34:17 -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.web12.1290.1656025122596675239 for ; Thu, 23 Jun 2022 15:58:42 -0700 X-Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-240-TElpvLA0OmS3WyeoEZO75g-1; Thu, 23 Jun 2022 18:58:40 -0400 X-MC-Unique: TElpvLA0OmS3WyeoEZO75g-1 X-Received: by mail-lf1-f71.google.com with SMTP id bp15-20020a056512158f00b0047f603e5f92so382761lfb.20 for ; Thu, 23 Jun 2022 15:58:40 -0700 (PDT) X-Gm-Message-State: Lieg1BKH8T3E5lFihNp2TUx7x1787277AA= X-Received: by 2002:a05:6512:114e:b0:47f:5f76:22bb with SMTP id m14-20020a056512114e00b0047f5f7622bbmr7134433lfg.648.1656025119167; Thu, 23 Jun 2022 15:58:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tHSYBMD5G0dTCHhbNMmVRHaSUleVNPPSbqmyKSGibQig+3dEp33K3b7JDDRSKy62UN8G7XQQ== X-Received: by 2002:a05:6512:114e:b0:47f:5f76:22bb with SMTP id m14-20020a056512114e00b0047f5f7622bbmr7134412lfg.648.1656025118824; Thu, 23 Jun 2022 15:58:38 -0700 (PDT) X-Received: from localhost.localdomain ([93.177.91.185]) by smtp.gmail.com with ESMTPSA id t11-20020ac24c0b000000b0047f8e9826a1sm66840lfq.31.2022.06.23.15.58.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Jun 2022 15:58:38 -0700 (PDT) From: =?UTF-8?B?UGF3ZcWCIFBvxYJhd3NraQ==?= To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar Subject: [edk2-devel] [PATCH v1 1/1] UefiCpuPkg: Coding style bug fix Date: Fri, 24 Jun 2022 00:58:14 +0200 Message-Id: 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=1656048857; bh=8fkXII/3o3Gro/jfKTPcgIj0X2gTQcwL2mgrl0wqpr8=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=Oj4Dyl0jOL3Ljdk2CtO3SRarcNqMRksIk9wRcTzrnxkJ0kpjCehmOjOmKhq3FHvwkMt QgSwBYZo5Y//JBaYhkDgFlaez2tsQU7Qk6J3U11I8PI3h85o8QqLNmbNZ1tFobeSAfSoe JxckQQ7yMahOFpN/LA9HMUrZbRp/T1qAOtM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1656048859357100001 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 --- 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..179063e0d105 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 *SecPlatformInformation2Rec2; 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; + SecPlatformInformation2Rec2 =3D NULL; + Status =3D SecPlatformInformation2Ppi->PlatformIn= formation2 ( + PeiService= s, + &Informati= onSize, + SecPlatfor= mInformation2Rec2 + ); if (Status =3D=3D EFI_BUFFER_TOO_SMALL) { Status =3D PeiServicesAllocatePool ( (UINTN)InformationSize, - (VOID **)&SecPlatformInformation2 + (VOID **)&SecPlatformInformation2Rec2 ); if (Status =3D=3D EFI_SUCCESS) { // @@ -127,10 +127,10 @@ GetBistInfoFromPpi ( Status =3D SecPlatformInformation2Ppi->PlatformInformation2 ( PeiServices, &InformationSize, - SecPlatformInformation2 + SecPlatformInformation2Rec2 ); if (Status =3D=3D EFI_SUCCESS) { - *BistInformationData =3D SecPlatformInformation2; + *BistInformationData =3D SecPlatformInformation2Rec2; 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 *SecPlatformInformation2Rec2; 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; + SecPlatformInformation2Rec2 =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 *)&SecPlatformInformation2Rec2, 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 SecPlatformInformation2Rec2->NumberOfCpus; + CpuInstance =3D SecPlatformInformation2Rec2->CpuInstance; } else { // // Otherwise, get BIST information from Sec Platform Information Ppi @@ -274,7 +274,7 @@ CollectBistDataFromPpi ( (UINTN)BistInformationSize ); =20 - if (SecPlatformInformation2 !=3D NULL) { + if (SecPlatformInformation2Rec2 !=3D NULL) { if (NumberOfData < NumberOfProcessors) { // // Reinstall SecPlatformInformation2 PPI to include new BIST informa= tion --=20 2.34.3 -=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 (#90742): https://edk2.groups.io/g/devel/message/90742 Mute This Topic: https://groups.io/mt/91959143/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-