diff options
author | Rebecca Cran <rebecca@bsdio.com> | 2023-04-06 13:49:41 -0600 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-04-10 14:19:57 +0000 |
commit | 8ba392687b6f7fcb6e333756edd090003c57402e (patch) | |
tree | 040194cbfaa73f764e86e050e9bc00b58e4fc60b /OvmfPkg/Library/CcExitLib | |
parent | 089013a69724687f4051fc88367c9eb74def4284 (diff) | |
download | edk2-8ba392687b6f7fcb6e333756edd090003c57402e.tar.gz edk2-8ba392687b6f7fcb6e333756edd090003c57402e.tar.bz2 edk2-8ba392687b6f7fcb6e333756edd090003c57402e.zip |
OvmfPkg: Update code to be more C11 compliant by using __func__
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among
others support, while __func__ was standardized in C99.
Since it's more standard, replace __FUNCTION__ with __func__ throughout
OvmfPkg.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Diffstat (limited to 'OvmfPkg/Library/CcExitLib')
-rw-r--r-- | OvmfPkg/Library/CcExitLib/CcExitVeHandler.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c index 2c1de0039d..9acc6fbe20 100644 --- a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c +++ b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c @@ -265,7 +265,7 @@ TdxMmioReadWrite ( UINT64 TdStatus;
if ((MmioSize != 1) && (MmioSize != 2) && (MmioSize != 4) && (MmioSize != 8)) {
- DEBUG ((DEBUG_ERROR, "%a: Invalid MmioSize - %d\n", __FUNCTION__, MmioSize));
+ DEBUG ((DEBUG_ERROR, "%a: Invalid MmioSize - %d\n", __func__, MmioSize));
return EFI_INVALID_PARAMETER;
}
@@ -283,7 +283,7 @@ TdxMmioReadWrite ( }
if (TdStatus != 0) {
- DEBUG ((DEBUG_ERROR, "%a: TdVmcall failed with %llx\n", __FUNCTION__, TdStatus));
+ DEBUG ((DEBUG_ERROR, "%a: TdVmcall failed with %llx\n", __func__, TdStatus));
return EFI_ABORTED;
}
@@ -334,7 +334,7 @@ ParseMmioExitInstructions ( Status = CcInitInstructionData (InstructionData, NULL, Regs);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Initialize InstructionData failed! (%r)\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: Initialize InstructionData failed! (%r)\n", __func__, Status));
return Status;
}
@@ -361,7 +361,7 @@ ParseMmioExitInstructions ( 0);
if (InstructionData->Ext.ModRm.Mod == 3) {
- DEBUG ((DEBUG_ERROR, "%a: Parse Ext.ModRm.Mod error! (OpCode: 0x%x)\n", __FUNCTION__, OpCode));
+ DEBUG ((DEBUG_ERROR, "%a: Parse Ext.ModRm.Mod error! (OpCode: 0x%x)\n", __func__, OpCode));
return EFI_UNSUPPORTED;
}
@@ -440,7 +440,7 @@ ParseMmioExitInstructions ( //
// NPF on two register operands???
//
- DEBUG ((DEBUG_ERROR, "%a: Parse Ext.ModRm.Mod error! (OpCode: 0x%x)\n", __FUNCTION__, OpCode));
+ DEBUG ((DEBUG_ERROR, "%a: Parse Ext.ModRm.Mod error! (OpCode: 0x%x)\n", __func__, OpCode));
return EFI_UNSUPPORTED;
}
@@ -558,7 +558,7 @@ ParseMmioExitInstructions ( break;
default:
- DEBUG ((DEBUG_ERROR, "%a: Invalid MMIO opcode (%x)\n", __FUNCTION__, OpCode));
+ DEBUG ((DEBUG_ERROR, "%a: Invalid MMIO opcode (%x)\n", __func__, OpCode));
Status = EFI_UNSUPPORTED;
}
@@ -606,12 +606,12 @@ MmioExit ( Gpaw = (UINT8)(TdReturnData.TdInfo.Gpaw & 0x3f);
TdSharedPageMask = 1ULL << (Gpaw - 1);
} else {
- DEBUG ((DEBUG_ERROR, "%a: TDCALL failed with status=%llx\n", __FUNCTION__, TdStatus));
+ DEBUG ((DEBUG_ERROR, "%a: TDCALL failed with status=%llx\n", __func__, TdStatus));
goto FatalError;
}
if ((Veinfo->GuestPA & TdSharedPageMask) == 0) {
- DEBUG ((DEBUG_ERROR, "%a: EPT-violation #VE on private memory is not allowed!", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: EPT-violation #VE on private memory is not allowed!", __func__));
goto FatalError;
}
@@ -624,7 +624,7 @@ MmioExit ( DEBUG ((
DEBUG_ERROR,
"%a: Address is not correct! (%d: 0x%llx != 0x%llx)\n",
- __FUNCTION__,
+ __func__,
ParsedInstruction.OpCode,
Veinfo->GuestPA,
ParsedInstruction.Address
|