diff options
author | Rebecca Cran <rebecca@bsdio.com> | 2023-04-06 13:50:26 -0600 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-04-10 14:19:57 +0000 |
commit | dd0b33e3e55957aecbae6aa5cebdc6c14e6e8932 (patch) | |
tree | adcf42806767e4448a954218cccd9cade86dcacd /SecurityPkg/Tcg/Tcg2Acpi | |
parent | 7b82da70edf7dda2c6f4e853f100df620bd5c0f3 (diff) | |
download | edk2-dd0b33e3e55957aecbae6aa5cebdc6c14e6e8932.zip edk2-dd0b33e3e55957aecbae6aa5cebdc6c14e6e8932.tar.gz edk2-dd0b33e3e55957aecbae6aa5cebdc6c14e6e8932.tar.bz2 |
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>
Diffstat (limited to 'SecurityPkg/Tcg/Tcg2Acpi')
-rw-r--r-- | SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.c b/SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.c index e8822cb..76123fc 100644 --- a/SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.c +++ b/SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.c @@ -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
));
|