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:
Rebecca Cran
2023-04-06 13:50:26 -06:00
committed by mergify[bot]
parent 7b82da70ed
commit dd0b33e3e5
17 changed files with 109 additions and 109 deletions

View File

@@ -314,7 +314,7 @@ FreezeLockDevice (
FreeAlignedPages (Asb, EFI_SIZE_TO_PAGES (sizeof (EFI_ATA_STATUS_BLOCK)));
DEBUG ((DEBUG_INFO, "%a() - %r\n", __FUNCTION__, Status));
DEBUG ((DEBUG_INFO, "%a() - %r\n", __func__, Status));
return Status;
}
@@ -449,7 +449,7 @@ HddPasswordEndOfDxeEventNotify (
EFI_STATUS Status;
ATA_IDENTIFY_DATA IdentifyData;
DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__));
mHddPasswordEndOfDxe = TRUE;
@@ -503,7 +503,7 @@ HddPasswordEndOfDxeEventNotify (
}
}
DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__));
gBS->CloseEvent (Event);
}
@@ -620,7 +620,7 @@ SaveHddPasswordVariable (
UINT8 HashData[SHA256_DIGEST_SIZE];
UINT8 SaltData[PASSWORD_SALT_SIZE];
DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__));
Delete = FALSE;
if (!PasswordIsFullZero (Password)) {
@@ -765,7 +765,7 @@ SaveHddPasswordVariable (
FreePool (Variable);
}
DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__));
}
/**
@@ -791,7 +791,7 @@ GetSavedHddPasswordVariable (
UINTN VariableSize;
BOOLEAN Found;
DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__));
Variable = NULL;
VariableSize = 0;
@@ -835,7 +835,7 @@ GetSavedHddPasswordVariable (
DEBUG ((DEBUG_INFO, "The variable node for the HDD password device is not found\n"));
}
DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__));
return Found;
}
@@ -864,7 +864,7 @@ ValidateHddPassword (
BOOLEAN HashOk;
UINT8 HashData[SHA256_DIGEST_SIZE];
DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__));
if (!GetSavedHddPasswordVariable (ConfigFormEntry, &HddPasswordVariable)) {
DEBUG ((DEBUG_INFO, "GetSavedHddPasswordVariable failed\n"));
@@ -884,7 +884,7 @@ ValidateHddPassword (
Status = EFI_SUCCESS;
}
DEBUG ((DEBUG_INFO, "%a() - exit (%r)\n", __FUNCTION__, Status));
DEBUG ((DEBUG_INFO, "%a() - exit (%r)\n", __func__, Status));
return Status;
}
@@ -982,7 +982,7 @@ UnlockHddPassword (
ZeroMem (Buffer, sizeof (Buffer));
DEBUG ((DEBUG_INFO, "%a() - %r\n", __FUNCTION__, Status));
DEBUG ((DEBUG_INFO, "%a() - %r\n", __func__, Status));
return Status;
}
@@ -1080,7 +1080,7 @@ DisableHddPassword (
ZeroMem (Buffer, sizeof (Buffer));
DEBUG ((DEBUG_INFO, "%a() - %r\n", __FUNCTION__, Status));
DEBUG ((DEBUG_INFO, "%a() - %r\n", __func__, Status));
return Status;
}
@@ -1185,7 +1185,7 @@ SetHddPassword (
ZeroMem (Buffer, sizeof (Buffer));
DEBUG ((DEBUG_INFO, "%a() - %r\n", __FUNCTION__, Status));
DEBUG ((DEBUG_INFO, "%a() - %r\n", __func__, Status));
return Status;
}
@@ -1357,7 +1357,7 @@ HddPasswordRequestPassword (
RetryCount = 0;
DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a()\n", __func__));
UnicodeSPrint (PopUpString, sizeof (PopUpString), L"Unlock: %s", ConfigFormEntry->HddString);
@@ -1541,7 +1541,7 @@ ProcessHddPasswordRequestSetUserPwd (
RetryCount = 0;
DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a()\n", __func__));
if (ConfigFormEntry->IfrData.SecurityStatus.Frozen) {
DEBUG ((DEBUG_INFO, "%s is frozen, do nothing\n", ConfigFormEntry->HddString));
@@ -1685,7 +1685,7 @@ ProcessHddPasswordRequestSetMasterPwd (
RetryCount = 0;
DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a()\n", __func__));
if (ConfigFormEntry->IfrData.SecurityStatus.Frozen) {
DEBUG ((DEBUG_INFO, "%s is frozen, do nothing\n", ConfigFormEntry->HddString));
@@ -1812,7 +1812,7 @@ ProcessHddPasswordRequest (
HDD_PASSWORD_REQUEST_VARIABLE *Variable;
UINTN VariableSize;
DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__));
if (mHddPasswordRequestVariable == NULL) {
Status = GetVariable2 (
@@ -1873,7 +1873,7 @@ ProcessHddPasswordRequest (
TempVariable += 1;
}
DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__));
}
/**
@@ -1892,7 +1892,7 @@ GetSavedHddPasswordRequest (
HDD_PASSWORD_REQUEST_VARIABLE *Variable;
UINTN VariableSize;
DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__));
Variable = NULL;
VariableSize = 0;
@@ -1934,7 +1934,7 @@ GetSavedHddPasswordRequest (
FreePool (Variable);
DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__));
}
/**
@@ -1956,7 +1956,7 @@ SaveHddPasswordRequest (
HDD_PASSWORD_REQUEST_VARIABLE *NewVariable;
UINTN NewVariableSize;
DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__));
DEBUG ((
DEBUG_INFO,
@@ -2047,7 +2047,7 @@ SaveHddPasswordRequest (
FreePool (Variable);
}
DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__));
DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__));
}
/**
@@ -2865,7 +2865,7 @@ HddPasswordDxeInit (
HDD_PASSWORD_VARIABLE_NAME,
&mHddPasswordVendorGuid
);
DEBUG ((DEBUG_INFO, "%a(): Lock %s variable (%r)\n", __FUNCTION__, HDD_PASSWORD_VARIABLE_NAME, Status));
DEBUG ((DEBUG_INFO, "%a(): Lock %s variable (%r)\n", __func__, HDD_PASSWORD_VARIABLE_NAME, Status));
ASSERT_EFI_ERROR (Status);
}