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:
committed by
mergify[bot]
parent
089013a697
commit
8ba392687b
@@ -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;
|
||||
|
@@ -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__
|
||||
));
|
||||
}
|
||||
}
|
||||
|
@@ -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
|
||||
));
|
||||
|
@@ -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
|
||||
));
|
||||
}
|
||||
|
Reference in New Issue
Block a user