[edk2-devel] [Patch 0/2] Address C++ keyword collisions

Michael D Kinney posted 2 patches 11 months, 1 week ago
Failed in applying to current master (apply log)
There is a newer version of this series
MdePkg/Include/IndustryStandard/Tpm12.h             | 4 ++--
MdePkg/Include/IndustryStandard/Tpm20.h             | 4 ++--
SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 6 +++---
SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c     | 6 +++---
SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c    | 2 +-
5 files changed, 11 insertions(+), 11 deletions(-)
[edk2-devel] [Patch 0/2] Address C++ keyword collisions
Posted by Michael D Kinney 11 months, 1 week ago
Update Tpm12.h and Tpm20.h and not use c++ reserved keywords
operator and xor in C structures to support use of these
include files when building with a C++ compiler.  

Update SecurityPkg Tpm2CommandLib to use updated field names.

* Change operator -> Operator
* Change xor -> Xor

NOTE: This is a non-backwards compatible change to Tpm12.h
and Tmp20.h. And consumers of these include files that access
the "operator" or "xor" fields must be updated.

Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Oliver Smith-Denny <osde@linux.microsoft.com>
Cc: Pedro Falcato <pedro.falcato@gmail.com>
Cc: Aaron Pop <aaronpop@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>

Michael D Kinney (2):
  MdePkg/Include/IndustryStandard: Address C++ keyword collisions
  SecurityPkg/Library/TpmCommandLib: Change xor to Xor

 MdePkg/Include/IndustryStandard/Tpm12.h             | 4 ++--
 MdePkg/Include/IndustryStandard/Tpm20.h             | 4 ++--
 SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 6 +++---
 SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c     | 6 +++---
 SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c    | 2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)

-- 
2.40.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105392): https://edk2.groups.io/g/devel/message/105392
Mute This Topic: https://groups.io/mt/99204099/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [Patch 0/2] Address C++ keyword collisions
Posted by Oliver Smith-Denny 11 months, 1 week ago
For the patchset:

Reviewed-by: Oliver Smith-Denny <osde@linux.microsoft.com>

Thanks!

On 5/29/2023 10:06 AM, Michael D Kinney wrote:
> Update Tpm12.h and Tpm20.h and not use c++ reserved keywords
> operator and xor in C structures to support use of these
> include files when building with a C++ compiler.
> 
> Update SecurityPkg Tpm2CommandLib to use updated field names.
> 
> * Change operator -> Operator
> * Change xor -> Xor
> 
> NOTE: This is a non-backwards compatible change to Tpm12.h
> and Tmp20.h. And consumers of these include files that access
> the "operator" or "xor" fields must be updated.
> 
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Oliver Smith-Denny <osde@linux.microsoft.com>
> Cc: Pedro Falcato <pedro.falcato@gmail.com>
> Cc: Aaron Pop <aaronpop@microsoft.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> 
> Michael D Kinney (2):
>    MdePkg/Include/IndustryStandard: Address C++ keyword collisions
>    SecurityPkg/Library/TpmCommandLib: Change xor to Xor
> 
>   MdePkg/Include/IndustryStandard/Tpm12.h             | 4 ++--
>   MdePkg/Include/IndustryStandard/Tpm20.h             | 4 ++--
>   SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 6 +++---
>   SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c     | 6 +++---
>   SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c    | 2 +-
>   5 files changed, 11 insertions(+), 11 deletions(-)
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105459): https://edk2.groups.io/g/devel/message/105459
Mute This Topic: https://groups.io/mt/99204099/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [Patch 0/2] Address C++ keyword collisions
Posted by Pedro Falcato 11 months, 1 week ago
On Mon, May 29, 2023 at 6:06 PM Michael D Kinney
<michael.d.kinney@intel.com> wrote:
>
> Update Tpm12.h and Tpm20.h and not use c++ reserved keywords
> operator and xor in C structures to support use of these
> include files when building with a C++ compiler.
>
> Update SecurityPkg Tpm2CommandLib to use updated field names.
>
> * Change operator -> Operator
> * Change xor -> Xor
>
> NOTE: This is a non-backwards compatible change to Tpm12.h
> and Tmp20.h. And consumers of these include files that access
> the "operator" or "xor" fields must be updated.
>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> Cc: Oliver Smith-Denny <osde@linux.microsoft.com>
> Cc: Pedro Falcato <pedro.falcato@gmail.com>
> Cc: Aaron Pop <aaronpop@microsoft.com>
> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
>
> Michael D Kinney (2):
>   MdePkg/Include/IndustryStandard: Address C++ keyword collisions
>   SecurityPkg/Library/TpmCommandLib: Change xor to Xor
>
>  MdePkg/Include/IndustryStandard/Tpm12.h             | 4 ++--
>  MdePkg/Include/IndustryStandard/Tpm20.h             | 4 ++--
>  SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 6 +++---
>  SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c     | 6 +++---
>  SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c    | 2 +-
>  5 files changed, 11 insertions(+), 11 deletions(-)
>
> --
> 2.40.1.windows.1
>

