diff options
author | Michael D Kinney <michael.d.kinney@intel.com> | 2021-12-05 14:33:58 -0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-12-07 17:24:28 +0000 |
commit | f9f4fb23290802cc43bb7a58325b9bfa8ed27da9 (patch) | |
tree | 2e4fbbc69ebf9301d897888cd0cf1d332dd2c8f8 /SecurityPkg | |
parent | deba54761ab1e2796a7e219f371f035a84c3a830 (diff) | |
download | edk2-f9f4fb23290802cc43bb7a58325b9bfa8ed27da9.tar.gz edk2-f9f4fb23290802cc43bb7a58325b9bfa8ed27da9.tar.bz2 edk2-f9f4fb23290802cc43bb7a58325b9bfa8ed27da9.zip |
SecurityPkg: Change complex DEBUG_CODE() to DEBUG_CODE_BEGIN/END()
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3767
Update use of DEBUG_CODE(Expression) if Expression is a complex code
block with if/while/for/case statements that use {}.
Cc: Andrew Fish <afish@apple.com>
Cc: Leif Lindholm <leif@nuviainc.com>
Cc: Michael Kubacki <michael.kubacki@microsoft.com>
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
Diffstat (limited to 'SecurityPkg')
-rw-r--r-- | SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c | 12 | ||||
-rw-r--r-- | SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c | 12 | ||||
-rw-r--r-- | SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c | 12 | ||||
-rw-r--r-- | SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 4 |
4 files changed, 20 insertions, 20 deletions
diff --git a/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c b/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c index b8218f122d..d9e1ce86ee 100644 --- a/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c +++ b/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c @@ -263,7 +263,7 @@ Tpm12TisTpmCommand ( UINT32 Data32;
UINT16 RspTag;
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
UINTN DebugSize;
DEBUG ((DEBUG_VERBOSE, "Tpm12TisTpmCommand Send - "));
@@ -282,7 +282,7 @@ Tpm12TisTpmCommand ( }
}
DEBUG ((DEBUG_VERBOSE, "\n"));
- );
+ DEBUG_CODE_END ();
TpmOutSize = 0;
Status = Tpm12TisPcPrepareCommand (TisReg);
@@ -351,13 +351,13 @@ Tpm12TisTpmCommand ( if (Index == sizeof (TPM_RSP_COMMAND_HDR)) break;
}
}
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
DEBUG ((DEBUG_VERBOSE, "Tpm12TisTpmCommand ReceiveHeader - "));
for (Index = 0; Index < sizeof (TPM_RSP_COMMAND_HDR); Index++) {
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
}
DEBUG ((DEBUG_VERBOSE, "\n"));
- );
+ DEBUG_CODE_END ();
//
// Check the response data header (tag, parasize and returncode)
//
@@ -395,13 +395,13 @@ Tpm12TisTpmCommand ( }
}
Exit:
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
DEBUG ((DEBUG_VERBOSE, "Tpm12TisTpmCommand Receive - "));
for (Index = 0; Index < TpmOutSize; Index++) {
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
}
DEBUG ((DEBUG_VERBOSE, "\n"));
- );
+ DEBUG_CODE_END ();
MmioWrite8((UINTN)&TisReg->Status, TIS_PC_STS_READY);
return Status;
}
diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c index edde7f8e15..5ceb6c8466 100644 --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c @@ -151,7 +151,7 @@ PtpCrbTpmCommand ( UINT16 Data16;
UINT32 Data32;
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
UINTN DebugSize;
DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand Send - "));
@@ -170,7 +170,7 @@ PtpCrbTpmCommand ( }
}
DEBUG ((DEBUG_VERBOSE, "\n"));
- );
+ DEBUG_CODE_END ();
TpmOutSize = 0;
//
@@ -285,13 +285,13 @@ PtpCrbTpmCommand ( for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {
BufferOut[Index] = MmioRead8 ((UINTN)&CrbReg->CrbDataBuffer[Index]);
}
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand ReceiveHeader - "));
for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
}
DEBUG ((DEBUG_VERBOSE, "\n"));
- );
+ DEBUG_CODE_END ();
//
// Check the response data header (tag, parasize and returncode)
//
@@ -320,13 +320,13 @@ PtpCrbTpmCommand ( BufferOut[Index] = MmioRead8 ((UINTN)&CrbReg->CrbDataBuffer[Index]);
}
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
DEBUG ((DEBUG_VERBOSE, "PtpCrbTpmCommand Receive - "));
for (Index = 0; Index < TpmOutSize; Index++) {
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
}
DEBUG ((DEBUG_VERBOSE, "\n"));
- );
+ DEBUG_CODE_END ();
GoReady_Exit:
//
diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c index e3bef8dfe4..a3c84d8ab4 100644 --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c @@ -218,7 +218,7 @@ Tpm2TisTpmCommand ( UINT16 Data16;
UINT32 Data32;
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
UINTN DebugSize;
DEBUG ((DEBUG_VERBOSE, "Tpm2TisTpmCommand Send - "));
@@ -237,7 +237,7 @@ Tpm2TisTpmCommand ( }
}
DEBUG ((DEBUG_VERBOSE, "\n"));
- );
+ DEBUG_CODE_END ();
TpmOutSize = 0;
Status = TisPcPrepareCommand (TisReg);
@@ -332,13 +332,13 @@ Tpm2TisTpmCommand ( if (Index == sizeof (TPM2_RESPONSE_HEADER)) break;
}
}
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
DEBUG ((DEBUG_VERBOSE, "Tpm2TisTpmCommand ReceiveHeader - "));
for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) {
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
}
DEBUG ((DEBUG_VERBOSE, "\n"));
- );
+ DEBUG_CODE_END ();
//
// Check the response data header (tag,parasize and returncode )
//
@@ -376,13 +376,13 @@ Tpm2TisTpmCommand ( }
}
Exit:
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
DEBUG ((DEBUG_VERBOSE, "Tpm2TisTpmCommand Receive - "));
for (Index = 0; Index < TpmOutSize; Index++) {
DEBUG ((DEBUG_VERBOSE, "%02x ", BufferOut[Index]));
}
DEBUG ((DEBUG_VERBOSE, "\n"));
- );
+ DEBUG_CODE_END ();
MmioWrite8((UINTN)&TisReg->Status, TIS_PC_STS_READY);
return Status;
}
diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c index 02320bec98..2dc6d11e39 100644 --- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c +++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c @@ -2677,7 +2677,7 @@ DriverEntry ( DEBUG ((DEBUG_INFO, "Tpm2GetCapabilityManufactureID - %08x\n", mTcgDxeData.BsCap.ManufacturerID));
}
- DEBUG_CODE (
+ DEBUG_CODE_BEGIN ();
UINT32 FirmwareVersion1;
UINT32 FirmwareVersion2;
@@ -2687,7 +2687,7 @@ DriverEntry ( } else {
DEBUG ((DEBUG_INFO, "Tpm2GetCapabilityFirmwareVersion - %08x %08x\n", FirmwareVersion1, FirmwareVersion2));
}
- );
+ DEBUG_CODE_END ();
Status = Tpm2GetCapabilityMaxCommandResponseSize (&MaxCommandSize, &MaxResponseSize);
if (EFI_ERROR (Status)) {
|