From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=shenglei.zhang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 44CCE21BADAB2 for ; Mon, 13 Aug 2018 19:18:35 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Aug 2018 19:18:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,236,1531810800"; d="scan'208";a="76473913" Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by fmsmga002.fm.intel.com with ESMTP; 13 Aug 2018 19:18:34 -0700 From: shenglei To: edk2-devel@lists.01.org Cc: Jiewen Yao Date: Tue, 14 Aug 2018 10:18:28 +0800 Message-Id: <20180814021828.16936-1-shenglei.zhang@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 Subject: [PATCH v2] SignedCapsulePkg: Remove redundant things in inf, .h and .c files X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 02:18:36 -0000 Two redundant library classes have been removed. The redundant function "IsSystemFmp" has been removed. https://bugzilla.tianocore.org/show_bug.cgi?id=1067 v2: Remove DxeServicesLib from SystemFirmwareUpdateDxe.inf. Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: shenglei Reviewed-by: Jiewen Yao --- .../SystemFirmwareCommonDxe.c | 27 ------------------- .../SystemFirmwareUpdate/SystemFirmwareDxe.h | 1 - .../SystemFirmwareReportDxe.inf | 2 -- .../SystemFirmwareUpdateDxe.inf | 1 - 4 files changed, 31 deletions(-) diff --git a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCommonDxe.c b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCommonDxe.c index 7f7a9a1982..8e16763597 100644 --- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCommonDxe.c +++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCommonDxe.c @@ -343,31 +343,4 @@ InitializePrivateData ( return EFI_SUCCESS; } -/** - Return if this FMP is a system FMP or a device FMP, based upon FmpImageInfo. - - @param[in] FmpImageInfo A pointer to EFI_FIRMWARE_IMAGE_DESCRIPTOR - - @retval TRUE It is a system FMP. - @retval FALSE It is a device FMP. -**/ -BOOLEAN -IsSystemFmp ( - IN EFI_FIRMWARE_IMAGE_DESCRIPTOR *FmpImageInfo - ) -{ - GUID *Guid; - UINTN Count; - UINTN Index; - - Guid = PcdGetPtr(PcdSystemFmpCapsuleImageTypeIdGuid); - Count = PcdGetSize(PcdSystemFmpCapsuleImageTypeIdGuid) / sizeof(GUID); - for (Index = 0; Index < Count; Index++, Guid++) { - if (CompareGuid(&FmpImageInfo->ImageTypeId, Guid)) { - return TRUE; - } - } - - return FALSE; -} diff --git a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareDxe.h b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareDxe.h index 999b2b2501..cd6601e815 100644 --- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareDxe.h +++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareDxe.h @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf index cc9614ef14..b15736cf0d 100644 --- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf +++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.inf @@ -50,9 +50,7 @@ HobLib UefiRuntimeServicesTableLib UefiDriverEntryPoint - DxeServicesLib DxeServicesTableLib - PrintLib EdkiiSystemCapsuleLib [Pcd] diff --git a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf index 2695fb6eb5..7ddea3679e 100644 --- a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf +++ b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.inf @@ -51,7 +51,6 @@ HobLib UefiRuntimeServicesTableLib UefiDriverEntryPoint - DxeServicesLib EdkiiSystemCapsuleLib PlatformFlashAccessLib IniParsingLib -- 2.18.0.windows.1