summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/Fdt
diff options
context:
space:
mode:
authorRebecca Cran <rebecca@bsdio.com>2023-04-06 13:49:41 -0600
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-10 14:19:57 +0000
commit8ba392687b6f7fcb6e333756edd090003c57402e (patch)
tree040194cbfaa73f764e86e050e9bc00b58e4fc60b /OvmfPkg/Fdt
parent089013a69724687f4051fc88367c9eb74def4284 (diff)
downloadedk2-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/Fdt')
-rw-r--r--OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c28
-rw-r--r--OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c4
-rw-r--r--OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c10
-rw-r--r--OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.c10
4 files changed, 26 insertions, 26 deletions
diff --git a/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
index 14b41a533e..0d116f60dd 100644
--- a/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
+++ b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c
@@ -61,7 +61,7 @@ MapGcdMmioSpace (
DEBUG ((
DEBUG_ERROR,
"%a: failed to add GCD memory space for region [0x%Lx+0x%Lx)\n",
- __FUNCTION__,
+ __func__,
Base,
Size
));
@@ -73,7 +73,7 @@ MapGcdMmioSpace (
DEBUG ((
DEBUG_ERROR,
"%a: failed to set memory space attributes for region [0x%Lx+0x%Lx)\n",
- __FUNCTION__,
+ __func__,
Base,
Size
));
@@ -143,7 +143,7 @@ ProcessPciHost (
DEBUG ((
DEBUG_INFO,
"%a: No 'pci-host-ecam-generic' compatible DT node found\n",
- __FUNCTION__
+ __func__
));
return EFI_NOT_FOUND;
}
@@ -169,7 +169,7 @@ ProcessPciHost (
DEBUG ((
DEBUG_ERROR,
"%a: 'reg' property not found or invalid\n",
- __FUNCTION__
+ __func__
));
return EFI_PROTOCOL_ERROR;
}
@@ -194,7 +194,7 @@ ProcessPciHost (
DEBUG ((
DEBUG_ERROR,
"%a: 'bus-range' not found or invalid\n",
- __FUNCTION__
+ __func__
));
return EFI_PROTOCOL_ERROR;
}
@@ -212,7 +212,7 @@ ProcessPciHost (
DEBUG ((
DEBUG_ERROR,
"%a: invalid 'bus-range' and/or 'reg'\n",
- __FUNCTION__
+ __func__
));
return EFI_PROTOCOL_ERROR;
}
@@ -224,7 +224,7 @@ ProcessPciHost (
if (EFI_ERROR (Status) || (Len == 0) ||
(Len % sizeof (DTB_PCI_HOST_RANGE_RECORD) != 0))
{
- DEBUG ((DEBUG_ERROR, "%a: 'ranges' not found or invalid\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: 'ranges' not found or invalid\n", __func__));
return EFI_PROTOCOL_ERROR;
}
@@ -251,7 +251,7 @@ ProcessPciHost (
if ((*Mmio32Base > MAX_UINT32) || (*Mmio32Size > MAX_UINT32) ||
(*Mmio32Base + *Mmio32Size > SIZE_4GB))
{
- DEBUG ((DEBUG_ERROR, "%a: MMIO32 space invalid\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: MMIO32 space invalid\n", __func__));
return EFI_PROTOCOL_ERROR;
}
@@ -262,7 +262,7 @@ ProcessPciHost (
DEBUG_ERROR,
"%a: unsupported nonzero MMIO32 translation "
"0x%Lx\n",
- __FUNCTION__,
+ __func__,
Mmio32Translation
));
return EFI_UNSUPPORTED;
@@ -282,7 +282,7 @@ ProcessPciHost (
DEBUG_ERROR,
"%a: unsupported nonzero MMIO64 translation "
"0x%Lx\n",
- __FUNCTION__,
+ __func__,
Mmio64Translation
));
return EFI_UNSUPPORTED;
@@ -293,7 +293,7 @@ ProcessPciHost (
}
if (*Mmio32Size == 0) {
- DEBUG ((DEBUG_ERROR, "%a: MMIO32 space empty\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: MMIO32 space empty\n", __func__));
return EFI_PROTOCOL_ERROR;
}
@@ -307,7 +307,7 @@ ProcessPciHost (
DEBUG_INFO,
"%a: Config[0x%Lx+0x%Lx) Bus[0x%x..0x%x] "
"Io[0x%Lx+0x%Lx)@0x%Lx Mem32[0x%Lx+0x%Lx)@0x0 Mem64[0x%Lx+0x%Lx)@0x0\n",
- __FUNCTION__,
+ __func__,
ConfigBase,
ConfigSize,
*BusMin,
@@ -370,7 +370,7 @@ PciHostBridgeGetRootBridges (
PCI_ROOT_BRIDGE_APERTURE PMemAbove4G;
if (PcdGet64 (PcdPciExpressBaseAddress) == 0) {
- DEBUG ((DEBUG_INFO, "%a: PCI host bridge not present\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: PCI host bridge not present\n", __func__));
*Count = 0;
return NULL;
@@ -390,7 +390,7 @@ PciHostBridgeGetRootBridges (
DEBUG ((
DEBUG_ERROR,
"%a: failed to discover PCI host bridge: %r\n",
- __FUNCTION__,
+ __func__,
Status
));
*Count = 0;
diff --git a/OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c b/OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c
index b5a6718146..a3b09e547f 100644
--- a/OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c
+++ b/OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c
@@ -58,7 +58,7 @@ GetPciIoTranslation (
if (EFI_ERROR (Status) || (Len == 0) ||
(Len % sizeof (DTB_PCI_HOST_RANGE_RECORD) != 0))
{
- DEBUG ((DEBUG_ERROR, "%a: 'ranges' not found or invalid\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: 'ranges' not found or invalid\n", __func__));
return RETURN_PROTOCOL_ERROR;
}
@@ -152,7 +152,7 @@ FdtPciPcdProducerLibConstructor (
DEBUG ((
DEBUG_WARN,
"%a: 'pci-host-ecam-generic' device encountered with no I/O range\n",
- __FUNCTION__
+ __func__
));
}
}
diff --git a/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c b/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c
index 87bc8b6827..779bf5c827 100644
--- a/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c
+++ b/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c
@@ -93,7 +93,7 @@ InitializeHighMemDxe (
DEBUG ((
DEBUG_WARN,
"%a: Region 0x%lx - 0x%lx not found in the GCD memory space map\n",
- __FUNCTION__,
+ __func__,
CurBase,
CurBase + CurSize - 1
));
@@ -112,7 +112,7 @@ InitializeHighMemDxe (
DEBUG ((
DEBUG_ERROR,
"%a: Failed to add System RAM @ 0x%lx - 0x%lx (%r)\n",
- __FUNCTION__,
+ __func__,
CurBase,
CurBase + CurSize - 1,
Status
@@ -129,7 +129,7 @@ InitializeHighMemDxe (
DEBUG ((
DEBUG_WARN,
"%a: gDS->SetMemorySpaceAttributes() failed on region 0x%lx - 0x%lx (%r)\n",
- __FUNCTION__,
+ __func__,
CurBase,
CurBase + CurSize - 1,
Status
@@ -160,7 +160,7 @@ InitializeHighMemDxe (
DEBUG ((
DEBUG_ERROR,
"%a: Failed to set System RAM @ 0x%lx - 0x%lx attribute (%r)\n",
- __FUNCTION__,
+ __func__,
CurBase,
CurBase + CurSize - 1,
Status
@@ -169,7 +169,7 @@ InitializeHighMemDxe (
DEBUG ((
DEBUG_INFO,
"%a: Add System RAM @ 0x%lx - 0x%lx\n",
- __FUNCTION__,
+ __func__,
CurBase,
CurBase + CurSize - 1
));
diff --git a/OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.c b/OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.c
index 619740e6e7..668090dbea 100644
--- a/OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.c
+++ b/OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.c
@@ -75,7 +75,7 @@ InitializeVirtioFdtDxe (
DEBUG ((
DEBUG_ERROR,
"%a: GetNodeProperty () failed (Status == %r)\n",
- __FUNCTION__,
+ __func__,
Status
));
continue;
@@ -93,7 +93,7 @@ InitializeVirtioFdtDxe (
sizeof (VIRTIO_TRANSPORT_DEVICE_PATH)
);
if (DevicePath == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Out of memory\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Out of memory\n", __func__));
continue;
}
@@ -117,7 +117,7 @@ InitializeVirtioFdtDxe (
DEBUG_ERROR,
"%a: Failed to install the EFI_DEVICE_PATH "
"protocol on a new handle (Status == %r)\n",
- __FUNCTION__,
+ __func__,
Status
));
FreePool (DevicePath);
@@ -130,7 +130,7 @@ InitializeVirtioFdtDxe (
DEBUG_ERROR,
"%a: Failed to install VirtIO transport @ 0x%Lx "
"on handle %p (Status == %r)\n",
- __FUNCTION__,
+ __func__,
RegBase,
Handle,
Status
@@ -152,7 +152,7 @@ InitializeVirtioFdtDxe (
DEBUG_ERROR,
"%a: Error occurred while iterating DT nodes "
"(FindNodeStatus == %r)\n",
- __FUNCTION__,
+ __func__,
FindNodeStatus
));
}