summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
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/CpuHotplugSmm/CpuHotplug.c
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/CpuHotplugSmm/CpuHotplug.c')
-rw-r--r--OvmfPkg/CpuHotplugSmm/CpuHotplug.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
index 97ecd32eb6..d504163026 100644
--- a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
+++ b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c
@@ -135,7 +135,7 @@ ProcessHotAddedCpus (
DEBUG_VERBOSE,
"%a: APIC ID " FMT_APIC_ID " was hot-plugged "
"before; ignoring it\n",
- __FUNCTION__,
+ __func__,
NewApicId
));
PluggedIdx++;
@@ -155,7 +155,7 @@ ProcessHotAddedCpus (
DEBUG ((
DEBUG_ERROR,
"%a: no room for APIC ID " FMT_APIC_ID "\n",
- __FUNCTION__,
+ __func__,
NewApicId
));
return EFI_OUT_OF_RESOURCES;
@@ -190,7 +190,7 @@ ProcessHotAddedCpus (
DEBUG ((
DEBUG_ERROR,
"%a: AddProcessor(" FMT_APIC_ID "): %r\n",
- __FUNCTION__,
+ __func__,
NewApicId,
Status
));
@@ -201,7 +201,7 @@ ProcessHotAddedCpus (
DEBUG_INFO,
"%a: hot-added APIC ID " FMT_APIC_ID ", SMBASE 0x%Lx, "
"EFI_SMM_CPU_SERVICE_PROTOCOL assigned number %Lu\n",
- __FUNCTION__,
+ __func__,
NewApicId,
(UINT64)mCpuHotPlugData->SmBase[NewSlot],
(UINT64)NewProcessorNumberByProtocol
@@ -310,7 +310,7 @@ EjectCpu (
DEBUG_INFO,
"%a: Unplugged ProcessorNum %u, "
"QemuSelector %Lu\n",
- __FUNCTION__,
+ __func__,
Idx,
QemuSelector
));
@@ -454,7 +454,7 @@ UnplugCpus (
DEBUG_VERBOSE,
"%a: did not find APIC ID " FMT_APIC_ID
" to unplug\n",
- __FUNCTION__,
+ __func__,
RemoveApicId
));
ToUnplugIdx++;
@@ -469,7 +469,7 @@ UnplugCpus (
DEBUG ((
DEBUG_ERROR,
"%a: RemoveProcessor(" FMT_APIC_ID "): %r\n",
- __FUNCTION__,
+ __func__,
RemoveApicId,
Status
));
@@ -493,7 +493,7 @@ UnplugCpus (
DEBUG_ERROR,
"%a: ProcessorNum %Lu maps to QemuSelector %Lu, "
"cannot also map to %u\n",
- __FUNCTION__,
+ __func__,
(UINT64)ProcessorNum,
mCpuHotEjectData->QemuSelectorMap[ProcessorNum],
QemuSelector
@@ -511,7 +511,7 @@ UnplugCpus (
DEBUG_INFO,
"%a: Started hot-unplug on ProcessorNum %Lu, APIC ID "
FMT_APIC_ID ", QemuSelector %u\n",
- __FUNCTION__,
+ __func__,
(UINT64)ProcessorNum,
RemoveApicId,
QemuSelector
@@ -635,7 +635,7 @@ CpuHotplugMmi (
DEBUG ((
DEBUG_ERROR,
"%a: failed to read ICH9_APM_CNT: %r\n",
- __FUNCTION__,
+ __func__,
Status
));
//
@@ -736,7 +736,7 @@ CpuHotplugEntry (
(VOID **)&mMmCpuIo
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: locate MmCpuIo: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: locate MmCpuIo: %r\n", __func__, Status));
goto Fatal;
}
@@ -749,7 +749,7 @@ CpuHotplugEntry (
DEBUG ((
DEBUG_ERROR,
"%a: locate MmCpuService: %r\n",
- __FUNCTION__,
+ __func__,
Status
));
goto Fatal;
@@ -767,7 +767,7 @@ CpuHotplugEntry (
if (mCpuHotPlugData == NULL) {
Status = EFI_NOT_FOUND;
- DEBUG ((DEBUG_ERROR, "%a: CPU_HOT_PLUG_DATA: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: CPU_HOT_PLUG_DATA: %r\n", __func__, Status));
goto Fatal;
}
@@ -787,7 +787,7 @@ CpuHotplugEntry (
}
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: CPU_HOT_EJECT_DATA: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: CPU_HOT_EJECT_DATA: %r\n", __func__, Status));
goto Fatal;
}
@@ -799,7 +799,7 @@ CpuHotplugEntry (
RETURN_ERROR (SafeUintnMult (sizeof (UINT32), Len, &SizeSel)))
{
Status = EFI_ABORTED;
- DEBUG ((DEBUG_ERROR, "%a: invalid CPU_HOT_PLUG_DATA\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: invalid CPU_HOT_PLUG_DATA\n", __func__));
goto Fatal;
}
@@ -809,7 +809,7 @@ CpuHotplugEntry (
(VOID **)&mPluggedApicIds
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: MmAllocatePool(): %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: MmAllocatePool(): %r\n", __func__, Status));
goto Fatal;
}
@@ -819,7 +819,7 @@ CpuHotplugEntry (
(VOID **)&mToUnplugApicIds
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: MmAllocatePool(): %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: MmAllocatePool(): %r\n", __func__, Status));
goto ReleasePluggedApicIds;
}
@@ -829,7 +829,7 @@ CpuHotplugEntry (
(VOID **)&mToUnplugSelectors
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: MmAllocatePool(): %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: MmAllocatePool(): %r\n", __func__, Status));
goto ReleaseToUnplugApicIds;
}
@@ -874,7 +874,7 @@ CpuHotplugEntry (
DEBUG ((
DEBUG_ERROR,
"%a: modern CPU hotplug interface: %r\n",
- __FUNCTION__,
+ __func__,
Status
));
goto ReleasePostSmmPen;
@@ -892,7 +892,7 @@ CpuHotplugEntry (
DEBUG ((
DEBUG_ERROR,
"%a: MmiHandlerRegister(): %r\n",
- __FUNCTION__,
+ __func__,
Status
));
goto ReleasePostSmmPen;