public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Michael D Kinney" <michael.d.kinney@intel.com>
To: devel@edk2.groups.io
Cc: Jiewen Yao <jiewen.yao@intel.com>,
	Jian J Wang <jian.j.wang@intel.com>,
	Oliver Smith-Denny <osde@linux.microsoft.com>,
	Pedro Falcato <pedro.falcato@gmail.com>,
	Aaron Pop <aaronpop@microsoft.com>
Subject: [Patch v2 2/3] SecurityPkg/Library/TpmCommandLib: Change xor to Xor
Date: Tue, 30 May 2023 11:53:21 -0700	[thread overview]
Message-ID: <20230530185322.70-3-michael.d.kinney@intel.com> (raw)
In-Reply-To: <20230530185322.70-1-michael.d.kinney@intel.com>

Change xor to Xor to avoid C++ reserved work name collisions
when building with C++ compilers.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jian J Wang <jian.j.wang@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>
---
 SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c | 6 +++---
 SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c     | 6 +++---
 SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c    | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
index f0e6019a47be..f8c781a445a1 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Capability.c
@@ -734,9 +734,9 @@ Tpm2TestParms (
           Buffer += sizeof (UINT16);
           break;
         case TPM_ALG_XOR:
-          WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->parameters.keyedHashDetail.scheme.details.xor.hashAlg));
+          WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->parameters.keyedHashDetail.scheme.details.Xor.hashAlg));
           Buffer += sizeof (UINT16);
-          WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->parameters.keyedHashDetail.scheme.details.xor.kdf));
+          WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->parameters.keyedHashDetail.scheme.details.Xor.kdf));
           Buffer += sizeof (UINT16);
           break;
         default:
@@ -761,7 +761,7 @@ Tpm2TestParms (
           Buffer += sizeof (UINT16);
           break;
         case TPM_ALG_XOR:
-          WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->parameters.symDetail.keyBits.xor));
+          WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Parameters->parameters.symDetail.keyBits.Xor));
           Buffer += sizeof (UINT16);
           break;
         case TPM_ALG_NULL:
diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c
index 335957d6cedc..578a61b20339 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Object.c
@@ -169,9 +169,9 @@ Tpm2ReadPublic (
           Buffer                                                                      += sizeof (UINT16);
           break;
         case TPM_ALG_XOR:
-          OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.xor.hashAlg = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer));
+          OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.Xor.hashAlg = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer));
           Buffer                                                                     += sizeof (UINT16);
-          OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.xor.kdf     = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer));
+          OutPublic->publicArea.parameters.keyedHashDetail.scheme.details.Xor.kdf     = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer));
           Buffer                                                                     += sizeof (UINT16);
           break;
         default:
@@ -195,7 +195,7 @@ Tpm2ReadPublic (
           Buffer                                                += sizeof (UINT16);
           break;
         case TPM_ALG_XOR:
-          OutPublic->publicArea.parameters.symDetail.keyBits.xor = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer));
+          OutPublic->publicArea.parameters.symDetail.keyBits.Xor = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer));
           Buffer                                                += sizeof (UINT16);
           break;
         case TPM_ALG_NULL:
diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c
index 7f247da301fe..e17318b6e6fb 100644
--- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c
+++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Session.c
@@ -119,7 +119,7 @@ Tpm2StartAuthSession (
       Buffer += sizeof (UINT16);
       break;
     case TPM_ALG_XOR:
-      WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Symmetric->keyBits.xor));
+      WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (Symmetric->keyBits.Xor));
       Buffer += sizeof (UINT16);
       break;
     default:
-- 
2.40.1.windows.1


  parent reply	other threads:[~2023-05-30 18:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30 18:53 [Patch v2 0/3] Address C++ keyword collisions Michael D Kinney
2023-05-30 18:53 ` [Patch v2 1/3] MdePkg/Include/IndustryStandard: Add Operator and Xor field names Michael D Kinney
2023-05-31 18:17   ` Pedro Falcato
2023-05-31 18:41     ` Michael D Kinney
2023-06-01 15:01       ` Michael D Kinney
2023-06-06 17:56         ` Michael D Kinney
2023-06-06 21:01           ` [edk2-devel] " Pedro Falcato
2024-02-27 23:46           ` Michael D Kinney
2024-02-27 23:55             ` Pedro Falcato
2024-02-28  0:33               ` Michael D Kinney
2023-05-30 18:53 ` Michael D Kinney [this message]
2023-05-31  2:38   ` [edk2-devel] [PATCH] ShellPkg\SmbiosView: SmBiosView does not print correct Slot ID information asperber
2023-05-30 18:53 ` [Patch v2 3/3] MdePkg/Include/IndustryStandard: Address C++ keyword collisions Michael D Kinney
2023-05-31  0:05 ` [edk2-devel] [Patch v2 0/3] " Yao, Jiewen
2023-05-31 17:46 ` Oliver Smith-Denny
2023-06-01  7:30   ` 回复: [edk2-devel] " gaoliming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230530185322.70-3-michael.d.kinney@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox