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>
This commit is contained in:
Rebecca Cran
2023-04-06 13:49:41 -06:00
committed by mergify[bot]
parent 089013a697
commit 8ba392687b
123 changed files with 540 additions and 540 deletions

View File

@@ -180,7 +180,7 @@ AllocatePageTableMemory (
DEBUG_VERBOSE,
"%a:%a: Buffer=0x%Lx Pages=%ld\n",
gEfiCallerBaseName,
__FUNCTION__,
__func__,
Buffer,
Pages
));
@@ -542,7 +542,7 @@ SetOrClearSharedBit (
TdStatus = TdVmCall (TDVMCALL_MAPGPA, PhysicalAddress, Length, 0, 0, NULL);
if (TdStatus != 0) {
DEBUG ((DEBUG_ERROR, "%a: TdVmcall(MAPGPA) failed with %llx\n", __FUNCTION__, TdStatus));
DEBUG ((DEBUG_ERROR, "%a: TdVmcall(MAPGPA) failed with %llx\n", __func__, TdStatus));
ASSERT (FALSE);
return EFI_DEVICE_ERROR;
}
@@ -553,14 +553,14 @@ SetOrClearSharedBit (
if (Mode == ClearSharedBit) {
Status = gBS->LocateProtocol (&gEdkiiMemoryAcceptProtocolGuid, NULL, (VOID **)&MemoryAcceptProtocol);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to locate MemoryAcceptProtocol with %r\n", __FUNCTION__, Status));
DEBUG ((DEBUG_ERROR, "%a: Failed to locate MemoryAcceptProtocol with %r\n", __func__, Status));
ASSERT (FALSE);
return Status;
}
Status = MemoryAcceptProtocol->AcceptMemory (MemoryAcceptProtocol, PhysicalAddress, Length);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: Failed to AcceptMemory with %r\n", __FUNCTION__, Status));
DEBUG ((DEBUG_ERROR, "%a: Failed to AcceptMemory with %r\n", __func__, Status));
ASSERT (FALSE);
return Status;
}
@@ -570,7 +570,7 @@ SetOrClearSharedBit (
DEBUG_VERBOSE,
"%a:%a: pte=0x%Lx AddressEncMask=0x%Lx Mode=0x%x MapGPA Status=0x%x\n",
gEfiCallerBaseName,
__FUNCTION__,
__func__,
*PageTablePointer,
AddressEncMask,
Mode,
@@ -677,7 +677,7 @@ SetMemorySharedOrPrivate (
DEBUG_VERBOSE,
"%a:%a: Cr3Base=0x%Lx Physical=0x%Lx Length=0x%Lx Mode=%a\n",
gEfiCallerBaseName,
__FUNCTION__,
__func__,
Cr3BaseAddress,
PhysicalAddress,
(UINT64)Length,
@@ -734,7 +734,7 @@ SetMemorySharedOrPrivate (
DEBUG_ERROR,
"%a:%a: bad PML4 for Physical=0x%Lx\n",
gEfiCallerBaseName,
__FUNCTION__,
__func__,
PhysicalAddress
));
Status = RETURN_NO_MAPPING;
@@ -751,7 +751,7 @@ SetMemorySharedOrPrivate (
DEBUG_ERROR,
"%a:%a: bad PDPE for Physical=0x%Lx\n",
gEfiCallerBaseName,
__FUNCTION__,
__func__,
PhysicalAddress
));
Status = RETURN_NO_MAPPING;
@@ -776,7 +776,7 @@ SetMemorySharedOrPrivate (
DEBUG_VERBOSE,
"%a:%a: updated 1GB entry for Physical=0x%Lx\n",
gEfiCallerBaseName,
__FUNCTION__,
__func__,
PhysicalAddress
));
PhysicalAddress += BIT30;
@@ -789,7 +789,7 @@ SetMemorySharedOrPrivate (
DEBUG_VERBOSE,
"%a:%a: splitting 1GB page for Physical=0x%Lx\n",
gEfiCallerBaseName,
__FUNCTION__,
__func__,
PhysicalAddress
));
Split1GPageTo2M (
@@ -817,7 +817,7 @@ SetMemorySharedOrPrivate (
DEBUG_ERROR,
"%a:%a: bad PDE for Physical=0x%Lx\n",
gEfiCallerBaseName,
__FUNCTION__,
__func__,
PhysicalAddress
));
Status = RETURN_NO_MAPPING;
@@ -848,7 +848,7 @@ SetMemorySharedOrPrivate (
DEBUG_VERBOSE,
"%a:%a: splitting 2MB page for Physical=0x%Lx\n",
gEfiCallerBaseName,
__FUNCTION__,
__func__,
PhysicalAddress
));
@@ -877,7 +877,7 @@ SetMemorySharedOrPrivate (
DEBUG_ERROR,
"%a:%a: bad PTE for Physical=0x%Lx\n",
gEfiCallerBaseName,
__FUNCTION__,
__func__,
PhysicalAddress
));
Status = RETURN_NO_MAPPING;