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.20; helo=mga02.intel.com; envelope-from=eric.dong@intel.com; receiver=edk2-devel@lists.01.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (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 37CF822280C25 for ; Tue, 26 Dec 2017 23:22:09 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Dec 2017 23:27:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,464,1508828400"; d="scan'208";a="190067303" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga005.fm.intel.com with ESMTP; 26 Dec 2017 23:27:03 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 26 Dec 2017 23:27:03 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.159]) by shsmsx102.ccr.corp.intel.com ([169.254.2.189]) with mapi id 14.03.0319.002; Wed, 27 Dec 2017 15:27:01 +0800 From: "Dong, Eric" To: "Song, BinX" , "edk2-devel@lists.01.org" CC: "lersek@redhat.com" Thread-Topic: [PATCH] UefiCpuPkg: Delete redundant PcdGetSize PcdCpuFeaturesSupport Thread-Index: AdN6U2gueNnh2o8OSmKXJjtoZAd22AEkKEJg Date: Wed, 27 Dec 2017 07:27:01 +0000 Message-ID: References: <559D2DF22BC9A3468B4FA1AA547F0EF1025C83D3@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <559D2DF22BC9A3468B4FA1AA547F0EF1025C83D3@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] UefiCpuPkg: Delete redundant PcdGetSize PcdCpuFeaturesSupport X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Dec 2017 07:22:09 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong -----Original Message----- From: Song, BinX=20 Sent: Thursday, December 21, 2017 8:01 PM To: edk2-devel@lists.01.org Cc: Dong, Eric ; lersek@redhat.com Subject: [PATCH] UefiCpuPkg: Delete redundant PcdGetSize PcdCpuFeaturesSupp= ort When CpuCommonFeaturesLib use RegisterCpuFeaturesLib to register CPU featur= es, the CpuFeaturesData->BitMaskSize has already been initialized. So delet= e redundant PcdGetSize PcdCpuFeaturesSupport in CpuInitDataInitialize. Cc: Eric Dong Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bell Song --- UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 1 - 1 file changed, 1 deletion(-) diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitializ= e.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c index b8f76f1..2fbde34 100644 --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c @@ -149,7 +149,6 @@ CpuInitDataInitialize ( CpuFeaturesData =3D GetCpuFeaturesData (); CpuFeaturesData->InitOrder =3D AllocateZeroPool (sizeof (CPU_FEATURES_IN= IT_ORDER) * NumberOfCpus); ASSERT (CpuFeaturesData->InitOrder !=3D NULL); - CpuFeaturesData->BitMaskSize =3D (UINT32) PcdGetSize (PcdCpuFeaturesSupp= ort); =20 // // Collect CPU Features information -- 2.10.2.windows.1