For the series:

Reviewed-by: Pedro Falcato <pedro.falcato@gmail.com>

Make sure you squash these two commits into one, as to not break bisectability.

-- 
Pedro


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105448): https://edk2.groups.io/g/devel/message/105448
Mute This Topic: https://groups.io/mt/99204099/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [Patch 0/2] Address C++ keyword collisions
Posted by Michael D Kinney 11 months, 1 week ago
Hi Pedro,

Great point on bisect.  It is also important to provide patches
that allow downstream usage of these fields to be able to
use a subset of the patches that support both field names
so they can update and test their code before using the full
patch series that removes the old field name.

I have sent V2 of this series that temporarily uses an
anonymous union to support old and new field names.

Mike

> -----Original Message-----
> From: Pedro Falcato <pedro.falcato@gmail.com>
> Sent: Tuesday, May 30, 2023 5:10 AM
> To: Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: devel@edk2.groups.io; Gao, Liming <gaoliming@byosoft.com.cn>; Liu,
> Zhiguang <zhiguang.liu@intel.com>; Oliver Smith-Denny
> <osde@linux.microsoft.com>; Pop, Aaron <aaronpop@microsoft.com>
> Subject: Re: [Patch 0/2] Address C++ keyword collisions
> 
> On Mon, May 29, 2023 at 6:06 PM Michael D Kinney
> <michael.d.kinney@intel.com> wrote:
> >
> > Update Tpm12.h and Tpm20.h and not use c++ reserved keywords
> > operator and xor in C structures to support use of these
> > include files when building with a C++ compiler.
> >
> > Update SecurityPkg Tpm2CommandLib to use updated field names.
> >
> > * Change operator -> Operator
> > * Change xor -> Xor
> >
> > NOTE: This is a non-backwards compatible change to Tpm12.h
> > and Tmp20.h. And consumers of these include files that access
> > the "operator" or "xor" fields must be updated.
> >
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Zhiguang Liu <zhiguang.liu@intel.com>
> > Cc: Oliver Smith-Denny <osde@linux.microsoft.com>
> > Cc: Pedro Falcato <pedro.falcato@gmail.com>
> > Cc: Aaron Pop <aaronpop@microsoft.com>
> > Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
> >
> > Michael D Kinney (2):
> >   MdePkg/Include/IndustryStandard: Address C++ keyword collisions
> >   SecurityPkg/Library/TpmCommandLib: Change xor to Xor
> >
> >  MdePkg/Include/IndustryStandard/Tpm12.h             | 4 ++--
> >  MdePkg/Include/IndustryStandard/Tpm20.h             | 4 ++--
> >  SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 6 +++---
> >  SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c     | 6 +++---
> >  SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c    | 2 +-
> >  5 files changed, 11 insertions(+), 11 deletions(-)
> >
> > --
> > 2.40.1.windows.1
> >
> 
> For the series:
> 
> Reviewed-by: Pedro Falcato <pedro.falcato@gmail.com>
> 
> Make sure you squash these two commits into one, as to not break
> bisectability.
> 
> --
> Pedro


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#105469): https://edk2.groups.io/g/devel/message/105469
Mute This Topic: https://groups.io/mt/99204099/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-