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.web08.3896.1657096694424209019 for ; Wed, 06 Jul 2022 01:38:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OtKngokd; 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=1657096693; 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=xhecV00ao3LachI0YhZ2LnUKaVmWdKwtkFNoM5sK04M=; b=OtKngokdz4gQTm48xbrLprtEV6tz13Yy2NsQst361FderVp6m2WVbdLDWhq000vl8fq36B Wj1L6eJrfgFxGRrSdytcg6FMuC+hyQA0LSezWeNqo/wEzWjbohLok/EIGod3wenwsPMTcb /MAYmCmvoZqOrynfkk0NU3+m1hZLIHE= 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 Received: by mail-lf1-f72.google.com with SMTP id bi38-20020a0565120ea600b0047f640eaee0so4863600lfb.4 for ; Wed, 06 Jul 2022 01:38:12 -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=PMB6u/jtuZzyVW7X4xXfp3voT/NGQmL2NSGlgLTLSXU=; b=jcyeaBYdQ7bfHy9vhqgDBP02H915dhIPTbFtHoD/60WEc2VdIh31r/HxD7Xdf3Ah4o hExUPHq+nXLMLJQR+wX1GRY3G7DI/eDcAxSqaLWkbXj/UFD0cIe/VPMa8iP+t+69qMx2 ecpC7l7mDR4YX/xFlk48s5Jp8SOjWB1gikOxs8131QXE+P6kRGoURqRkSPkMW/s+wawR EvnmlCLSgPbjW/Z+ZWktW72jhpHCLrgGfgenSTeZXJXq5tK5O8s3eIuhNGXuvYwcG3RK Z8NCsX8/1YuH76en8WXMhUmHOtcD1Jm7r8s9160jJKFNRwC2MpunEGyfs71yC/oYn+xc Y0wQ== X-Gm-Message-State: AJIora/oS6mwjBtbR0sz8dLbdM6idFnZ8ie7OOFCzgz2OfkzfG8oe26+ jIuTtFZCuFqHJI3CN+JM1lJiVIR+C9xVyKX5NTrA115T//K+f2Gv9z9cGgqoKO2TmCRxi4mOn+D iH4HNdkxxtW3vt+NYWlXSBAXV8GhLHRsamWkeWhBnr5gUVxV/D3IXKbadTjDiNi7qQg== 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) Return-Path: 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> X-Mailer: git-send-email 2.36.1 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..32b78e84c727 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 *SecPlatformInformationRecord2;=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 + SecPlatformInformationRecord2 =3D NULL;=0D + Status =3D SecPlatformInformation2Ppi->Platform= Information2 (=0D + PeiServi= ces,=0D + &Informa= tionSize,=0D + SecPlatf= ormInformationRecord2=0D + );=0D if (Status =3D=3D EFI_BUFFER_TOO_SMALL) {=0D Status =3D PeiServicesAllocatePool (=0D (UINTN)InformationSize,=0D - (VOID **)&SecPlatformInformation2=0D + (VOID **)&SecPlatformInformationRecord2=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 + SecPlatformInformationRecor= d2=0D );=0D if (Status =3D=3D EFI_SUCCESS) {=0D - *BistInformationData =3D SecPlatformInformation2;=0D + *BistInformationData =3D SecPlatformInformationRecord2;=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 *SecPlatformInformationRecord2;=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 + SecPlatformInformationRecord2 =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 *)&SecPlatformInformationRecord2,=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 SecPlatformInformationRecord2->NumberOfCpus;=0D + CpuInstance =3D SecPlatformInformationRecord2->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 (SecPlatformInformationRecord2 !=3D NULL) {=0D if (NumberOfData < NumberOfProcessors) {=0D //=0D // Reinstall SecPlatformInformation2 PPI to include new BIST informa= tion=0D --=20 2.36.1