From dd0b33e3e55957aecbae6aa5cebdc6c14e6e8932 Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Thu, 6 Apr 2023 13:50:26 -0600 Subject: 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 Reviewed-by: Michael D Kinney Reviewed-by: Ard Biesheuvel --- SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c | 24 +++++++++++----------- SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c | 8 ++++---- .../Tcg/Opal/OpalPassword/OpalPasswordPei.c | 10 ++++----- 3 files changed, 21 insertions(+), 21 deletions(-) (limited to 'SecurityPkg/Tcg/Opal/OpalPassword') diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c index f127757ad9..e2e77cbc24 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c @@ -491,7 +491,7 @@ OpalEndOfDxeEventNotify ( { OPAL_DRIVER_DEVICE *TmpDev; - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); mOpalEndOfDxe = TRUE; @@ -529,7 +529,7 @@ OpalEndOfDxeEventNotify ( // SendBlockSidCommand (); - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); gBS->CloseEvent (Event); } @@ -888,7 +888,7 @@ OpalDriverRequestPassword ( return; } - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); PopUpString = OpalGetPopUpString (Dev, RequestString); @@ -1074,7 +1074,7 @@ ProcessOpalRequestEnableFeature ( return; } - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); PopUpString = OpalGetPopUpString (Dev, RequestString); @@ -1223,7 +1223,7 @@ ProcessOpalRequestDisableUser ( return; } - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); PopUpString = OpalGetPopUpString (Dev, RequestString); @@ -1339,7 +1339,7 @@ ProcessOpalRequestPsidRevert ( return; } - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); PopUpString = OpalGetPopUpString (Dev, RequestString); @@ -1478,7 +1478,7 @@ ProcessOpalRequestRevert ( return; } - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); PopUpString = OpalGetPopUpString (Dev, RequestString); @@ -1646,7 +1646,7 @@ ProcessOpalRequestSecureErase ( return; } - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); PopUpString = OpalGetPopUpString (Dev, RequestString); @@ -1784,7 +1784,7 @@ ProcessOpalRequestSetUserPwd ( return; } - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); PopUpString = OpalGetPopUpString (Dev, RequestString); @@ -1990,7 +1990,7 @@ ProcessOpalRequestSetAdminPwd ( return; } - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); PopUpString = OpalGetPopUpString (Dev, RequestString); @@ -2182,7 +2182,7 @@ ProcessOpalRequest ( UINTN DevicePathSize; BOOLEAN KeepUserData; - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); if (mOpalRequestVariable == NULL) { Status = GetVariable2 ( @@ -2278,7 +2278,7 @@ ProcessOpalRequest ( TempVariable = (OPAL_REQUEST_VARIABLE *)((UINTN)TempVariable + TempVariable->Length); } - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); } /** diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c index c4f96bee8a..8035f44ebe 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c @@ -95,7 +95,7 @@ GetSavedOpalRequest ( EFI_DEVICE_PATH_PROTOCOL *DevicePath; UINTN DevicePathSize; - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); Variable = NULL; VariableSize = 0; @@ -141,7 +141,7 @@ GetSavedOpalRequest ( FreePool (Variable); - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); } /** @@ -169,7 +169,7 @@ SaveOpalRequest ( EFI_DEVICE_PATH_PROTOCOL *DevicePath; UINTN DevicePathSize; - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); DEBUG (( DEBUG_INFO, @@ -264,7 +264,7 @@ SaveOpalRequest ( FreePool (Variable); } - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); } /** diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.c b/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.c index c998b50be5..0fb6b1bf41 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.c @@ -280,7 +280,7 @@ UnlockOpalPassword ( DEBUG (( DEBUG_INFO, "%a() OpalUtilUpdateGlobalLockingRange() Result = 0x%x\n", - __FUNCTION__, + __func__, Result )); } @@ -302,7 +302,7 @@ UnlockOpalPassword ( DEBUG (( DEBUG_INFO, "%a() OpalBlockSid() Result = 0x%x\n", - __FUNCTION__, + __func__, Result )); } @@ -427,11 +427,11 @@ OpalPasswordStorageSecurityPpiNotify ( IN VOID *Ppi ) { - DEBUG ((DEBUG_INFO, "%a entered at S3 resume!\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a entered at S3 resume!\n", __func__)); UnlockOpalPasswordDevices ((EDKII_PEI_STORAGE_SECURITY_CMD_PPI *)Ppi); - DEBUG ((DEBUG_INFO, "%a exit at S3 resume!\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a exit at S3 resume!\n", __func__)); return EFI_SUCCESS; } @@ -466,7 +466,7 @@ OpalPasswordPeiInit ( return EFI_UNSUPPORTED; } - DEBUG ((DEBUG_INFO, "%a: Enters in S3 path.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Enters in S3 path.\n", __func__)); Status = PeiServicesNotifyPpi (&mOpalPasswordStorageSecurityPpiNotifyDesc); ASSERT_EFI_ERROR (Status); -- cgit v1.2.3