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/AcpiPlatformDxe | |
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/AcpiPlatformDxe')
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/BootScript.c | 4 | ||||
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 4 | ||||
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/EntryPoint.c | 8 | ||||
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/PciDecoding.c | 10 | ||||
-rw-r--r-- | OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | 64 |
5 files changed, 45 insertions, 45 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/BootScript.c b/OvmfPkg/AcpiPlatformDxe/BootScript.c index 08d0f41bda..ff1491de0d 100644 --- a/OvmfPkg/AcpiPlatformDxe/BootScript.c +++ b/OvmfPkg/AcpiPlatformDxe/BootScript.c @@ -175,7 +175,7 @@ SaveCondensedWritePointerToS3Context ( DEBUG ((
DEBUG_VERBOSE,
"%a: 0x%04x/[0x%08x+%d] := 0x%Lx (%Lu)\n",
- __FUNCTION__,
+ __func__,
PointerItem,
PointerOffset,
PointerSize,
@@ -225,7 +225,7 @@ AppendFwCfgBootScript ( }
}
- DEBUG ((DEBUG_VERBOSE, "%a: boot script fragment saved\n", __FUNCTION__));
+ DEBUG ((DEBUG_VERBOSE, "%a: boot script fragment saved\n", __func__));
ReleaseS3Context (S3Context);
return;
diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c index d56eb074a9..d3e73c155e 100644 --- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c @@ -69,7 +69,7 @@ InstallCloudHvTablesTdx ( // then we're out of sync with the hypervisor, and cannot continue.
//
if (DsdtTable == NULL) {
- DEBUG ((DEBUG_INFO, "%a: no DSDT found\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: no DSDT found\n", __func__));
ASSERT (FALSE);
}
@@ -201,7 +201,7 @@ InstallCloudHvTables ( // then we're out of sync with the hypervisor, and cannot continue.
//
if (DsdtTable == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: no DSDT found\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: no DSDT found\n", __func__));
ASSERT (FALSE);
CpuDeadLoop ();
}
diff --git a/OvmfPkg/AcpiPlatformDxe/EntryPoint.c b/OvmfPkg/AcpiPlatformDxe/EntryPoint.c index 143e860fe1..17f1c4017f 100644 --- a/OvmfPkg/AcpiPlatformDxe/EntryPoint.c +++ b/OvmfPkg/AcpiPlatformDxe/EntryPoint.c @@ -46,11 +46,11 @@ OnRootBridgesConnected ( DEBUG ((
DEBUG_INFO,
"%a: root bridges have been connected, installing ACPI tables\n",
- __FUNCTION__
+ __func__
));
Status = InstallAcpiTables (FindAcpiTableProtocol ());
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTables: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTables: %r\n", __func__, Status));
}
gBS->CloseEvent (Event);
@@ -76,7 +76,7 @@ AcpiPlatformEntryPoint ( DEBUG_INFO,
"%a: PCI or its enumeration disabled, installing "
"ACPI tables\n",
- __FUNCTION__
+ __func__
));
return InstallAcpiTables (FindAcpiTableProtocol ());
}
@@ -99,7 +99,7 @@ AcpiPlatformEntryPoint ( DEBUG ((
DEBUG_INFO,
"%a: waiting for root bridges to be connected, registered callback\n",
- __FUNCTION__
+ __func__
));
}
diff --git a/OvmfPkg/AcpiPlatformDxe/PciDecoding.c b/OvmfPkg/AcpiPlatformDxe/PciDecoding.c index c178f857a2..c7dbfb1baa 100644 --- a/OvmfPkg/AcpiPlatformDxe/PciDecoding.c +++ b/OvmfPkg/AcpiPlatformDxe/PciDecoding.c @@ -78,7 +78,7 @@ EnablePciDecoding ( DEBUG ((
DEBUG_WARN,
"%a: LocateHandleBuffer(): %r\n",
- __FUNCTION__,
+ __func__,
Status
));
return;
@@ -89,7 +89,7 @@ EnablePciDecoding ( DEBUG ((
DEBUG_WARN,
"%a: AllocatePool(): out of resources\n",
- __FUNCTION__
+ __func__
));
goto FreeHandles;
}
@@ -122,7 +122,7 @@ EnablePciDecoding ( DEBUG ((
DEBUG_WARN,
"%a: EfiPciIoAttributeOperationGet: %r\n",
- __FUNCTION__,
+ __func__,
Status
));
goto RestoreAttributes;
@@ -141,7 +141,7 @@ EnablePciDecoding ( DEBUG ((
DEBUG_WARN,
"%a: EfiPciIoAttributeOperationSupported: %r\n",
- __FUNCTION__,
+ __func__,
Status
));
goto RestoreAttributes;
@@ -161,7 +161,7 @@ EnablePciDecoding ( DEBUG ((
DEBUG_WARN,
"%a: EfiPciIoAttributeOperationEnable: %r\n",
- __FUNCTION__,
+ __func__,
Status
));
goto RestoreAttributes;
diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c index 68abc34f22..a073b292b7 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c @@ -238,7 +238,7 @@ CollectAllocationsRestrictedTo32Bit ( }
if (AddPointer->PointeeFile[QEMU_LOADER_FNAME_SIZE - 1] != '\0') {
- DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__));
Status = EFI_PROTOCOL_ERROR;
goto RollBack;
}
@@ -253,7 +253,7 @@ CollectAllocationsRestrictedTo32Bit ( DEBUG ((
DEBUG_VERBOSE,
"%a: restricting blob \"%a\" from 64-bit allocation\n",
- __FUNCTION__,
+ __func__,
AddPointer->PointeeFile
));
break;
@@ -330,7 +330,7 @@ ProcessCmdAllocate ( BLOB *Blob;
if (Allocate->File[QEMU_LOADER_FNAME_SIZE - 1] != '\0') {
- DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__));
return EFI_PROTOCOL_ERROR;
}
@@ -338,7 +338,7 @@ ProcessCmdAllocate ( DEBUG ((
DEBUG_ERROR,
"%a: unsupported alignment 0x%x\n",
- __FUNCTION__,
+ __func__,
Allocate->Alignment
));
return EFI_UNSUPPORTED;
@@ -349,7 +349,7 @@ ProcessCmdAllocate ( DEBUG ((
DEBUG_ERROR,
"%a: QemuFwCfgFindFile(\"%a\"): %r\n",
- __FUNCTION__,
+ __func__,
Allocate->File,
Status
));
@@ -392,7 +392,7 @@ ProcessCmdAllocate ( DEBUG ((
DEBUG_ERROR,
"%a: duplicated file \"%a\"\n",
- __FUNCTION__,
+ __func__,
Allocate->File
));
Status = EFI_PROTOCOL_ERROR;
@@ -410,7 +410,7 @@ ProcessCmdAllocate ( DEBUG_VERBOSE,
"%a: File=\"%a\" Alignment=0x%x Zone=%d Size=0x%Lx "
"Address=0x%Lx\n",
- __FUNCTION__,
+ __func__,
Allocate->File,
Allocate->Alignment,
Allocate->Zone,
@@ -477,7 +477,7 @@ ProcessCmdAddPointer ( if ((AddPointer->PointerFile[QEMU_LOADER_FNAME_SIZE - 1] != '\0') ||
(AddPointer->PointeeFile[QEMU_LOADER_FNAME_SIZE - 1] != '\0'))
{
- DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__));
return EFI_PROTOCOL_ERROR;
}
@@ -487,7 +487,7 @@ ProcessCmdAddPointer ( DEBUG ((
DEBUG_ERROR,
"%a: invalid blob reference(s) \"%a\" / \"%a\"\n",
- __FUNCTION__,
+ __func__,
AddPointer->PointerFile,
AddPointer->PointeeFile
));
@@ -504,7 +504,7 @@ ProcessCmdAddPointer ( DEBUG ((
DEBUG_ERROR,
"%a: invalid pointer location or size in \"%a\"\n",
- __FUNCTION__,
+ __func__,
AddPointer->PointerFile
));
return EFI_PROTOCOL_ERROR;
@@ -517,7 +517,7 @@ ProcessCmdAddPointer ( DEBUG ((
DEBUG_ERROR,
"%a: invalid pointer value in \"%a\"\n",
- __FUNCTION__,
+ __func__,
AddPointer->PointerFile
));
return EFI_PROTOCOL_ERROR;
@@ -537,7 +537,7 @@ ProcessCmdAddPointer ( DEBUG_ERROR,
"%a: relocated pointer value unrepresentable in "
"\"%a\"\n",
- __FUNCTION__,
+ __func__,
AddPointer->PointerFile
));
return EFI_PROTOCOL_ERROR;
@@ -549,7 +549,7 @@ ProcessCmdAddPointer ( DEBUG_VERBOSE,
"%a: PointerFile=\"%a\" PointeeFile=\"%a\" "
"PointerOffset=0x%x PointerSize=%d\n",
- __FUNCTION__,
+ __func__,
AddPointer->PointerFile,
AddPointer->PointeeFile,
AddPointer->PointerOffset,
@@ -585,7 +585,7 @@ ProcessCmdAddChecksum ( BLOB *Blob;
if (AddChecksum->File[QEMU_LOADER_FNAME_SIZE - 1] != '\0') {
- DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__));
return EFI_PROTOCOL_ERROR;
}
@@ -594,7 +594,7 @@ ProcessCmdAddChecksum ( DEBUG ((
DEBUG_ERROR,
"%a: invalid blob reference \"%a\"\n",
- __FUNCTION__,
+ __func__,
AddChecksum->File
));
return EFI_PROTOCOL_ERROR;
@@ -608,7 +608,7 @@ ProcessCmdAddChecksum ( DEBUG ((
DEBUG_ERROR,
"%a: invalid checksum range in \"%a\"\n",
- __FUNCTION__,
+ __func__,
AddChecksum->File
));
return EFI_PROTOCOL_ERROR;
@@ -622,7 +622,7 @@ ProcessCmdAddChecksum ( DEBUG_VERBOSE,
"%a: File=\"%a\" ResultOffset=0x%x Start=0x%x "
"Length=0x%x\n",
- __FUNCTION__,
+ __func__,
AddChecksum->File,
AddChecksum->ResultOffset,
AddChecksum->Start,
@@ -680,7 +680,7 @@ ProcessCmdWritePointer ( if ((WritePointer->PointerFile[QEMU_LOADER_FNAME_SIZE - 1] != '\0') ||
(WritePointer->PointeeFile[QEMU_LOADER_FNAME_SIZE - 1] != '\0'))
{
- DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__));
return EFI_PROTOCOL_ERROR;
}
@@ -694,7 +694,7 @@ ProcessCmdWritePointer ( DEBUG ((
DEBUG_ERROR,
"%a: invalid fw_cfg file or blob reference \"%a\" / \"%a\"\n",
- __FUNCTION__,
+ __func__,
WritePointer->PointerFile,
WritePointer->PointeeFile
));
@@ -710,7 +710,7 @@ ProcessCmdWritePointer ( DEBUG ((
DEBUG_ERROR,
"%a: invalid pointer location or size in \"%a\"\n",
- __FUNCTION__,
+ __func__,
WritePointer->PointerFile
));
return EFI_PROTOCOL_ERROR;
@@ -719,7 +719,7 @@ ProcessCmdWritePointer ( PointeeBlob = OrderedCollectionUserStruct (PointeeEntry);
PointerValue = WritePointer->PointeeOffset;
if (PointerValue >= PointeeBlob->Size) {
- DEBUG ((DEBUG_ERROR, "%a: invalid PointeeOffset\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: invalid PointeeOffset\n", __func__));
return EFI_PROTOCOL_ERROR;
}
@@ -736,7 +736,7 @@ ProcessCmdWritePointer ( DEBUG ((
DEBUG_ERROR,
"%a: pointer value unrepresentable in \"%a\"\n",
- __FUNCTION__,
+ __func__,
WritePointer->PointerFile
));
return EFI_PROTOCOL_ERROR;
@@ -776,7 +776,7 @@ ProcessCmdWritePointer ( DEBUG_VERBOSE,
"%a: PointerFile=\"%a\" PointeeFile=\"%a\" "
"PointerOffset=0x%x PointeeOffset=0x%x PointerSize=%d\n",
- __FUNCTION__,
+ __func__,
WritePointer->PointerFile,
WritePointer->PointeeFile,
WritePointer->PointerOffset,
@@ -822,7 +822,7 @@ UndoCmdWritePointer ( DEBUG ((
DEBUG_VERBOSE,
"%a: PointerFile=\"%a\" PointerOffset=0x%x PointerSize=%d\n",
- __FUNCTION__,
+ __func__,
WritePointer->PointerFile,
WritePointer->PointerOffset,
WritePointer->PointerSize
@@ -953,7 +953,7 @@ Process2ndPassCmdAddPointer ( DEBUG ((
DEBUG_VERBOSE,
"%a: PointerValue=0x%Lx already processed, skipping.\n",
- __FUNCTION__,
+ __func__,
PointerValue
));
Status = EFI_SUCCESS;
@@ -967,7 +967,7 @@ Process2ndPassCmdAddPointer ( DEBUG_VERBOSE,
"%a: checking for ACPI header in \"%a\" at 0x%Lx "
"(remaining: 0x%Lx): ",
- __FUNCTION__,
+ __func__,
AddPointer->PointeeFile,
PointerValue,
(UINT64)Blob2Remaining
@@ -1042,7 +1042,7 @@ Process2ndPassCmdAddPointer ( DEBUG ((
DEBUG_ERROR,
"%a: can't install more than %d tables\n",
- __FUNCTION__,
+ __func__,
INSTALLED_TABLES_MAX
));
Status = EFI_OUT_OF_RESOURCES;
@@ -1059,7 +1059,7 @@ Process2ndPassCmdAddPointer ( DEBUG ((
DEBUG_ERROR,
"%a: InstallAcpiTable(): %r\n",
- __FUNCTION__,
+ __func__,
Status
));
goto RollbackSeenPointer;
@@ -1128,7 +1128,7 @@ InstallQemuFwCfgTables ( DEBUG ((
DEBUG_ERROR,
"%a: \"etc/table-loader\" has invalid size 0x%Lx\n",
- __FUNCTION__,
+ __func__,
(UINT64)FwCfgSize
));
return EFI_PROTOCOL_ERROR;
@@ -1236,7 +1236,7 @@ InstallQemuFwCfgTables ( DEBUG ((
DEBUG_VERBOSE,
"%a: unknown loader command: 0x%x\n",
- __FUNCTION__,
+ __func__,
LoaderEntry->Type
));
break;
@@ -1311,7 +1311,7 @@ InstallQemuFwCfgTables ( S3Context = NULL;
}
- DEBUG ((DEBUG_INFO, "%a: installed %d tables\n", __FUNCTION__, Installed));
+ DEBUG ((DEBUG_INFO, "%a: installed %d tables\n", __func__, Installed));
UninstallQemuAcpiTableNotifyProtocol:
if (EFI_ERROR (Status)) {
@@ -1380,7 +1380,7 @@ RollbackWritePointersAndFreeTracker: DEBUG ((
DEBUG_VERBOSE,
"%a: freeing \"%a\"\n",
- __FUNCTION__,
+ __func__,
Blob->File
));
gBS->FreePages ((UINTN)Blob->Base, EFI_SIZE_TO_PAGES (Blob->Size));
|