public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Paweł Poławski" <ppolawsk@redhat.com>
To: devel@edk2.groups.io
Cc: Eric Dong <eric.dong@intel.com>, Ray Ni <ray.ni@intel.com>,
	Rahul Kumar <rahul1.kumar@intel.com>
Subject: [edk2-devel][PATCH v2 1/1] UefiCpuPkg: Coding style bug fix
Date: Wed,  6 Jul 2022 10:37:54 +0200	[thread overview]
Message-ID: <31031bca1bb7c251560c5aafc6d464a0e8b061b3.1657096082.git.ppolawsk@redhat.com> (raw)
In-Reply-To: <cover.1657096082.git.ppolawsk@redhat.com>

Local variable name overlaped with function name.
Variable name has been updated to remove name duplication.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>

Signed-off-by: Paweł Poławski <ppolawsk@redhat.com>
---
 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;
 
   Status = PeiServicesLocatePpi (
@@ -108,17 +108,17 @@ GetBistInfoFromPpi (
     //
     // Get the size of the sec platform information2(BSP/APs' BIST data)
     //
-    InformationSize         = 0;
-    SecPlatformInformation2 = NULL;
-    Status                  = SecPlatformInformation2Ppi->PlatformInformation2 (
-                                                            PeiServices,
-                                                            &InformationSize,
-                                                            SecPlatformInformation2
-                                                            );
+    InformationSize               = 0;
+    SecPlatformInformationRecord2 = NULL;
+    Status                        = SecPlatformInformation2Ppi->PlatformInformation2 (
+                                                                  PeiServices,
+                                                                  &InformationSize,
+                                                                  SecPlatformInformationRecord2
+                                                                  );
     if (Status == EFI_BUFFER_TOO_SMALL) {
       Status = PeiServicesAllocatePool (
                  (UINTN)InformationSize,
-                 (VOID **)&SecPlatformInformation2
+                 (VOID **)&SecPlatformInformationRecord2
                  );
       if (Status == EFI_SUCCESS) {
         //
@@ -127,10 +127,10 @@ GetBistInfoFromPpi (
         Status = SecPlatformInformation2Ppi->PlatformInformation2 (
                                                PeiServices,
                                                &InformationSize,
-                                               SecPlatformInformation2
+                                               SecPlatformInformationRecord2
                                                );
         if (Status == EFI_SUCCESS) {
-          *BistInformationData = SecPlatformInformation2;
+          *BistInformationData = SecPlatformInformationRecord2;
           if (BistInformationSize != NULL) {
             *BistInformationSize = 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 = (UINT32)NumberOfProcessors;
 
-  SecPlatformInformation2 = NULL;
-  SecPlatformInformation  = NULL;
-  NumberOfData            = 0;
-  CpuInstance             = NULL;
+  SecPlatformInformationRecord2 = NULL;
+  SecPlatformInformation        = NULL;
+  NumberOfData                  = 0;
+  CpuInstance                   = 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 == EFI_SUCCESS) {
     //
     // Sec Platform Information2 PPI includes BSP/APs' BIST information
     //
-    NumberOfData = SecPlatformInformation2->NumberOfCpus;
-    CpuInstance  = SecPlatformInformation2->CpuInstance;
+    NumberOfData = SecPlatformInformationRecord2->NumberOfCpus;
+    CpuInstance  = SecPlatformInformationRecord2->CpuInstance;
   } else {
     //
     // Otherwise, get BIST information from Sec Platform Information Ppi
@@ -274,7 +274,7 @@ CollectBistDataFromPpi (
     (UINTN)BistInformationSize
     );
 
-  if (SecPlatformInformation2 != NULL) {
+  if (SecPlatformInformationRecord2 != NULL) {
     if (NumberOfData < NumberOfProcessors) {
       //
       // Reinstall SecPlatformInformation2 PPI to include new BIST information
-- 
2.36.1


  reply	other threads:[~2022-07-06  8:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06  8:37 [edk2-devel][PATCH v2 0/1] Coding style violation fix Paweł Poławski
2022-07-06  8:37 ` Paweł Poławski [this message]
2022-07-12  8:41   ` [edk2-devel][PATCH v2 1/1] UefiCpuPkg: Coding style bug fix Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=31031bca1bb7c251560c5aafc6d464a0e8b061b3.1657096082.git.ppolawsk@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox