* [PATCH] SignedCapsulePkg: Remove redundant things in inf, .h and .c files
@ 2018-08-10 6:10 shenglei
2018-08-10 7:34 ` Yao, Jiewen
0 siblings, 1 reply; 3+ messages in thread
From: shenglei @ 2018-08-10 6:10 UTC (permalink / raw)
To: edk2-devel; +Cc: Jiewen Yao
Two redundant library classes have been removed.
The redundant function "IsSystemFmp" has been removed.
https://bugzilla.tianocore.org/show_bug.cgi?id=1067
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: shenglei <shenglei.zhang@intel.com>
---
.../SystemFirmwareCommonDxe.c | 27 -------------------
.../SystemFirmwareUpdate/SystemFirmwareDxe.h | 1 -
.../SystemFirmwareReportDxe.inf | 2 --
3 files changed, 30 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 <Library/UefiDriverEntryPoint.h>
#include <Library/DevicePathLib.h>
#include <Library/HobLib.h>
-#include <Library/DxeServicesLib.h>
#include <Library/DxeServicesTableLib.h>
#include <Library/PlatformFlashAccessLib.h>
#include <Library/EdkiiSystemCapsuleLib.h>
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]
--
2.18.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] SignedCapsulePkg: Remove redundant things in inf, .h and .c files
2018-08-10 6:10 [PATCH] SignedCapsulePkg: Remove redundant things in inf, .h and .c files shenglei
@ 2018-08-10 7:34 ` Yao, Jiewen
2018-08-10 8:42 ` Zeng, Star
0 siblings, 1 reply; 3+ messages in thread
From: Yao, Jiewen @ 2018-08-10 7:34 UTC (permalink / raw)
To: Zhang, Shenglei, edk2-devel@lists.01.org
Reviewed-by: Jiewen.yao@intel.com
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> shenglei
> Sent: Friday, August 10, 2018 2:11 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen.yao@intel.com>
> Subject: [edk2] [PATCH] SignedCapsulePkg: Remove redundant things in inf, .h
> and .c files
>
> Two redundant library classes have been removed.
> The redundant function "IsSystemFmp" has been removed.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1067
>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: shenglei <shenglei.zhang@intel.com>
> ---
> .../SystemFirmwareCommonDxe.c | 27 -------------------
> .../SystemFirmwareUpdate/SystemFirmwareDxe.h | 1 -
> .../SystemFirmwareReportDxe.inf | 2 --
> 3 files changed, 30 deletions(-)
>
> diff --git
> a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCom
> monDxe.c
> b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCom
> monDxe.c
> index 7f7a9a1982..8e16763597 100644
> ---
> a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCom
> monDxe.c
> +++
> b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCom
> monDxe.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 <Library/UefiDriverEntryPoint.h>
> #include <Library/DevicePathLib.h>
> #include <Library/HobLib.h>
> -#include <Library/DxeServicesLib.h>
> #include <Library/DxeServicesTableLib.h>
> #include <Library/PlatformFlashAccessLib.h>
> #include <Library/EdkiiSystemCapsuleLib.h>
> diff --git
> a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRepo
> rtDxe.inf
> b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRepo
> rtDxe.inf
> index cc9614ef14..b15736cf0d 100644
> ---
> a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRepo
> rtDxe.inf
> +++
> b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRepo
> rtDxe.inf
> @@ -50,9 +50,7 @@
> HobLib
> UefiRuntimeServicesTableLib
> UefiDriverEntryPoint
> - DxeServicesLib
> DxeServicesTableLib
> - PrintLib
> EdkiiSystemCapsuleLib
>
> [Pcd]
> --
> 2.18.0.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] SignedCapsulePkg: Remove redundant things in inf, .h and .c files
2018-08-10 7:34 ` Yao, Jiewen
@ 2018-08-10 8:42 ` Zeng, Star
0 siblings, 0 replies; 3+ messages in thread
From: Zeng, Star @ 2018-08-10 8:42 UTC (permalink / raw)
To: Yao, Jiewen, Zhang, Shenglei, edk2-devel@lists.01.org; +Cc: Zeng, Star
Hi Shenglei,
I know PrintLib is used by ParseConfigProfile.c that is included by SystemFirmwareUpdateDxe.inf.
But could you evaluate whether DxeServicesLib could be removed from SystemFirmwareUpdateDxe.inf or not?
Thanks,
Star
-----Original Message-----
From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Yao, Jiewen
Sent: Friday, August 10, 2018 3:35 PM
To: Zhang, Shenglei <shenglei.zhang@intel.com>; edk2-devel@lists.01.org
Subject: Re: [edk2] [PATCH] SignedCapsulePkg: Remove redundant things in inf, .h and .c files
Reviewed-by: Jiewen.yao@intel.com
> -----Original Message-----
> From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of
> shenglei
> Sent: Friday, August 10, 2018 2:11 PM
> To: edk2-devel@lists.01.org
> Cc: Yao, Jiewen <jiewen.yao@intel.com>
> Subject: [edk2] [PATCH] SignedCapsulePkg: Remove redundant things in inf, .h
> and .c files
>
> Two redundant library classes have been removed.
> The redundant function "IsSystemFmp" has been removed.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1067
>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: shenglei <shenglei.zhang@intel.com>
> ---
> .../SystemFirmwareCommonDxe.c | 27 -------------------
> .../SystemFirmwareUpdate/SystemFirmwareDxe.h | 1 -
> .../SystemFirmwareReportDxe.inf | 2 --
> 3 files changed, 30 deletions(-)
>
> diff --git
> a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCom
> monDxe.c
> b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCom
> monDxe.c
> index 7f7a9a1982..8e16763597 100644
> ---
> a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCom
> monDxe.c
> +++
> b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareCom
> monDxe.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 <Library/UefiDriverEntryPoint.h>
> #include <Library/DevicePathLib.h>
> #include <Library/HobLib.h>
> -#include <Library/DxeServicesLib.h>
> #include <Library/DxeServicesTableLib.h>
> #include <Library/PlatformFlashAccessLib.h>
> #include <Library/EdkiiSystemCapsuleLib.h>
> diff --git
> a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRepo
> rtDxe.inf
> b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRepo
> rtDxe.inf
> index cc9614ef14..b15736cf0d 100644
> ---
> a/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRepo
> rtDxe.inf
> +++
> b/SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareRepo
> rtDxe.inf
> @@ -50,9 +50,7 @@
> HobLib
> UefiRuntimeServicesTableLib
> UefiDriverEntryPoint
> - DxeServicesLib
> DxeServicesTableLib
> - PrintLib
> EdkiiSystemCapsuleLib
>
> [Pcd]
> --
> 2.18.0.windows.1
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-10 8:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-10 6:10 [PATCH] SignedCapsulePkg: Remove redundant things in inf, .h and .c files shenglei
2018-08-10 7:34 ` Yao, Jiewen
2018-08-10 8:42 ` Zeng, Star
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox