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

@@ -358,7 +358,7 @@ PlatformMiscInitialization (
DEBUG ((
DEBUG_ERROR,
"%a: Unknown Host Bridge Device ID: 0x%04x\n",
__FUNCTION__,
__func__,
PlatformInfoHob->HostBridgeDevId
));
ASSERT (FALSE);
@@ -366,7 +366,7 @@ PlatformMiscInitialization (
}
if (PlatformInfoHob->HostBridgeDevId == CLOUDHV_DEVICE_ID) {
DEBUG ((DEBUG_INFO, "%a: Cloud Hypervisor is done.\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a: Cloud Hypervisor is done.\n", __func__));
return;
}
@@ -489,12 +489,12 @@ PlatformCpuCountBugCheck (
DEBUG ((
DEBUG_ERROR,
"%a: Present=%u Possible=%u\n",
__FUNCTION__,
__func__,
*Present,
*Possible
));
for (Idx = 0; Idx < ARRAY_SIZE (Message); ++Idx) {
DEBUG ((DEBUG_ERROR, "%a: %a\n", __FUNCTION__, Message[Idx]));
DEBUG ((DEBUG_ERROR, "%a: %a\n", __func__, Message[Idx]));
}
ParseStatus = QemuFwCfgParseBool (
@@ -505,7 +505,7 @@ PlatformCpuCountBugCheck (
DEBUG ((
DEBUG_WARN,
"%a: \"%a\" active. You've been warned.\n",
__FUNCTION__,
__func__,
CPUHP_BUGCHECK_OVERRIDE_FWCFG_FILE
));
//
@@ -531,7 +531,7 @@ PlatformCpuCountBugCheck (
DEBUG ((
DEBUG_WARN,
"%a: QEMU v2.7 reset bug: BootCpuCount=%d Present=%u\n",
__FUNCTION__,
__func__,
*BootCpuCount,
*Present
));
@@ -573,7 +573,7 @@ PlatformMaxCpuCountInitialization (
// until PcdCpuApInitTimeOutInMicroSeconds elapses (whichever is reached
// first).
//
DEBUG ((DEBUG_WARN, "%a: boot CPU count unavailable\n", __FUNCTION__));
DEBUG ((DEBUG_WARN, "%a: boot CPU count unavailable\n", __func__));
MaxCpuCount = PlatformInfoHob->DefaultMaxCpuNumber;
} else {
//
@@ -626,7 +626,7 @@ PlatformMaxCpuCountInitialization (
// steps. Both cases confirm modern mode.
//
CmdData2 = IoRead32 (CpuHpBase + QEMU_CPUHP_R_CMD_DATA2);
DEBUG ((DEBUG_VERBOSE, "%a: CmdData2=0x%x\n", __FUNCTION__, CmdData2));
DEBUG ((DEBUG_VERBOSE, "%a: CmdData2=0x%x\n", __func__, CmdData2));
if (CmdData2 != 0) {
//
// QEMU doesn't support the modern CPU hotplug interface. Assume that the
@@ -635,7 +635,7 @@ PlatformMaxCpuCountInitialization (
DEBUG ((
DEBUG_WARN,
"%a: modern CPU hotplug interface unavailable\n",
__FUNCTION__
__func__
));
MaxCpuCount = BootCpuCount;
} else {
@@ -693,7 +693,7 @@ PlatformMaxCpuCountInitialization (
DEBUG ((
DEBUG_INFO,
"%a: BootCpuCount=%d MaxCpuCount=%u\n",
__FUNCTION__,
__func__,
BootCpuCount,
MaxCpuCount
));