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

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>
This commit is contained in:
Rebecca Cran 2023-04-06 13:47:56 -06:00 committed by mergify[bot]
parent f2cc962cd2
commit 1639b6bf07
17 changed files with 44 additions and 44 deletions

View File

@ -106,7 +106,7 @@ InstallCloudHvAcpiTables (
} // while
if (DsdtPtr == NULL) {
DEBUG ((DEBUG_ERROR, "%a: no DSDT found\n", __FUNCTION__));
DEBUG ((DEBUG_ERROR, "%a: no DSDT found\n", __func__));
return EFI_NOT_FOUND;
}
@ -151,7 +151,7 @@ CloudHvAcpiPlatformEntryPoint (
DEBUG ((
DEBUG_ERROR,
"%a: Fail to install Acpi table: %r\n",
__FUNCTION__,
__func__,
Status
));
CpuDeadLoop ();

View File

@ -150,7 +150,7 @@ ArmVirtGicArchLibConstructor (
break;
default:
DEBUG ((DEBUG_ERROR, "%a: No GIC revision specified!\n", __FUNCTION__));
DEBUG ((DEBUG_ERROR, "%a: No GIC revision specified!\n", __func__));
return RETURN_NOT_FOUND;
}

View File

@ -42,7 +42,7 @@ ArmVirtPL031FdtClientLibConstructor (
DEBUG ((
DEBUG_WARN,
"%a: No 'arm,pl031' compatible DT node found\n",
__FUNCTION__
__func__
));
return EFI_SUCCESS;
}
@ -58,7 +58,7 @@ ArmVirtPL031FdtClientLibConstructor (
DEBUG ((
DEBUG_WARN,
"%a: No 'reg' property found in 'arm,pl031' compatible DT node\n",
__FUNCTION__
__func__
));
return EFI_SUCCESS;
}

View File

@ -65,7 +65,7 @@ ArmPsciResetSystemLibConstructor (
DEBUG ((
DEBUG_ERROR,
"%a: Unknown PSCI method \"%a\"\n",
__FUNCTION__,
__func__,
Prop
));
return EFI_NOT_FOUND;
@ -105,7 +105,7 @@ ResetCold (
break;
default:
DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __FUNCTION__));
DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __func__));
}
}
@ -154,7 +154,7 @@ ResetShutdown (
break;
default:
DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __FUNCTION__));
DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __func__));
}
}

View File

@ -73,7 +73,7 @@ DiscoverPsciMethod (
DEBUG ((
DEBUG_ERROR,
"%a: Missing PSCI method property\n",
__FUNCTION__
__func__
));
return PsciMethodUnknown;
}
@ -86,7 +86,7 @@ DiscoverPsciMethod (
DEBUG ((
DEBUG_ERROR,
"%a: Unknown PSCI method \"%a\"\n",
__FUNCTION__,
__func__,
Prop
));
return PsciMethodUnknown;
@ -119,7 +119,7 @@ PerformPsciAction (
break;
default:
DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __FUNCTION__));
DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __func__));
ASSERT (FALSE);
}
}

View File

