* [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg
@ 2021-03-30 23:04 Michael D Kinney
2021-03-30 23:04 ` [Patch 1/3] MdePkg/Include/Protocol: EFI_HII POPUP_PROTOCOL duplicate declaration Michael D Kinney
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Michael D Kinney @ 2021-03-30 23:04 UTC (permalink / raw)
To: devel
Cc: Liming Gao, Zhiguang Liu, Jiewen Yao, Jian J Wang, Xiaoyu Lu,
Guomin Jiang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3287
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3286
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3285
Remove duplicate declarations of the following types that may
generate compiler warnings or errors:
* EFI_HII_POPUP_PROTOCOL
* EFI_RESET_NOTIFICATION_PROTOCOL
* EDKII_CRYPTO_RSA_GET_PUBLIC_KEY_FROM_X509
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Michael D Kinney (3):
MdePkg/Include/Protocol: EFI_HII POPUP_PROTOCOL duplicate declaration
MdePkg/Include/Protocol: EFI_RESET_NOTIFICATION_PROTOCOL duplicate
CryptoPkg/Private/Protocol/Crypto.h: Remove duplicate function type
CryptoPkg/Private/Protocol/Crypto.h | 28 +--------------------
MdePkg/Include/Protocol/HiiPopup.h | 6 ++---
MdePkg/Include/Protocol/ResetNotification.h | 6 ++---
3 files changed, 7 insertions(+), 33 deletions(-)
--
2.31.1.windows.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Patch 1/3] MdePkg/Include/Protocol: EFI_HII POPUP_PROTOCOL duplicate declaration
2021-03-30 23:04 [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg Michael D Kinney
@ 2021-03-30 23:04 ` Michael D Kinney
2021-03-30 23:04 ` [Patch 2/3] MdePkg/Include/Protocol: EFI_RESET_NOTIFICATION_PROTOCOL duplicate Michael D Kinney
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Michael D Kinney @ 2021-03-30 23:04 UTC (permalink / raw)
To: devel; +Cc: Liming Gao, Zhiguang Liu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3285
Remove duplicate declaration of structure type
EFI_HII_POPUP_PROTOCOL from HiiPopup.h. The forward
declaration of the top of this file already declared
this type.
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
| 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--git a/MdePkg/Include/Protocol/HiiPopup.h b/MdePkg/Include/Protocol/HiiPopup.h
index e8161c3701ad..8e217071d7f8 100644
--- a/MdePkg/Include/Protocol/HiiPopup.h
+++ b/MdePkg/Include/Protocol/HiiPopup.h
@@ -2,7 +2,7 @@
This protocol provides services to display a popup window.
The protocol is typically produced by the forms browser and consumed by a driver callback handler.
- Copyright (c) 2017-2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2017-2021, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
@@ -67,10 +67,10 @@ EFI_STATUS
OUT EFI_HII_POPUP_SELECTION *UserSelection OPTIONAL
);
-typedef struct _EFI_HII_POPUP_PROTOCOL {
+struct _EFI_HII_POPUP_PROTOCOL {
UINT64 Revision;
EFI_HII_CREATE_POPUP CreatePopup;
-} EFI_HII_POPUP_PROTOCOL;
+};
extern EFI_GUID gEfiHiiPopupProtocolGuid;
--
2.31.1.windows.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Patch 2/3] MdePkg/Include/Protocol: EFI_RESET_NOTIFICATION_PROTOCOL duplicate
2021-03-30 23:04 [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg Michael D Kinney
2021-03-30 23:04 ` [Patch 1/3] MdePkg/Include/Protocol: EFI_HII POPUP_PROTOCOL duplicate declaration Michael D Kinney
@ 2021-03-30 23:04 ` Michael D Kinney
2021-03-30 23:04 ` [Patch 3/3] CryptoPkg/Private/Protocol/Crypto.h: Remove duplicate function type Michael D Kinney
2021-03-31 1:19 ` 回复: [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg gaoliming
3 siblings, 0 replies; 7+ messages in thread
From: Michael D Kinney @ 2021-03-30 23:04 UTC (permalink / raw)
To: devel; +Cc: Liming Gao, Zhiguang Liu
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3286
Remove duplicate declaration of structure type
EFI_RESET_NOTIFICATION_PROTOCOL from ResetNotification.h. The
forward declaration of the top of this file already declared
this type.
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
MdePkg/Include/Protocol/ResetNotification.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/MdePkg/Include/Protocol/ResetNotification.h b/MdePkg/Include/Protocol/ResetNotification.h
index 1142424e4610..26f8a33858f4 100644
--- a/MdePkg/Include/Protocol/ResetNotification.h
+++ b/MdePkg/Include/Protocol/ResetNotification.h
@@ -2,7 +2,7 @@
EFI Reset Notification Protocol as defined in UEFI 2.7.
This protocol provides services to register for a notification when ResetSystem is called.
- Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Revision Reference:
@@ -68,10 +68,10 @@ EFI_STATUS
IN EFI_RESET_SYSTEM ResetFunction
);
-typedef struct _EFI_RESET_NOTIFICATION_PROTOCOL {
+struct _EFI_RESET_NOTIFICATION_PROTOCOL {
EFI_REGISTER_RESET_NOTIFY RegisterResetNotify;
EFI_UNREGISTER_RESET_NOTIFY UnregisterResetNotify;
-} EFI_RESET_NOTIFICATION_PROTOCOL;
+};
extern EFI_GUID gEfiResetNotificationProtocolGuid;
--
2.31.1.windows.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Patch 3/3] CryptoPkg/Private/Protocol/Crypto.h: Remove duplicate function type
2021-03-30 23:04 [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg Michael D Kinney
2021-03-30 23:04 ` [Patch 1/3] MdePkg/Include/Protocol: EFI_HII POPUP_PROTOCOL duplicate declaration Michael D Kinney
2021-03-30 23:04 ` [Patch 2/3] MdePkg/Include/Protocol: EFI_RESET_NOTIFICATION_PROTOCOL duplicate Michael D Kinney
@ 2021-03-30 23:04 ` Michael D Kinney
2021-03-30 23:14 ` Yao, Jiewen
2021-03-31 1:19 ` 回复: [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg gaoliming
3 siblings, 1 reply; 7+ messages in thread
From: Michael D Kinney @ 2021-03-30 23:04 UTC (permalink / raw)
To: devel; +Cc: Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3287
Remove duplicate declaration of the function prototype
EDKII_CRYPTO_RSA_GET_PUBLIC_KEY_FROM_X509.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
Cc: Guomin Jiang <guomin.jiang@intel.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
---
CryptoPkg/Private/Protocol/Crypto.h | 28 +---------------------------
1 file changed, 1 insertion(+), 27 deletions(-)
diff --git a/CryptoPkg/Private/Protocol/Crypto.h b/CryptoPkg/Private/Protocol/Crypto.h
index c399e0d67ae0..17930a77a60e 100644
--- a/CryptoPkg/Private/Protocol/Crypto.h
+++ b/CryptoPkg/Private/Protocol/Crypto.h
@@ -2,7 +2,7 @@
This Protocol provides Crypto services to DXE modules
Copyright (C) Microsoft Corporation. All rights reserved.
- Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -1106,32 +1106,6 @@ BOOLEAN
IN UINTN SigSize
);
-/**
- Retrieve the RSA Public Key from one DER-encoded X509 certificate.
-
- If Cert is NULL, then return FALSE.
- If RsaContext is NULL, then return FALSE.
- If this interface is not supported, then return FALSE.
-
- @param[in] Cert Pointer to the DER-encoded X509 certificate.
- @param[in] CertSize Size of the X509 certificate in bytes.
- @param[out] RsaContext Pointer to new-generated RSA context which contain the retrieved
- RSA public key component. Use RsaFree() function to free the
- resource.
-
- @retval TRUE RSA Public Key was retrieved successfully.
- @retval FALSE Fail to retrieve RSA public key from X509 certificate.
- @retval FALSE This interface is not supported.
-
-**/
-typedef
-BOOLEAN
-(EFIAPI *EDKII_CRYPTO_RSA_GET_PUBLIC_KEY_FROM_X509) (
- IN CONST UINT8 *Cert,
- IN UINTN CertSize,
- OUT VOID **RsaContext
- );
-
/**
Allocates and initializes one RSA context for subsequent use.
--
2.31.1.windows.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [Patch 3/3] CryptoPkg/Private/Protocol/Crypto.h: Remove duplicate function type
2021-03-30 23:04 ` [Patch 3/3] CryptoPkg/Private/Protocol/Crypto.h: Remove duplicate function type Michael D Kinney
@ 2021-03-30 23:14 ` Yao, Jiewen
0 siblings, 0 replies; 7+ messages in thread
From: Yao, Jiewen @ 2021-03-30 23:14 UTC (permalink / raw)
To: Kinney, Michael D, devel@edk2.groups.io
Cc: Wang, Jian J, Lu, XiaoyuX, Jiang, Guomin
Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> -----Original Message-----
> From: Michael D Kinney <michael.d.kinney@intel.com>
> Sent: Wednesday, March 31, 2021 7:04 AM
> To: devel@edk2.groups.io
> Cc: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Lu, XiaoyuX <xiaoyux.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>
> Subject: [Patch 3/3] CryptoPkg/Private/Protocol/Crypto.h: Remove duplicate
> function type
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3287
>
> Remove duplicate declaration of the function prototype
> EDKII_CRYPTO_RSA_GET_PUBLIC_KEY_FROM_X509.
>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> Cc: Guomin Jiang <guomin.jiang@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> ---
> CryptoPkg/Private/Protocol/Crypto.h | 28 +---------------------------
> 1 file changed, 1 insertion(+), 27 deletions(-)
>
> diff --git a/CryptoPkg/Private/Protocol/Crypto.h
> b/CryptoPkg/Private/Protocol/Crypto.h
> index c399e0d67ae0..17930a77a60e 100644
> --- a/CryptoPkg/Private/Protocol/Crypto.h
> +++ b/CryptoPkg/Private/Protocol/Crypto.h
> @@ -2,7 +2,7 @@
> This Protocol provides Crypto services to DXE modules
>
> Copyright (C) Microsoft Corporation. All rights reserved.
> - Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
> + Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.<BR>
> SPDX-License-Identifier: BSD-2-Clause-Patent
>
> **/
> @@ -1106,32 +1106,6 @@ BOOLEAN
> IN UINTN SigSize
> );
>
> -/**
> - Retrieve the RSA Public Key from one DER-encoded X509 certificate.
> -
> - If Cert is NULL, then return FALSE.
> - If RsaContext is NULL, then return FALSE.
> - If this interface is not supported, then return FALSE.
> -
> - @param[in] Cert Pointer to the DER-encoded X509 certificate.
> - @param[in] CertSize Size of the X509 certificate in bytes.
> - @param[out] RsaContext Pointer to new-generated RSA context which
> contain the retrieved
> - RSA public key component. Use RsaFree() function to free the
> - resource.
> -
> - @retval TRUE RSA Public Key was retrieved successfully.
> - @retval FALSE Fail to retrieve RSA public key from X509 certificate.
> - @retval FALSE This interface is not supported.
> -
> -**/
> -typedef
> -BOOLEAN
> -(EFIAPI *EDKII_CRYPTO_RSA_GET_PUBLIC_KEY_FROM_X509) (
> - IN CONST UINT8 *Cert,
> - IN UINTN CertSize,
> - OUT VOID **RsaContext
> - );
> -
> /**
> Allocates and initializes one RSA context for subsequent use.
>
> --
> 2.31.1.windows.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* 回复: [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg
2021-03-30 23:04 [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg Michael D Kinney
` (2 preceding siblings ...)
2021-03-30 23:04 ` [Patch 3/3] CryptoPkg/Private/Protocol/Crypto.h: Remove duplicate function type Michael D Kinney
@ 2021-03-31 1:19 ` gaoliming
2021-03-31 2:04 ` Michael D Kinney
3 siblings, 1 reply; 7+ messages in thread
From: gaoliming @ 2021-03-31 1:19 UTC (permalink / raw)
To: 'Michael D Kinney', devel
Cc: 'Zhiguang Liu', 'Jiewen Yao',
'Jian J Wang', 'Xiaoyu Lu',
'Guomin Jiang'
Mike:
The change is good. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
Besides, which compiler option can detect this warning?
Thanks
Liming
> -----邮件原件-----
> 发件人: Michael D Kinney <michael.d.kinney@intel.com>
> 发送时间: 2021年3月31日 7:04
> 收件人: devel@edk2.groups.io
> 抄送: Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu
> <zhiguang.liu@intel.com>; Jiewen Yao <jiewen.yao@intel.com>; Jian J Wang
> <jian.j.wang@intel.com>; Xiaoyu Lu <xiaoyux.lu@intel.com>; Guomin Jiang
> <guomin.jiang@intel.com>
> 主题: [Patch 0/3] Remove duplicate type declarations in MdePkg and
> CryptoPkg
>
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3287
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3286
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3285
>
> Remove duplicate declarations of the following types that may
> generate compiler warnings or errors:
> * EFI_HII_POPUP_PROTOCOL
> * EFI_RESET_NOTIFICATION_PROTOCOL
> * EDKII_CRYPTO_RSA_GET_PUBLIC_KEY_FROM_X509
>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> Cc: Guomin Jiang <guomin.jiang@intel.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
>
> Michael D Kinney (3):
> MdePkg/Include/Protocol: EFI_HII POPUP_PROTOCOL duplicate declaration
> MdePkg/Include/Protocol: EFI_RESET_NOTIFICATION_PROTOCOL duplicate
> CryptoPkg/Private/Protocol/Crypto.h: Remove duplicate function type
>
> CryptoPkg/Private/Protocol/Crypto.h | 28 +--------------------
> MdePkg/Include/Protocol/HiiPopup.h | 6 ++---
> MdePkg/Include/Protocol/ResetNotification.h | 6 ++---
> 3 files changed, 7 insertions(+), 33 deletions(-)
>
> --
> 2.31.1.windows.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg
2021-03-31 1:19 ` 回复: [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg gaoliming
@ 2021-03-31 2:04 ` Michael D Kinney
0 siblings, 0 replies; 7+ messages in thread
From: Michael D Kinney @ 2021-03-31 2:04 UTC (permalink / raw)
To: gaoliming, devel@edk2.groups.io, Kinney, Michael D
Cc: Liu, Zhiguang, Yao, Jiewen, Wang, Jian J, Lu, XiaoyuX,
Jiang, Guomin
Liming,
GCC can detect redefinition of same type.
--------------------
typedef int foo;
typedef int foo;
int main (int argc, char *argv[]) {
return 0;
}
--------------------
gcc a.c -Wpedantic -std=c99
a.c:2:13: warning: redefinition of typedef ‘foo’ [-Wpedantic]
typedef int foo;
^~~
a.c:1:13: note: previous declaration of ‘foo’ was here
typedef int foo;
^~~
Mike
> -----Original Message-----
> From: gaoliming <gaoliming@byosoft.com.cn>
> Sent: Tuesday, March 30, 2021 6:20 PM
> To: Kinney, Michael D <michael.d.kinney@intel.com>; devel@edk2.groups.io
> Cc: Liu, Zhiguang <zhiguang.liu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Lu,
> XiaoyuX <xiaoyux.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>
> Subject: 回复: [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg
>
> Mike:
> The change is good. Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
>
> Besides, which compiler option can detect this warning?
>
> Thanks
> Liming
> > -----邮件原件-----
> > 发件人: Michael D Kinney <michael.d.kinney@intel.com>
> > 发送时间: 2021年3月31日 7:04
> > 收件人: devel@edk2.groups.io
> > 抄送: Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu
> > <zhiguang.liu@intel.com>; Jiewen Yao <jiewen.yao@intel.com>; Jian J Wang
> > <jian.j.wang@intel.com>; Xiaoyu Lu <xiaoyux.lu@intel.com>; Guomin Jiang
> > <guomin.jiang@intel.com>
> > 主题: [Patch 0/3] Remove duplicate type declarations in MdePkg and
> > CryptoPkg
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3287
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3286
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3285
> >
> > Remove duplicate declarations of the following types that may
> > generate compiler warnings or errors:
> > * EFI_HII_POPUP_PROTOCOL
> > * EFI_RESET_NOTIFICATION_PROTOCOL
> > * EDKII_CRYPTO_RSA_GET_PUBLIC_KEY_FROM_X509
> >
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > Cc: Jiewen Yao <jiewen.yao@intel.com>
> > Cc: Jian J Wang <jian.j.wang@intel.com>
> > Cc: Xiaoyu Lu <xiaoyux.lu@intel.com>
> > Cc: Guomin Jiang <guomin.jiang@intel.com>
> > Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> >
> > Michael D Kinney (3):
> > MdePkg/Include/Protocol: EFI_HII POPUP_PROTOCOL duplicate declaration
> > MdePkg/Include/Protocol: EFI_RESET_NOTIFICATION_PROTOCOL duplicate
> > CryptoPkg/Private/Protocol/Crypto.h: Remove duplicate function type
> >
> > CryptoPkg/Private/Protocol/Crypto.h | 28 +--------------------
> > MdePkg/Include/Protocol/HiiPopup.h | 6 ++---
> > MdePkg/Include/Protocol/ResetNotification.h | 6 ++---
> > 3 files changed, 7 insertions(+), 33 deletions(-)
> >
> > --
> > 2.31.1.windows.1
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-03-31 2:04 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-30 23:04 [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg Michael D Kinney
2021-03-30 23:04 ` [Patch 1/3] MdePkg/Include/Protocol: EFI_HII POPUP_PROTOCOL duplicate declaration Michael D Kinney
2021-03-30 23:04 ` [Patch 2/3] MdePkg/Include/Protocol: EFI_RESET_NOTIFICATION_PROTOCOL duplicate Michael D Kinney
2021-03-30 23:04 ` [Patch 3/3] CryptoPkg/Private/Protocol/Crypto.h: Remove duplicate function type Michael D Kinney
2021-03-30 23:14 ` Yao, Jiewen
2021-03-31 1:19 ` 回复: [Patch 0/3] Remove duplicate type declarations in MdePkg and CryptoPkg gaoliming
2021-03-31 2:04 ` Michael D Kinney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox