[edk2] [PATCH 2/5] UefiCpuPkg/RegisterCpuFeaturesLib: Remove static type

Jeff Fan posted 5 patches 7 years, 7 months ago
[edk2] [PATCH 2/5] UefiCpuPkg/RegisterCpuFeaturesLib: Remove static type
Posted by Jeff Fan 7 years, 7 months ago
Using one specific name for global variable to save MP services protocol
pointer.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
---
 .../Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.c
index c49f556..74c658a 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/DxeRegisterCpuFeaturesLib.c
@@ -19,7 +19,7 @@
 #include "RegisterCpuFeatures.h"
 
 CPU_FEATURES_DATA          mCpuFeaturesData = {0};
-static EFI_MP_SERVICES_PROTOCOL   *mMpServices = NULL;
+EFI_MP_SERVICES_PROTOCOL   *mCpuFeaturesMpServices = NULL;
 
 /**
   Worker function to get CPU_FEATURES_DATA pointer.
@@ -46,20 +46,20 @@ GetMpProtocol (
 {
   EFI_STATUS             Status;
 
-  if (mMpServices == NULL) {
+  if (mCpuFeaturesMpServices == NULL) {
     //
     // Get MP Services Protocol
     //
     Status = gBS->LocateProtocol (
                   &gEfiMpServiceProtocolGuid,
                   NULL,
-                  (VOID **)&mMpServices
+                  (VOID **)&mCpuFeaturesMpServices
                   );
     ASSERT_EFI_ERROR (Status);
   }
 
-  ASSERT (mMpServices != NULL);
-  return mMpServices;
+  ASSERT (mCpuFeaturesMpServices != NULL);
+  return mCpuFeaturesMpServices;
 }
 
 /**
-- 
2.9.3.windows.2

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel