From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 4B42E202E53A7 for ; Tue, 12 Feb 2019 18:23:39 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9CA1EE6A80; Wed, 13 Feb 2019 02:23:38 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-136.rdu2.redhat.com [10.10.120.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89A265C22F; Wed, 13 Feb 2019 02:23:37 +0000 (UTC) To: Eric Dong , edk2-devel@lists.01.org References: <20190213020405.18800-1-eric.dong@intel.com> <20190213020405.18800-2-eric.dong@intel.com> From: Laszlo Ersek Message-ID: Date: Wed, 13 Feb 2019 03:23:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190213020405.18800-2-eric.dong@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 13 Feb 2019 02:23:38 +0000 (UTC) Subject: Re: [Patch 1/3] UefiCpuPkg/RegisterCpuFeaturesLib: Remove useless functions. 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: Wed, 13 Feb 2019 02:23:39 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 02/13/19 03:04, Eric Dong wrote: > Remove useless APIs, simply the code logic. s/simply/simplify/ > > BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1375 > > Cc: Ray Ni > Cc: Laszlo Ersek > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Eric Dong > --- > .../Include/Library/RegisterCpuFeaturesLib.h | 34 --------------- > .../RegisterCpuFeaturesLib.c | 50 ---------------------- > 2 files changed, 84 deletions(-) With the typo fixed: Reviewed-by: Laszlo Ersek Thanks Laszlo > diff --git a/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h b/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h > index 2f7e71c833..073f020d0b 100644 > --- a/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h > +++ b/UefiCpuPkg/Include/Library/RegisterCpuFeaturesLib.h > @@ -166,40 +166,6 @@ IsCpuFeatureInSetting ( > IN UINT32 Feature > ); > > -/** > - Determines if a CPU feature is set in PcdCpuFeaturesCapability bit mask. > - > - @param[in] Feature The bit number of the CPU feature to check in the PCD > - PcdCpuFeaturesCapability. > - > - @retval TRUE The CPU feature is set in PcdCpuFeaturesCapability. > - @retval FALSE The CPU feature is not set in PcdCpuFeaturesCapability. > - > - @note This service could be called by BSP only. > -**/ > -BOOLEAN > -EFIAPI > -IsCpuFeatureCapability ( > - IN UINT32 Feature > - ); > - > -/** > - Determines if a CPU feature is set in PcdCpuFeaturesUserConfiguration bit mask. > - > - @param[in] Feature The bit number of the CPU feature to check in the PCD > - PcdCpuFeaturesUserConfiguration. > - > - @retval TRUE The CPU feature is set in PcdCpuFeaturesUserConfiguration. > - @retval FALSE The CPU feature is not set in PcdCpuFeaturesUserConfiguration. > - > - @note This service could be called by BSP only. > -**/ > -BOOLEAN > -EFIAPI > -IsCpuFeatureUserConfiguration ( > - IN UINT32 Feature > - ); > - > /** > Prepares for the data used by CPU feature detection and initialization. > > diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c > index ed8d526325..3540029079 100644 > --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c > +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeaturesLib.c > @@ -1242,56 +1242,6 @@ IsCpuFeatureInSetting ( > ); > } > > -/** > - Determines if a CPU feature is set in PcdCpuFeaturesCapability bit mask. > - > - @param[in] Feature The bit number of the CPU feature to check in the PCD > - PcdCpuFeaturesCapability > - > - @retval TRUE The CPU feature is set in PcdCpuFeaturesCapability. > - @retval FALSE The CPU feature is not set in PcdCpuFeaturesCapability. > - > - @note This service could be called by BSP only. > -**/ > -BOOLEAN > -EFIAPI > -IsCpuFeatureCapability ( > - IN UINT32 Feature > - ) > -{ > - return IsCpuFeatureSetInCpuPcd ( > - (UINT8 *)PcdGetPtr (PcdCpuFeaturesCapability), > - PcdGetSize (PcdCpuFeaturesCapability), > - Feature > - ); > - > -} > - > -/** > - Determines if a CPU feature is set in PcdCpuFeaturesUserConfiguration bit mask. > - > - @param[in] Feature The bit number of the CPU feature to check in the PCD > - PcdCpuFeaturesUserConfiguration > - > - @retval TRUE The CPU feature is set in PcdCpuFeaturesUserConfiguration. > - @retval FALSE The CPU feature is not set in PcdCpuFeaturesUserConfiguration. > - > - @note This service could be called by BSP only. > -**/ > -BOOLEAN > -EFIAPI > -IsCpuFeatureUserConfiguration ( > - IN UINT32 Feature > - ) > -{ > - return IsCpuFeatureSetInCpuPcd ( > - (UINT8 *)PcdGetPtr (PcdCpuFeaturesUserConfiguration), > - PcdGetSize (PcdCpuFeaturesUserConfiguration), > - Feature > - ); > - > -} > - > /** > Switches to assigned BSP after CPU features initialization. > >