From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 20B6920D2C3B9 for ; Sun, 26 Mar 2017 20:02:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490583732; x=1522119732; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=HRVY+DMfFmNSc3lr+PTS2oXnxuMQ1d92sOZbuapu/60=; b=B66+d0MJ+Pn+6xcTiE2pazW+VW2YkqwdPQPgkC6/xqxo7zR+Dr+EXgVH SyHBBoyJocBPnqxDeMRVPqidziddPQ==; Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Mar 2017 20:02:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,229,1486454400"; d="scan'208";a="1127411325" Received: from jfan12-desk.ccr.corp.intel.com ([10.239.158.57]) by fmsmga001.fm.intel.com with ESMTP; 26 Mar 2017 20:02:09 -0700 From: Jeff Fan To: edk2-devel@lists.01.org Cc: Feng Tian , Michael Kinney Date: Mon, 27 Mar 2017 11:02:01 +0800 Message-Id: <20170327030204.13572-3-jeff.fan@intel.com> X-Mailer: git-send-email 2.9.3.windows.2 In-Reply-To: <20170327030204.13572-1-jeff.fan@intel.com> References: <20170327030204.13572-1-jeff.fan@intel.com> Subject: [PATCH 2/5] UefiCpuPkg/RegisterCpuFeaturesLib: Remove static type X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Mar 2017 03:02:12 -0000 Using one specific name for global variable to save MP services protocol pointer. Cc: Feng Tian Cc: Michael Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan --- .../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