UefiCpuPkg: 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
UefiCpuPkg.

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: Ray Ni <ray.ni@intel.com>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
This commit is contained in:
Rebecca Cran
2023-04-06 13:49:10 -06:00
committed by mergify[bot]
parent 1639b6bf07
commit 089013a697
13 changed files with 32 additions and 32 deletions

View File

@@ -45,7 +45,7 @@ InitUTContext (
Status = MpServicesUnitTestWhoAmI (LocalContext->MpServices, &BspNumber);
UT_ASSERT_NOT_EFI_ERROR (Status);
DEBUG ((DEBUG_INFO, "%a: BspNumber = 0x%x\n", __FUNCTION__, BspNumber));
DEBUG ((DEBUG_INFO, "%a: BspNumber = 0x%x\n", __func__, BspNumber));
Status = MpServicesUnitTestGetNumberOfProcessors (
LocalContext->MpServices,
@@ -56,7 +56,7 @@ InitUTContext (
DEBUG ((
DEBUG_INFO,
"%a: NumberOfProcessors = 0x%x, NumberOfEnabledProcessors = 0x%x\n",
__FUNCTION__,
__func__,
NumberOfProcessors,
NumberOfEnabledProcessors
));
@@ -89,7 +89,7 @@ InitUTContext (
LocalContext->DisabledApNumber[IndexOfDisabledAPs] = ProcessorNumber;
IndexOfDisabledAPs++;
DEBUG ((DEBUG_INFO, "%a: AP(0x%x) is disabled and temporarily enable it.\n", __FUNCTION__, ProcessorNumber));
DEBUG ((DEBUG_INFO, "%a: AP(0x%x) is disabled and temporarily enable it.\n", __func__, ProcessorNumber));
Status = MpServicesUnitTestEnableDisableAP (
LocalContext->MpServices,
ProcessorNumber,
@@ -134,7 +134,7 @@ CheckUTContext (
if (BspNumber != LocalContext->BspNumber) {
LocalContext->BspNumber = BspNumber;
DEBUG ((DEBUG_INFO, "%a: New BspNumber = 0x%x\n", __FUNCTION__, BspNumber));
DEBUG ((DEBUG_INFO, "%a: New BspNumber = 0x%x\n", __func__, BspNumber));
}
ASSERT (BspNumber == LocalContext->BspNumber);
@@ -148,11 +148,11 @@ CheckUTContext (
if (NumberOfProcessors != LocalContext->NumberOfProcessors) {
LocalContext->NumberOfProcessors = NumberOfProcessors;
DEBUG ((DEBUG_INFO, "%a: New NumberOfProcessors = 0x%x\n", __FUNCTION__, NumberOfProcessors));
DEBUG ((DEBUG_INFO, "%a: New NumberOfProcessors = 0x%x\n", __func__, NumberOfProcessors));
}
if (NumberOfEnabledProcessors != LocalContext->NumberOfProcessors) {
DEBUG ((DEBUG_INFO, "%a: New NumberOfEnabledProcessors = 0x%x\n", __FUNCTION__, NumberOfEnabledProcessors));
DEBUG ((DEBUG_INFO, "%a: New NumberOfEnabledProcessors = 0x%x\n", __func__, NumberOfEnabledProcessors));
for (ProcessorNumber = 0; ProcessorNumber < LocalContext->NumberOfProcessors; ProcessorNumber++) {
Status = MpServicesUnitTestGetProcessorInfo (
@@ -163,7 +163,7 @@ CheckUTContext (
ASSERT_EFI_ERROR (Status);
if (!(ProcessorInfoBuffer.StatusFlag & PROCESSOR_ENABLED_BIT)) {
DEBUG ((DEBUG_INFO, "%a: AP(0x%x) is disabled unexpectedly and reenable it.\n", __FUNCTION__, ProcessorNumber));
DEBUG ((DEBUG_INFO, "%a: AP(0x%x) is disabled unexpectedly and reenable it.\n", __func__, ProcessorNumber));
Status = MpServicesUnitTestEnableDisableAP (
LocalContext->MpServices,
ProcessorNumber,
@@ -204,7 +204,7 @@ FreeUTContext (
DEBUG ((
DEBUG_INFO,
"%a: Disable AP(0x%x) to restore its state.\n",
__FUNCTION__,
__func__,
LocalContext->DisabledApNumber[IndexOfDisabledAPs]
));