From mboxrd@z Thu Jan 1 00:00:00 1970 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 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=X6yuGVQ6; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: ppolawsk@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1656025121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vIu9xH0TwPWmaX5x4mbHWxgipHpp74oP/BrpM1h3OUI=; b=X6yuGVQ6tu36r3ikaWhbOiy+KgFVY+qaIJdud04B5iOmPShK9mmiIWs05erT+7uT7/Xlo4 GzHL9Aez1JolnbYYXZcTNgvH2Reve95XaCHle9hJom2m0BOCMAJdk980I5B4/SZa6ueY5j NDBlO0YTYBa0YrNEB4LXXgaS9nqFRj4= 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 Received: by mail-lf1-f71.google.com with SMTP id bp15-20020a056512158f00b0047f603e5f92so382761lfb.20 for ; Thu, 23 Jun 2022 15:58:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JfLA+k2vm7OKjC/BDEvEmlDp/kyjXohIL5QqWOj7NMA=; b=EYKZU4mV2mouLyckQcLD2qKstd6To46duuAYq5K1XLF0xAn3UbgEcGqCfHspfgWe+E J3xNfbJRQxYuWA//vbd7kK8xqz3jPxXmSX4lyY9z+oQZ9k1fAKw050Fxf4risOyBZJOV Xw9rrxvnVayo+22yAZwLsfm18obInQb9mp9tbBvwAVCjeJ6LVVq15yfniJKGBVJ62x72 9RjBTN33WHtN3ap3X/86ovCnM/2DfMGe1L8Nb9LfpHqv3dkwMOmCvtZLuzgfqT1O/SE9 nOzdnyTbvyE1lWKFJ5VvKIQeeS33gLifHUOXnQG/+49PvIeVV4c4CtH3SI8iDzgVtA1K ruzA== X-Gm-Message-State: AJIora/qQ5Wkzhi2Uk6BCEvgCTMDffbX12V8cejaluJ0tPSEzW/effRi Lk3UD/s/WhNJ7GJhWvI1akRPj1xHgiUFPsO9OXHvVhTj+pNhwMCq1aiuOPDig1Z+28mDusFY7KY d1jJnxqsfTj4i24k9xmtF5P7vISquC7wNx4QxbOtsEGxGLDgcSobxXgfKcfpru4B8tg== 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) Return-Path: 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: [PATCH v1 1/1] UefiCpuPkg: Coding style bug fix Date: Fri, 24 Jun 2022 00:58:14 +0200 Message-Id: X-Mailer: git-send-email 2.34.3 In-Reply-To: References: MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ppolawsk@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 ( {=0D EFI_STATUS Status;=0D EFI_SEC_PLATFORM_INFORMATION2_PPI *SecPlatformInformation2Ppi;=0D - EFI_SEC_PLATFORM_INFORMATION_RECORD2 *SecPlatformInformation2;=0D + EFI_SEC_PLATFORM_INFORMATION_RECORD2 *SecPlatformInformation2Rec2;=0D UINT64 InformationSize;=0D =20=0D Status =3D PeiServicesLocatePpi (=0D @@ -108,17 +108,17 @@ GetBistInfoFromPpi ( //=0D // Get the size of the sec platform information2(BSP/APs' BIST data)= =0D //=0D - InformationSize =3D 0;=0D - SecPlatformInformation2 =3D NULL;=0D - Status =3D SecPlatformInformation2Ppi->PlatformInform= ation2 (=0D - PeiServices,= =0D - &InformationSi= ze,=0D - SecPlatformInf= ormation2=0D - );=0D + InformationSize =3D 0;=0D + SecPlatformInformation2Rec2 =3D NULL;=0D + Status =3D SecPlatformInformation2Ppi->PlatformIn= formation2 (=0D + PeiService= s,=0D + &Informati= onSize,=0D + SecPlatfor= mInformation2Rec2=0D + );=0D if (Status =3D=3D EFI_BUFFER_TOO_SMALL) {=0D Status =3D PeiServicesAllocatePool (=0D (UINTN)InformationSize,=0D - (VOID **)&SecPlatformInformation2=0D + (VOID **)&SecPlatformInformation2Rec2=0D );=0D if (Status =3D=3D EFI_SUCCESS) {=0D //=0D @@ -127,10 +127,10 @@ GetBistInfoFromPpi ( Status =3D SecPlatformInformation2Ppi->PlatformInformation2 (=0D PeiServices,=0D &InformationSize,=0D - SecPlatformInformation2=0D + SecPlatformInformation2Rec2= =0D );=0D if (Status =3D=3D EFI_SUCCESS) {=0D - *BistInformationData =3D SecPlatformInformation2;=0D + *BistInformationData =3D SecPlatformInformation2Rec2;=0D if (BistInformationSize !=3D NULL) {=0D *BistInformationSize =3D InformationSize;=0D }=0D @@ -160,7 +160,7 @@ CollectBistDataFromPpi ( {=0D EFI_STATUS Status;=0D EFI_PEI_PPI_DESCRIPTOR *SecInformationDescriptor;=0D - EFI_SEC_PLATFORM_INFORMATION_RECORD2 *SecPlatformInformation2;=0D + EFI_SEC_PLATFORM_INFORMATION_RECORD2 *SecPlatformInformation2Rec2;=0D EFI_SEC_PLATFORM_INFORMATION_RECORD *SecPlatformInformation;=0D UINTN NumberOfData;=0D EFI_SEC_PLATFORM_INFORMATION_CPU *CpuInstance;=0D @@ -186,10 +186,10 @@ CollectBistDataFromPpi ( ASSERT_EFI_ERROR (Status);=0D PlatformInformationRecord2->NumberOfCpus =3D (UINT32)NumberOfProcessors;= =0D =20=0D - SecPlatformInformation2 =3D NULL;=0D - SecPlatformInformation =3D NULL;=0D - NumberOfData =3D 0;=0D - CpuInstance =3D NULL;=0D + SecPlatformInformation2Rec2 =3D NULL;=0D + SecPlatformInformation =3D NULL;=0D + NumberOfData =3D 0;=0D + CpuInstance =3D NULL;=0D //=0D // Get BIST information from Sec Platform Information2 Ppi firstly=0D //=0D @@ -197,15 +197,15 @@ CollectBistDataFromPpi ( PeiServices,=0D &gEfiSecPlatformInformation2PpiGuid,=0D &SecInformationDescriptor,=0D - (VOID *)&SecPlatformInformation2,=0D + (VOID *)&SecPlatformInformation2Rec2,=0D NULL=0D );=0D if (Status =3D=3D EFI_SUCCESS) {=0D //=0D // Sec Platform Information2 PPI includes BSP/APs' BIST information=0D //=0D - NumberOfData =3D SecPlatformInformation2->NumberOfCpus;=0D - CpuInstance =3D SecPlatformInformation2->CpuInstance;=0D + NumberOfData =3D SecPlatformInformation2Rec2->NumberOfCpus;=0D + CpuInstance =3D SecPlatformInformation2Rec2->CpuInstance;=0D } else {=0D //=0D // Otherwise, get BIST information from Sec Platform Information Ppi= =0D @@ -274,7 +274,7 @@ CollectBistDataFromPpi ( (UINTN)BistInformationSize=0D );=0D =20=0D - if (SecPlatformInformation2 !=3D NULL) {=0D + if (SecPlatformInformation2Rec2 !=3D NULL) {=0D if (NumberOfData < NumberOfProcessors) {=0D //=0D // Reinstall SecPlatformInformation2 PPI to include new BIST informa= tion=0D --=20 2.34.3