@ -98,7 +98,7 @@ CloudHvVirtMemInfoPeiLibConstructor (
DEBUG ((
DEBUG_INFO,
"%a: System RAM @ 0x%lx - 0x%lx\n",
__FUNCTION__,
__func__,
CurBase,
CurBase + CurSize - 1
));
@ -124,7 +124,7 @@ CloudHvVirtMemInfoPeiLibConstructor (
DEBUG ((
DEBUG_WARN,
"%a: memory node larger than %d will not be included into Memory System\n",
__FUNCTION__,
__func__,
CLOUDHV_MAX_MEM_NODE_NUM
));
break;
@ -133,7 +133,7 @@ CloudHvVirtMemInfoPeiLibConstructor (
DEBUG ((
DEBUG_ERROR,
"%a: Failed to parse FDT memory node\n",
__FUNCTION__
__func__
));
}
}
@ -186,7 +186,7 @@ ArmVirtGetMemoryMap (
);
if (VirtualMemoryTable == NULL) {
DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __FUNCTION__));
DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __func__));
return;
}
@ -205,7 +205,7 @@ ArmVirtGetMemoryMap (
"\tPhysicalBase: 0x%lX\n"
"\tVirtualBase: 0x%lX\n"
"\tLength: 0x%lX\n",
__FUNCTION__,
__func__,
MemNodeIndex,
VirtualMemoryTable[Index].PhysicalBase,
VirtualMemoryTable[Index].VirtualBase,

View File

@ -147,7 +147,7 @@ KvmtoolRtcFdtClientLibConstructor (
DEBUG ((
DEBUG_ERROR,
"%a: No 'motorola,mc146818' compatible DT node found\n",
__FUNCTION__
__func__
));
return Status;
}
@ -163,7 +163,7 @@ KvmtoolRtcFdtClientLibConstructor (
DEBUG ((
DEBUG_ERROR,
"%a: No 'reg' property found in 'motorola,mc146818' compatible DT node\n",
__FUNCTION__
__func__
));
return Status;
}

View File

@ -54,7 +54,7 @@ ArmVirtGetMemoryMap (
DEBUG ((
DEBUG_ERROR,
"%a: Error: Failed to Allocate Pages\n",
__FUNCTION__
__func__
));
return;
}

View File

@ -265,7 +265,7 @@ NorFlashPlatformLibConstructor (
DEBUG ((
DEBUG_ERROR,
"%a: GetNodeProperty ('label') failed (Status == %r)\n",
__FUNCTION__,
__func__,
Status
));
} else if (AsciiStrCmp (Label, LABEL_UEFI_VAR_STORE) == 0) {
@ -284,7 +284,7 @@ NorFlashPlatformLibConstructor (
DEBUG ((
DEBUG_ERROR,
"%a: GetNodeProperty () failed (Status == %r)\n",
__FUNCTION__,
__func__,
Status
));
continue;

View File

@ -75,7 +75,7 @@ VirtNorFlashPlatformGetDevices (
DEBUG ((
DEBUG_ERROR,
"%a: GetNodeProperty () failed (Status == %r)\n",
__FUNCTION__,
__func__,
Status
));
continue;

View File

@ -190,7 +190,7 @@ FilterAndProcess (
DEBUG ((
DEBUG_VERBOSE,
"%a: %g: %r\n",
__FUNCTION__,
__func__,
ProtocolGuid,
Status
));
@ -261,7 +261,7 @@ IsPciDisplay (
&Pci
);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __FUNCTION__, ReportText, Status));
DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __func__, ReportText, Status));
return FALSE;
}
@ -410,7 +410,7 @@ IsVirtioPciRng (
return FALSE;
PciError:
DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __FUNCTION__, ReportText, Status));
DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __func__, ReportText, Status));
return FALSE;
}
@ -437,7 +437,7 @@ Connect (
DEBUG ((
EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE,
"%a: %s: %r\n",
__FUNCTION__,
__func__,
ReportText,
Status
));
@ -463,7 +463,7 @@ AddOutput (
DEBUG ((
DEBUG_ERROR,
"%a: %s: handle %p: device path not found\n",
__FUNCTION__,
__func__,
ReportText,
Handle
));
@ -475,7 +475,7 @@ AddOutput (
DEBUG ((
DEBUG_ERROR,
"%a: %s: adding to ConOut: %r\n",
__FUNCTION__,
__func__,
ReportText,
Status
));
@ -487,7 +487,7 @@ AddOutput (
DEBUG ((
DEBUG_ERROR,
"%a: %s: adding to ErrOut: %r\n",
__FUNCTION__,
__func__,
ReportText,
Status
));
@ -497,7 +497,7 @@ AddOutput (
DEBUG ((
DEBUG_VERBOSE,
"%a: %s: added to ConOut and ErrOut\n",
__FUNCTION__,
__func__,
ReportText
));
}
@ -698,7 +698,7 @@ RemoveStaleFvFileOptions (
DEBUG ((
EFI_ERROR (Status) ? DEBUG_WARN : DEBUG_VERBOSE,
"%a: removing stale Boot#%04x %s: %r\n",
__FUNCTION__,
__func__,
(UINT32)BootOptions[Index].OptionNumber,
DevicePathString == NULL ? L"<unavailable>" : DevicePathString,
Status
@ -878,7 +878,7 @@ PlatformBootManagerBeforeConsole (
DEBUG ((
EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE,
"%a: SetVariable(%s, %u): %r\n",
__FUNCTION__,
__func__,
EFI_TIME_OUT_VARIABLE_NAME,
FrontPageTimeout,
Status

View File

@ -66,7 +66,7 @@ TryRunningQemuKernel (
DEBUG ((
DEBUG_ERROR,
"%a: QemuStartKernelImage(): %r\n",
__FUNCTION__,
__func__,
Status
));
}

View File

@ -111,7 +111,7 @@ PlatformPeim (
UartBase = fdt64_to_cpu (ReadUnaligned64 (RegProp));
DEBUG ((DEBUG_INFO, "%a: PL011 UART @ 0x%lx\n", __FUNCTION__, UartBase));
DEBUG ((DEBUG_INFO, "%a: PL011 UART @ 0x%lx\n", __func__, UartBase));
*UartHobData = UartBase;
break;
@ -148,7 +148,7 @@ PlatformPeim (
DEBUG ((
DEBUG_WARN,
"%a: 'ranges' property has unexpected size %d\n",
__FUNCTION__,
__func__,
RangesLen
));
break;
@ -175,7 +175,7 @@ PlatformPeim (
if (FeaturePcdGet (PcdTpm2SupportEnabled)) {
if (TpmBase != 0) {
DEBUG ((DEBUG_INFO, "%a: TPM @ 0x%lx\n", __FUNCTION__, TpmBase));
DEBUG ((DEBUG_INFO, "%a: TPM @ 0x%lx\n", __func__, TpmBase));
Status = (EFI_STATUS)PcdSet64S (PcdTpmBaseAddress, TpmBase);
ASSERT_EFI_ERROR (Status);

View File

@ -83,7 +83,7 @@ ArmVirtGetMemoryMap (
);
if (VirtualMemoryTable == NULL) {
DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __FUNCTION__));
DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __func__));
return;
}
@ -99,7 +99,7 @@ ArmVirtGetMemoryMap (
"\tPhysicalBase: 0x%lX\n"
"\tVirtualBase: 0x%lX\n"
"\tLength: 0x%lX\n",
__FUNCTION__,
__func__,
VirtualMemoryTable[0].PhysicalBase,
VirtualMemoryTable[0].VirtualBase,
VirtualMemoryTable[0].Length

View File

@ -64,7 +64,7 @@ QemuVirtMemInfoPeiLibConstructor (
DEBUG ((
DEBUG_INFO,
"%a: System RAM @ 0x%lx - 0x%lx\n",
__FUNCTION__,
__func__,
CurBase,
CurBase + CurSize - 1
));
@ -77,7 +77,7 @@ QemuVirtMemInfoPeiLibConstructor (
DEBUG ((
DEBUG_ERROR,
"%a: Failed to parse FDT memory node\n",
__FUNCTION__
__func__
));
}
}

View File

@ -68,7 +68,7 @@ GetXenArmAcpiRsdp (
DEBUG ((
DEBUG_WARN,
"%a: No 'xen,guest-acpi' compatible DT node found\n",
__FUNCTION__
__func__
));
return EFI_NOT_FOUND;
}
@ -140,7 +140,7 @@ InstallXenArmTables (
//
Status = GetXenArmAcpiRsdp (&XenAcpiRsdpStructurePtr);
if (EFI_ERROR (Status)) {
DEBUG ((DEBUG_INFO, "%a: No RSDP table found\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a: No RSDP table found\n", __func__));
return Status;
}

View File

@ -49,7 +49,7 @@ InitializeXenioFdtDxe (
DEBUG ((
DEBUG_WARN,
"%a: No 'xen,xen' compatible DT node found\n",
__FUNCTION__
__func__
));
return EFI_UNSUPPORTED;
}
@ -70,7 +70,7 @@ InitializeXenioFdtDxe (
DEBUG_ERROR,
"%a: XenIoMmioInstall () failed on a new handle "
"(Status == %r)\n",
__FUNCTION__,
__func__,
Status
));
return Status;