SecurityPkg: 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 SecurityPkg. 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:
committed by
mergify[bot]
parent
7b82da70ed
commit
dd0b33e3e5
@@ -188,14 +188,14 @@ ExchangeCommonBuffer (
|
||||
|
||||
// Step 0: Sanity check for input argument
|
||||
if (TcgNvs == NULL) {
|
||||
DEBUG ((DEBUG_ERROR, "%a - Input argument is NULL!\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_ERROR, "%a - Input argument is NULL!\n", __func__));
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
// Step 1: Grab the common buffer header
|
||||
Status = EfiGetSystemConfigurationTable (&gEdkiiPiSmmCommunicationRegionTableGuid, (VOID **)&PiSmmCommunicationRegionTable);
|
||||
if (EFI_ERROR (Status)) {
|
||||
DEBUG ((DEBUG_ERROR, "%a - Failed to locate SMM communciation common buffer - %r!\n", __FUNCTION__, Status));
|
||||
DEBUG ((DEBUG_ERROR, "%a - Failed to locate SMM communciation common buffer - %r!\n", __func__, Status));
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ ExchangeCommonBuffer (
|
||||
|
||||
if (Index >= PiSmmCommunicationRegionTable->NumberOfEntries) {
|
||||
// Could not find one that meets our goal...
|
||||
DEBUG ((DEBUG_ERROR, "%a - Could not find a common buffer that is big enough for NVS!\n", __FUNCTION__));
|
||||
DEBUG ((DEBUG_ERROR, "%a - Could not find a common buffer that is big enough for NVS!\n", __func__));
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
@@ -236,9 +236,9 @@ ExchangeCommonBuffer (
|
||||
Status = gBS->LocateProtocol (&gEfiMmCommunicationProtocolGuid, NULL, (VOID **)&MmCommunication);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = MmCommunication->Communicate (MmCommunication, CommHeader, &CommBufferSize);
|
||||
DEBUG ((DEBUG_INFO, "%a - Communicate() = %r\n", __FUNCTION__, Status));
|
||||
DEBUG ((DEBUG_INFO, "%a - Communicate() = %r\n", __func__, Status));
|
||||
} else {
|
||||
DEBUG ((DEBUG_ERROR, "%a - Failed to locate MmCommunication protocol - %r\n", __FUNCTION__, Status));
|
||||
DEBUG ((DEBUG_ERROR, "%a - Failed to locate MmCommunication protocol - %r\n", __func__, Status));
|
||||
return Status;
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ ExchangeCommonBuffer (
|
||||
DEBUG ((
|
||||
DEBUG_INFO,
|
||||
"%a Communication returned software SMI value. PP: 0x%x; MC: 0x%x.\n",
|
||||
__FUNCTION__,
|
||||
__func__,
|
||||
TcgNvs->PhysicalPresence.SoftwareSmi,
|
||||
TcgNvs->MemoryClear.SoftwareSmi
|
||||
));
|
||||
|
Reference in New Issue
Block a user