From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=ruiyu.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 D2AFF211A2DB5 for ; Wed, 19 Dec 2018 18:03:59 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Dec 2018 18:03:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,375,1539673200"; d="scan'208";a="120266014" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 19 Dec 2018 18:03:58 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 19 Dec 2018 18:03:51 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 19 Dec 2018 18:03:51 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.203]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.210]) with mapi id 14.03.0415.000; Thu, 20 Dec 2018 10:03:13 +0800 From: "Ni, Ruiyu" To: "Dong, Eric" , "edk2-devel@lists.01.org" CC: Laszlo Ersek Thread-Topic: [Patch 3/3] UefiCpuPkg/RegisterCpuFeaturesLib: Remove useless function. Thread-Index: AQHUmAGh7j/fne5STUq6h+Ja1MYQ9KWG4LEA Date: Thu, 20 Dec 2018 02:03:12 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BF673A4@SHSMSX104.ccr.corp.intel.com> References: <20181220011553.14900-1-eric.dong@intel.com> <20181220011553.14900-4-eric.dong@intel.com> In-Reply-To: <20181220011553.14900-4-eric.dong@intel.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 3/3] UefiCpuPkg/RegisterCpuFeaturesLib: Remove useless function. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Dec 2018 02:04:00 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Nice cleanup. Reviewed-by: Ruiyu Ni Thanks/Ray > -----Original Message----- > From: Dong, Eric > Sent: Thursday, December 20, 2018 9:16 AM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu ; Laszlo Ersek > Subject: [Patch 3/3] UefiCpuPkg/RegisterCpuFeaturesLib: Remove useless > function. >=20 > Directly call the API instead of create function for it. >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1411 >=20 > Cc: Ruiyu Ni > Cc: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Eric Dong > --- > .../PeiRegisterCpuFeaturesLib.c | 35 +++++-----------= ------ > 1 file changed, 8 insertions(+), 27 deletions(-) >=20 > diff --git > a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c > b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c > index 0bbcb50181..fdd0791c89 100644 > --- > a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c > +++ > b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/PeiRegisterCpuFeaturesLib.c > @@ -67,32 +67,6 @@ GetCpuFeaturesData ( > return CpuInitData; > } >=20 > -/** > - Worker function to get MP PPI service pointer. > - > - @return PEI PPI service pointer. > -**/ > -EFI_PEI_MP_SERVICES_PPI * > -GetMpPpi ( > - VOID > - ) > -{ > - EFI_STATUS Status; > - EFI_PEI_MP_SERVICES_PPI *CpuMpPpi; > - > - // > - // Get MP Services Protocol > - // > - Status =3D PeiServicesLocatePpi ( > - &gEfiPeiMpServicesPpiGuid, > - 0, > - NULL, > - (VOID **)&CpuMpPpi > - ); > - ASSERT_EFI_ERROR (Status); > - return CpuMpPpi; > -} > - > /** > Worker function to return processor index. >=20 > @@ -139,7 +113,14 @@ GetProcessorInformation ( > EFI_PEI_MP_SERVICES_PPI *CpuMpPpi; > EFI_STATUS Status; >=20 > - CpuMpPpi =3D GetMpPpi (); > + Status =3D PeiServicesLocatePpi ( > + &gEfiPeiMpServicesPpiGuid, > + 0, > + NULL, > + (VOID **)&CpuMpPpi > + ); > + ASSERT_EFI_ERROR (Status); > + > Status =3D CpuMpPpi->GetProcessorInfo ( > GetPeiServicesTablePointer(), > CpuMpPpi, > -- > 2.15.0.windows.1