]> xenbits.xensource.com Git - ovmf.git/commitdiff
RedfishPkg: Update code to be more C11 compliant by using __func__
authorRebecca Cran <rebecca@bsdio.com>
Thu, 6 Apr 2023 19:51:09 +0000 (13:51 -0600)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 10 Apr 2023 14:19:57 +0000 (14:19 +0000)
__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
RedfishPkg.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nickle Wang <nicklew@nvidia.com>
RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterfaceBmcUsbNicLib.c
RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCredentialIpmiLib.c
RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c
RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c
RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c
RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c
RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c
RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c
RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c

index 122473dbe446a7329391defdd1ad16522ffa5c3d..4bd01850af9314acb96ae11984c6c21e868b7516 100644 (file)
@@ -37,7 +37,7 @@ ProbeRedfishCredentialBootstrap (
   UINT32                                      ResponseSize;\r
   BOOLEAN                                     ReturnBool;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));\r
 \r
   //\r
   // IPMI callout to NetFn 2C, command 02\r
@@ -65,10 +65,10 @@ ProbeRedfishCredentialBootstrap (
        (ResponseData.CompletionCode == REDFISH_IPMI_COMP_CODE_BOOTSTRAP_CREDENTIAL_DISABLED)\r
       ))\r
   {\r
-    DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "    Redfish Credentail Bootstrapping is supported\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "    Redfish Credentail Bootstrapping is supported\n", __func__));\r
     ReturnBool = TRUE;\r
   } else {\r
-    DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "    Redfish Credentail Bootstrapping is not supported\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "    Redfish Credentail Bootstrapping is not supported\n", __func__));\r
     ReturnBool = FALSE;\r
   }\r
 \r
@@ -94,7 +94,7 @@ RedfishPlatformHostInterfaceDeviceDescriptor (
   HOST_INTERFACE_BMC_USB_NIC_INFO  *ThisInstance;\r
   REDFISH_INTERFACE_DATA           *InterfaceData;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));\r
 \r
   if (IsListEmpty (&mBmcUsbNic)) {\r
     return EFI_NOT_FOUND;\r
@@ -166,7 +166,7 @@ RedfishPlatformHostInterfaceProtocolData (
   UINT8                              HostNameLength;\r
   CHAR8                              *HostNameString;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));\r
 \r
   if (IsListEmpty (&mBmcUsbNic) || (IndexOfProtocolData > 0)) {\r
     return EFI_NOT_FOUND;\r
@@ -300,7 +300,7 @@ RetrievedBmcUsbNicInfo (
   IPMI_LAN_VLAN_ID                                *LanVlanId;\r
   EFI_USB_DEVICE_DESCRIPTOR                       UsbDeviceDescriptor;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));\r
 \r
   if (IsListEmpty (&mBmcUsbNic)) {\r
     return EFI_NOT_FOUND;\r
@@ -605,7 +605,7 @@ HostInterfaceIpmiCheckMacAddress (
   EFI_MAC_ADDRESS                                 IpmiLanChannelMacAddress;\r
   BOOLEAN                                         AlreadyCached;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));\r
 \r
   GetLanConfigReps = NULL;\r
   AlreadyCached    = FALSE;\r
@@ -823,7 +823,7 @@ UsbNicSearchUsbIo (
   EFI_DEVICE_PATH_PROTOCOL  *ThisUsbDevicePath;\r
   EFI_DEVICE_PATH_PROTOCOL  *ThisUsbDevicePathEnd;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));\r
   DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "Device path on the EFI handle which has UsbIo and SNP instaleld on it.\n"));\r
   DevicePathStr = ConvertDevicePathToText (UsbDevicePath, FALSE, FALSE);\r
   if (DevicePathStr != NULL) {\r
@@ -987,7 +987,7 @@ IdentifyUsbNicBmcChannel (
   EFI_USB_IO_PROTOCOL              *UsbIo;\r
   HOST_INTERFACE_BMC_USB_NIC_INFO  *BmcUsbNic;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));\r
   Status = gBS->HandleProtocol (\r
                   Handle,\r
                   &gEfiSimpleNetworkProtocolGuid,\r
@@ -1074,7 +1074,7 @@ CheckBmcUsbNicOnHandles (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: Entry, #%d SNP handle\n", __FUNCTION__, HandleNumer));\r
+  DEBUG ((DEBUG_INFO, "%a: Entry, #%d SNP handle\n", __func__, HandleNumer));\r
 \r
   GotOneUsbNIc = FALSE;\r
   for (Index = 0; Index < HandleNumer; Index++) {\r
@@ -1084,7 +1084,7 @@ CheckBmcUsbNicOnHandles (
                     (VOID **)&DevicePath\r
                     );\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_ERROR, "    Failed to locate SNP on %d handle.\n", __FUNCTION__, Index));\r
+      DEBUG ((DEBUG_ERROR, "    Failed to locate SNP on %d handle.\n", __func__, Index));\r
       continue;\r
     }\r
 \r
@@ -1137,7 +1137,7 @@ CheckBmcUsbNic (
   UINTN       BufferSize;\r
   EFI_HANDLE  *HandleBuffer;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: Entry, the registration key - 0x%08x.\n", __FUNCTION__, Registration));\r
+  DEBUG ((DEBUG_INFO, "%a: Entry, the registration key - 0x%08x.\n", __func__, Registration));\r
 \r
   Handle     = NULL;\r
   Status     = EFI_SUCCESS;\r
@@ -1213,7 +1213,7 @@ PlatformHostInterfaceSnpCallback (
   IN  VOID       *Context\r
   )\r
 {\r
-  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__));\r
 \r
   CheckBmcUsbNic (mPlatformHostInterfaceSnpRegistration);\r
   return;\r
@@ -1241,7 +1241,7 @@ RedfishPlatformHostInterfaceNotification (
 {\r
   EFI_STATUS  Status;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__));\r
 \r
   *InformationReadinessGuid = NULL;\r
   InitializeListHead (&mBmcUsbNic);\r
@@ -1257,7 +1257,7 @@ RedfishPlatformHostInterfaceNotification (
   }\r
 \r
   if (Status == EFI_NOT_FOUND) {\r
-    DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "%a: BMC USB NIC is not found. Register the notification.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "%a: BMC USB NIC is not found. Register the notification.\n", __func__));\r
 \r
     // Register the notification of SNP installation.\r
     Status = gBS->CreateEvent (\r
@@ -1268,7 +1268,7 @@ RedfishPlatformHostInterfaceNotification (
                     &mPlatformHostInterfaceSnpEvent\r
                     );\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_ERROR, "%a: Fail to create event for the installation of SNP protocol.", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a: Fail to create event for the installation of SNP protocol.", __func__));\r
       return Status;\r
     }\r
 \r
@@ -1278,7 +1278,7 @@ RedfishPlatformHostInterfaceNotification (
                     &mPlatformHostInterfaceSnpRegistration\r
                     );\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_ERROR, "%a: Fail to register event for the installation of SNP protocol.", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a: Fail to register event for the installation of SNP protocol.", __func__));\r
       return Status;\r
     }\r
 \r
@@ -1286,6 +1286,6 @@ RedfishPlatformHostInterfaceNotification (
     return EFI_SUCCESS;\r
   }\r
 \r
-  DEBUG ((DEBUG_ERROR, "%a: Something wrong when look for BMC USB NIC.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_ERROR, "%a: Something wrong when look for BMC USB NIC.\n", __func__));\r
   return Status;\r
 }\r
index dacb09bb239990bf49666fc933c359cceade43fd..3b34dafbaf608e2cc45ffcf8067cac1283e0eb3b 100644 (file)
@@ -63,10 +63,10 @@ LibStopRedfishService (
   //\r
   Status = SetBootstrapAccountCredentialsToVariable (NULL, NULL, TRUE);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: fail to remove bootstrap credential: %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: fail to remove bootstrap credential: %r\n", __func__, Status));\r
   }\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: bootstrap credential service stopped\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: bootstrap credential service stopped\n", __func__));\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -153,7 +153,7 @@ GetBootstrapAccountCredentials (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
-  DEBUG ((DEBUG_VERBOSE, "%a: Disable bootstrap control: 0x%x\n", __FUNCTION__, DisableBootstrapControl));\r
+  DEBUG ((DEBUG_VERBOSE, "%a: Disable bootstrap control: 0x%x\n", __func__, DisableBootstrapControl));\r
 \r
   //\r
   // IPMI callout to NetFn 2C, command 02\r
@@ -183,19 +183,19 @@ GetBootstrapAccountCredentials (
              );\r
 \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: IPMI transaction failure. Returning\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: IPMI transaction failure. Returning\n", __func__));\r
     return Status;\r
   } else {\r
     if (ResponseData.CompletionCode != IPMI_COMP_CODE_NORMAL) {\r
       if (ResponseData.CompletionCode == REDFISH_IPMI_COMP_CODE_BOOTSTRAP_CREDENTIAL_DISABLED) {\r
-        DEBUG ((DEBUG_ERROR, "%a: bootstrap credential support was disabled\n", __FUNCTION__));\r
+        DEBUG ((DEBUG_ERROR, "%a: bootstrap credential support was disabled\n", __func__));\r
         return EFI_ACCESS_DENIED;\r
       }\r
 \r
-      DEBUG ((DEBUG_ERROR, "%a: Completion code = 0x%x. Returning\n", __FUNCTION__, ResponseData.CompletionCode));\r
+      DEBUG ((DEBUG_ERROR, "%a: Completion code = 0x%x. Returning\n", __func__, ResponseData.CompletionCode));\r
       return EFI_PROTOCOL_ERROR;\r
     } else if (ResponseData.GroupExtensionId != REDFISH_IPMI_GROUP_EXTENSION) {\r
-      DEBUG ((DEBUG_ERROR, "%a: Group Extension Response = 0x%x. Returning\n", __FUNCTION__, ResponseData.GroupExtensionId));\r
+      DEBUG ((DEBUG_ERROR, "%a: Group Extension Response = 0x%x. Returning\n", __func__, ResponseData.GroupExtensionId));\r
       return EFI_DEVICE_ERROR;\r
     } else {\r
       if (BootstrapUsername != NULL) {\r
@@ -216,7 +216,7 @@ GetBootstrapAccountCredentials (
     }\r
   }\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: get bootstrap credential via IPMI: %r\n", __FUNCTION__, Status));\r
+  DEBUG ((DEBUG_INFO, "%a: get bootstrap credential via IPMI: %r\n", __func__, Status));\r
 \r
   return Status;\r
 }\r
@@ -269,7 +269,7 @@ GetBootstrapAccountCredentialsFromVariable (
   }\r
 \r
   if (DataSize != sizeof (BOOTSTRAP_CREDENTIALS_VARIABLE)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: data corruption. returned size: %d != structure size: %d\n", __FUNCTION__, DataSize, sizeof (BOOTSTRAP_CREDENTIALS_VARIABLE)));\r
+    DEBUG ((DEBUG_ERROR, "%a: data corruption. returned size: %d != structure size: %d\n", __func__, DataSize, sizeof (BOOTSTRAP_CREDENTIALS_VARIABLE)));\r
     FreePool (Data);\r
     return EFI_NOT_FOUND;\r
   }\r
@@ -284,7 +284,7 @@ GetBootstrapAccountCredentialsFromVariable (
 \r
   FreePool (Data);\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: get bootstrap credential from variable\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: get bootstrap credential from variable\n", __func__));\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -412,7 +412,7 @@ LibCredentialGetAuthInfo (
   DisableCredentialService = PcdGetBool (PcdRedfishDisableBootstrapCredentialService);\r
 \r
   if (mRedfishServiceStopped) {\r
-    DEBUG ((DEBUG_ERROR, "%a: credential service is stopped due to security reason\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: credential service is stopped due to security reason\n", __func__));\r
     return EFI_ACCESS_DENIED;\r
   }\r
 \r
@@ -441,17 +441,17 @@ LibCredentialGetAuthInfo (
   //\r
   Status = GetBootstrapAccountCredentials (DisableCredentialService, *UserId, USERNAME_MAX_SIZE, *Password, PASSWORD_MAX_SIZE);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: fail to get bootstrap credential: %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: fail to get bootstrap credential: %r\n", __func__, Status));\r
     return Status;\r
   }\r
 \r
   if (DisableCredentialService) {\r
-    DEBUG ((DEBUG_INFO, "%a: credential bootstrapping control disabled\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_INFO, "%a: credential bootstrapping control disabled\n", __func__));\r
   }\r
 \r
   Status = SetBootstrapAccountCredentialsToVariable (*UserId, *Password, FALSE);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: fail to cache bootstrap credential: %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: fail to cache bootstrap credential: %r\n", __func__, Status));\r
   }\r
 \r
   return EFI_SUCCESS;\r
index 51a85a73360d0f3cad435dbe6f0cc04dc41344af..0a0a4e64587260930a8a8fb94afbb31d3f7ccf5f 100644 (file)
@@ -1101,7 +1101,7 @@ RedfishIsValidOdataType (
     }\r
   }\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: This Odata type is not in the list.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: This Odata type is not in the list.\n", __func__));\r
   return FALSE;\r
 }\r
 \r
index cbd4330a0ed03ee7028a9da23ed3d209de7e399a..206094d87d0ff83e4bcfc5640c78f799b10c1d17 100644 (file)
@@ -521,7 +521,7 @@ getUriFromService (
       //\r
       Status = DecodeResponseContent (ContentEncodedHeader->FieldValue, &ResponseMsg.Body, &ResponseMsg.BodyLength);\r
       if (EFI_ERROR (Status)) {\r
-        DEBUG ((DEBUG_ERROR, "%a: Failed to decompress the response content %r\n.", __FUNCTION__, Status));\r
+        DEBUG ((DEBUG_ERROR, "%a: Failed to decompress the response content %r\n.", __func__, Status));\r
         ret = NULL;\r
         goto ON_EXIT;\r
       }\r
@@ -656,7 +656,7 @@ patchUriFromService (
   //\r
   Status = EncodeRequestContent ((CHAR8 *)HTTP_CONTENT_ENCODING_GZIP, (CHAR8 *)content, (VOID **)&EncodedContent, &EncodedContentLen);\r
   if (Status == EFI_INVALID_PARAMETER) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Error to encode content.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Error to encode content.\n", __func__));\r
     ret = NULL;\r
     goto ON_EXIT;\r
   } else if (Status == EFI_UNSUPPORTED) {\r
index 96aac125ee225b788663af0ceb815dc31031857c..b51b558a487da313c6a1a568d0cc27a84b7f996d 100644 (file)
@@ -122,7 +122,7 @@ RedfishConfigCommonInit (
   //\r
   Status = gBS->LocateProtocol (&gEdkIIRedfishCredentialProtocolGuid, NULL, (VOID **)&gCredential);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_INFO, "%a: No Redfish Credential Protocol is installed on system.", __FUNCTION__));\r
+    DEBUG ((DEBUG_INFO, "%a: No Redfish Credential Protocol is installed on system.", __func__));\r
     return Status;\r
   }\r
 \r
@@ -138,7 +138,7 @@ RedfishConfigCommonInit (
                   &gEndOfDxeEvent\r
                   );\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Fail to register End Of DXE event.", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Fail to register End Of DXE event.", __func__));\r
     return Status;\r
   }\r
 \r
@@ -156,7 +156,7 @@ RedfishConfigCommonInit (
   if (EFI_ERROR (Status)) {\r
     gBS->CloseEvent (gEndOfDxeEvent);\r
     gEndOfDxeEvent = NULL;\r
-    DEBUG ((DEBUG_ERROR, "%a: Fail to register Exit Boot Service event.", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Fail to register Exit Boot Service event.", __func__));\r
     return Status;\r
   }\r
 \r
index 96ac70f418c8e3b9b50cb6ee6dc4a80eff3d5029..993ad338b6eba61476a1ec5c10e988fb328c8a52 100644 (file)
@@ -372,7 +372,7 @@ RedfishDiscoverProtocolInstalled (
   EFI_REDFISH_DISCOVER_NETWORK_INTERFACE  *ThisNetworkInterface;\r
   EFI_REDFISH_DISCOVERED_TOKEN            *ThisRedfishDiscoveredToken;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: New network interface is installed on system by EFI Redfish discover driver.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: New network interface is installed on system by EFI Redfish discover driver.\n", __func__));\r
 \r
   BufferSize = sizeof (EFI_HANDLE);\r
   Status     = gBS->LocateHandle (\r
@@ -383,7 +383,7 @@ RedfishDiscoverProtocolInstalled (
                       &HandleBuffer\r
                       );\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Can't locate handle with EFI_REDFISH_DISCOVER_PROTOCOL installed.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Can't locate handle with EFI_REDFISH_DISCOVER_PROTOCOL installed.\n", __func__));\r
   }\r
 \r
   gRedfishDiscoverActivated = TRUE;\r
@@ -403,7 +403,7 @@ RedfishDiscoverProtocolInstalled (
     if (EFI_ERROR (Status)) {\r
       gEfiRedfishDiscoverProtocol = NULL;\r
       gRedfishDiscoverActivated   = FALSE;\r
-      DEBUG ((DEBUG_ERROR, "%a: Can't locate EFI_REDFISH_DISCOVER_PROTOCOL.\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a: Can't locate EFI_REDFISH_DISCOVER_PROTOCOL.\n", __func__));\r
       return;\r
     }\r
   }\r
@@ -422,13 +422,13 @@ RedfishDiscoverProtocolInstalled (
                                           &gNetworkInterfaceInstances\r
                                           );\r
   if (EFI_ERROR (Status) || (gNumberOfNetworkInterfaces == 0)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: No network interfaces found on the handle.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: No network interfaces found on the handle.\n", __func__));\r
     return;\r
   }\r
 \r
   gRedfishDiscoveredToken = AllocateZeroPool (gNumberOfNetworkInterfaces * sizeof (EFI_REDFISH_DISCOVERED_TOKEN));\r
   if (gRedfishDiscoveredToken == NULL) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for EFI_REDFISH_DISCOVERED_TOKEN.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Not enough memory for EFI_REDFISH_DISCOVERED_TOKEN.\n", __func__));\r
     return;\r
   }\r
 \r
@@ -449,7 +449,7 @@ RedfishDiscoverProtocolInstalled (
                     &ThisRedfishDiscoveredToken->Event\r
                     );\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_ERROR, "%a: Failed to create event for Redfish discovered token.\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a: Failed to create event for Redfish discovered token.\n", __func__));\r
       goto ErrorReturn;\r
     }\r
 \r
@@ -472,7 +472,7 @@ RedfishDiscoverProtocolInstalled (
   }\r
 \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Acquire Redfish service fail.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Acquire Redfish service fail.\n", __func__));\r
     goto ErrorReturn;\r
   }\r
 \r
@@ -556,7 +556,7 @@ RedfishConfigHandlerDriverEntryPoint (
                   &gEfiRedfishDiscoverProtocolEvent\r
                   );\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Fail to create event for the installation of EFI_REDFISH_DISCOVER_PROTOCOL.", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Fail to create event for the installation of EFI_REDFISH_DISCOVER_PROTOCOL.", __func__));\r
     return Status;\r
   }\r
 \r
@@ -566,7 +566,7 @@ RedfishConfigHandlerDriverEntryPoint (
                   &gEfiRedfishDiscoverRegistration\r
                   );\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Fail to register event for the installation of EFI_REDFISH_DISCOVER_PROTOCOL.", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Fail to register event for the installation of EFI_REDFISH_DISCOVER_PROTOCOL.", __func__));\r
     return Status;\r
   }\r
 \r
@@ -593,7 +593,7 @@ RedfishConfigHandlerDriverEntryPoint (
     gExitBootServiceEvent = NULL;\r
     gBS->CloseEvent (gEfiRedfishDiscoverProtocolEvent);\r
     gEfiRedfishDiscoverProtocolEvent = NULL;\r
-    DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI Binding Protocol of EFI Redfish Config driver.", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI Binding Protocol of EFI Redfish Config driver.", __func__));\r
     return Status;\r
   }\r
 \r
index f64c79088f63f4db93a9ebcc3984150a38bc1eb5..583c6f78e19cbca2038ba23c6c0c96e6e9ce3a07 100644 (file)
@@ -196,13 +196,13 @@ Tcp4GetSubnetInfo (
   Tcp4Option.EnableNagle       = TRUE;\r
   Status                       = Tcp4->Configure (Tcp4, &Tcp4CfgData);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Can't get subnet information\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Can't get subnet information\n", __func__));\r
     return Status;\r
   }\r
 \r
   Status = Tcp4->GetModeData (Tcp4, NULL, NULL, &IpModedata, NULL, NULL);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n", __func__));\r
     return Status;\r
   }\r
 \r
@@ -265,12 +265,12 @@ Tcp6GetSubnetInfo (
   ZeroMem ((VOID *)&IpModedata, sizeof (EFI_IP6_MODE_DATA));\r
   Status = Tcp6->GetModeData (Tcp6, NULL, NULL, &IpModedata, NULL, NULL);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n", __func__));\r
     return Status;\r
   }\r
 \r
   if (IpModedata.AddressCount == 0) {\r
-    DEBUG ((DEBUG_INFO, "%a: No IPv6 address configured.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_INFO, "%a: No IPv6 address configured.\n", __func__));\r
     Instance->SubnetAddrInfoIPv6Number = 0;\r
     return EFI_SUCCESS;\r
   }\r
@@ -282,7 +282,7 @@ Tcp6GetSubnetInfo (
 \r
   Instance->SubnetAddrInfoIPv6 = AllocateZeroPool (IpModedata.AddressCount * sizeof (EFI_IP6_ADDRESS_INFO));\r
   if (Instance->SubnetAddrInfoIPv6 == NULL) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Failed to allocate memory for IPv6 subnet address information\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Failed to allocate memory for IPv6 subnet address information\n", __func__));\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
@@ -529,7 +529,7 @@ DiscoverRedfishHostInterface (
       IP4_COPY_ADDRESS ((VOID *)&Instance->HostSubnetMask.v4, (VOID *)Data->HostIpMask);\r
 \r
       if (EFI_IP4_EQUAL (&Instance->HostIpAddress.v4, &mZeroIp4Addr)) {\r
-        DEBUG ((DEBUG_ERROR, "%a: invalid host IP address: zero address\n", __FUNCTION__));\r
+        DEBUG ((DEBUG_ERROR, "%a: invalid host IP address: zero address\n", __func__));\r
         //\r
         // Invalid IP address detected. Change address format to Unknown and use system default address.\r
         //\r
@@ -537,7 +537,7 @@ DiscoverRedfishHostInterface (
       }\r
 \r
       if (!IP4_IS_VALID_NETMASK (EFI_IP4 (Instance->HostSubnetMask.v4))) {\r
-        DEBUG ((DEBUG_ERROR, "%a: invalid subnet mask address\n", __FUNCTION__));\r
+        DEBUG ((DEBUG_ERROR, "%a: invalid subnet mask address\n", __func__));\r
         //\r
         // Invalid subnet mast address detected. Change address format to Unknown and use system default address.\r
         //\r
@@ -551,14 +551,14 @@ DiscoverRedfishHostInterface (
       IP4_COPY_ADDRESS ((VOID *)&Instance->TargetIpAddress.v4, (VOID *)Data->RedfishServiceIpAddress);\r
 \r
       if (EFI_IP4_EQUAL (&Instance->TargetIpAddress.v4, &mZeroIp4Addr)) {\r
-        DEBUG ((DEBUG_ERROR, "%a: invalid service IP address: zero address\n", __FUNCTION__));\r
+        DEBUG ((DEBUG_ERROR, "%a: invalid service IP address: zero address\n", __func__));\r
       }\r
     } else {\r
       IP6_COPY_ADDRESS ((VOID *)&Instance->TargetIpAddress.v6, (VOID *)Data->RedfishServiceIpAddress);\r
     }\r
 \r
     if (Instance->HostIntfValidation) {\r
-      DEBUG ((DEBUG_ERROR, "%a:Send UPnP unicast SSDP to validate this Redfish Host Interface is not supported.\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a:Send UPnP unicast SSDP to validate this Redfish Host Interface is not supported.\n", __func__));\r
       Status = EFI_UNSUPPORTED;\r
     } else {\r
       //\r
@@ -682,7 +682,7 @@ AddAndSignalNewRedfishService (
   RestExOpened = FALSE;\r
   DeleteRestEx = FALSE;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a:Add this instance to Redfish instance list.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a:Add this instance to Redfish instance list.\n", __func__));\r
 \r
   if (Uuid != NULL) {\r
     Char16Uuid = (CHAR16 *)AllocateZeroPool (AsciiStrSize ((const CHAR8 *)Uuid) * sizeof (CHAR16));\r
@@ -846,7 +846,7 @@ AddAndSignalNewRedfishService (
     if (!InfoRefresh) {\r
       Status = CreateRestExInstance (Instance, Instance->DiscoverToken); // Create REST EX child.\r
       if (EFI_ERROR (Status)) {\r
-        DEBUG ((DEBUG_ERROR, "%a:Can't create REST EX child instance.\n", __FUNCTION__));\r
+        DEBUG ((DEBUG_ERROR, "%a:Can't create REST EX child instance.\n", __func__));\r
         goto ON_EXIT;\r
       }\r
 \r
@@ -906,7 +906,7 @@ AddAndSignalNewRedfishService (
                          (EFI_REST_EX_CONFIG_DATA)(UINT8 *)RestExHttpConfigData\r
                          );\r
       if (EFI_ERROR (Status)) {\r
-        DEBUG ((DEBUG_ERROR, "%a:REST EX configured..\n", __FUNCTION__));\r
+        DEBUG ((DEBUG_ERROR, "%a:REST EX configured..\n", __func__));\r
         DeleteRestEx = TRUE;\r
         goto EXIT_FREE_ALL;\r
       }\r
@@ -927,7 +927,7 @@ AddAndSignalNewRedfishService (
 \r
     Status = gBS->SignalEvent (Instance->DiscoverToken->Event);\r
     if (!EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_ERROR, "%a:No event to signal!\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a:No event to signal!\n", __func__));\r
     }\r
   }\r
 \r
@@ -997,13 +997,13 @@ NetworkInterfaceGetSubnetInfo (
                                                Instance\r
                                                );\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_ERROR, "%a:Failed to get Subnet infomation.\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a:Failed to get Subnet infomation.\n", __func__));\r
       return Status;\r
     } else {\r
-      DEBUG ((DEBUG_INFO, "%a:MAC address: %s\n", __FUNCTION__, Instance->StrMacAddr));\r
+      DEBUG ((DEBUG_INFO, "%a:MAC address: %s\n", __func__, Instance->StrMacAddr));\r
       if (CheckIsIpVersion6 (Instance)) {\r
         if (Instance->SubnetAddrInfoIPv6Number == 0) {\r
-          DEBUG ((DEBUG_ERROR, "%a: There is no Subnet infomation for IPv6 network interface.\n", __FUNCTION__));\r
+          DEBUG ((DEBUG_ERROR, "%a: There is no Subnet infomation for IPv6 network interface.\n", __func__));\r
           return EFI_NOT_FOUND;\r
         }\r
 \r
@@ -1184,13 +1184,13 @@ RedfishServiceAcquireService (
   UINTN                                            NetworkInterfacesIndex;\r
   EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL  *TargetNetworkInterfaceInternal;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a:Entry.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a:Entry.\n", __func__));\r
 \r
   //\r
   // Validate parameters.\r
   //\r
   if ((ImageHandle == NULL) || (Token == NULL) || ((Flags & ~EFI_REDFISH_DISCOVER_VALIDATION) == 0)) {\r
-    DEBUG ((DEBUG_ERROR, "%a:Invalid parameters.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a:Invalid parameters.\n", __func__));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -1208,7 +1208,7 @@ RedfishServiceAcquireService (
     TargetNetworkInterfaceInternal = (EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL *)GetFirstNode (&mEfiRedfishDiscoverNetworkInterface);\r
     NumNetworkInterfaces           = NumberOfNetworkInterface ();\r
     if (NumNetworkInterfaces == 0) {\r
-      DEBUG ((DEBUG_ERROR, "%a:No network interface on platform.\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a:No network interface on platform.\n", __func__));\r
       return EFI_UNSUPPORTED;\r
     }\r
   }\r
@@ -1219,10 +1219,10 @@ RedfishServiceAcquireService (
     NewInstance = FALSE;\r
     Instance    = GetInstanceByOwner (ImageHandle, TargetNetworkInterfaceInternal, Flags & ~EFI_REDFISH_DISCOVER_VALIDATION); // Check if we can re-use previous instance.\r
     if (Instance == NULL) {\r
-      DEBUG ((DEBUG_INFO, "%a:Create new EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE.\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_INFO, "%a:Create new EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE.\n", __func__));\r
       Instance = (EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE *)AllocateZeroPool (sizeof (EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE));\r
       if (Instance == NULL) {\r
-        DEBUG ((DEBUG_ERROR, "%a:Memory allocation fail.\n", __FUNCTION__));\r
+        DEBUG ((DEBUG_ERROR, "%a:Memory allocation fail.\n", __func__));\r
       }\r
 \r
       InitializeListHead (&Instance->Entry);\r
@@ -1238,14 +1238,14 @@ RedfishServiceAcquireService (
     }\r
 \r
     if (TargetNetworkInterfaceInternal->StrMacAddr != NULL) {\r
-      DEBUG ((DEBUG_INFO, "%a:Acquire Redfish service on network interface MAC address:%s.\n", __FUNCTION__, TargetNetworkInterfaceInternal->StrMacAddr));\r
+      DEBUG ((DEBUG_INFO, "%a:Acquire Redfish service on network interface MAC address:%s.\n", __func__, TargetNetworkInterfaceInternal->StrMacAddr));\r
     } else {\r
-      DEBUG ((DEBUG_INFO, "%a:WARNING: No MAC address on this network interface.\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_INFO, "%a:WARNING: No MAC address on this network interface.\n", __func__));\r
     }\r
 \r
     Instance->DiscoverToken = Token; // Always use the latest Token passed by caller.\r
     if ((Flags & EFI_REDFISH_DISCOVER_HOST_INTERFACE) != 0) {\r
-      DEBUG ((DEBUG_INFO, "%a:Redfish HOST interface discovery.\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_INFO, "%a:Redfish HOST interface discovery.\n", __func__));\r
       Instance->HostIntfValidation = FALSE;\r
       if ((Flags & EFI_REDFISH_DISCOVER_VALIDATION) != 0) {\r
         Instance->HostIntfValidation = TRUE;\r
@@ -1255,12 +1255,12 @@ RedfishServiceAcquireService (
     }\r
 \r
     if ((Flags & EFI_REDFISH_DISCOVER_SSDP) != 0) {\r
-      DEBUG ((DEBUG_ERROR, "%a:Redfish service discovery through SSDP is not supported\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a:Redfish service discovery through SSDP is not supported\n", __func__));\r
       return EFI_UNSUPPORTED;\r
     } else {\r
       if (EFI_ERROR (Status1) && EFI_ERROR (Status2)) {\r
         FreePool ((VOID *)Instance);\r
-        DEBUG ((DEBUG_ERROR, "%a:Something wrong on Redfish service discovery Status1=%x, Status2=%x.\n", __FUNCTION__, Status1, Status2));\r
+        DEBUG ((DEBUG_ERROR, "%a:Something wrong on Redfish service discovery Status1=%x, Status2=%x.\n", __func__, Status1, Status2));\r
       } else {\r
         if (NewInstance) {\r
           InsertTailList (&mRedfishDiscoverList, &Instance->Entry);\r
@@ -1326,7 +1326,7 @@ RedfishServiceReleaseService (
   EFI_REDFISH_DISCOVERED_INTERNAL_LIST  *DiscoveredRedfishInstance;\r
 \r
   if (IsListEmpty (&mRedfishInstanceList)) {\r
-    DEBUG ((DEBUG_ERROR, "%a:No any discovered Redfish service.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a:No any discovered Redfish service.\n", __func__));\r
     return EFI_NOT_FOUND;\r
   }\r
 \r
@@ -1535,7 +1535,7 @@ TestForRequiredProtocols (
                       );\r
       if (EFI_ERROR (Status)) {\r
         if (Index == ListCount - 1) {\r
-          DEBUG ((DEBUG_ERROR, "%a: all required protocols are found on this controller handle: %p.\n", __FUNCTION__, ControllerHandle));\r
+          DEBUG ((DEBUG_ERROR, "%a: all required protocols are found on this controller handle: %p.\n", __func__, ControllerHandle));\r
           return EFI_SUCCESS;\r
         }\r
       }\r
@@ -1706,7 +1706,7 @@ BuildupNetworkInterface (
           if (!NewNetworkInterfaceInstalled) {\r
             NetworkInterface = GetTargetNetworkInterfaceInternalByController (ControllerHandle);\r
             if (NetworkInterface == NULL) {\r
-              DEBUG ((DEBUG_ERROR, "%a: Can't find network interface by ControllerHandle\n", __FUNCTION__));\r
+              DEBUG ((DEBUG_ERROR, "%a: Can't find network interface by ControllerHandle\n", __func__));\r
               return Status;\r
             }\r
           }\r
@@ -1720,10 +1720,10 @@ BuildupNetworkInterface (
                                                                       (VOID *)&mRedfishDiscover\r
                                                                       );\r
           if (EFI_ERROR (Status)) {\r
-            DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI_REDFISH_DISCOVER_PROTOCOL\n", __FUNCTION__));\r
+            DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI_REDFISH_DISCOVER_PROTOCOL\n", __func__));\r
           }\r
         } else {\r
-          DEBUG ((DEBUG_INFO, "%a: Not REST EX, continue with next\n", __FUNCTION__));\r
+          DEBUG ((DEBUG_INFO, "%a: Not REST EX, continue with next\n", __func__));\r
           Index++;\r
           if (Index == (sizeof (gRequiredProtocol) / sizeof (REDFISH_DISCOVER_REQUIRED_PROTOCOL))) {\r
             break;\r
index 872cf3ae0609dee164b158b9a02d9cf1f5b5b1a5..45fc6e2182bc2f8e3e428cdfed63471b3a688b30 100644 (file)
@@ -59,11 +59,11 @@ RedfishCreateSmbiosTable42 (
   Status = RedfishPlatformHostInterfaceDeviceDescriptor (&DeviceType, &DeviceDescriptor);\r
   if (EFI_ERROR (Status)) {\r
     if (Status == EFI_NOT_FOUND) {\r
-      DEBUG ((DEBUG_ERROR, "%a: No Redfish host interface descriptor is provided on this platform.", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a: No Redfish host interface descriptor is provided on this platform.", __func__));\r
       return EFI_NOT_FOUND;\r
     }\r
 \r
-    DEBUG ((DEBUG_ERROR, "%a: Fail to get device descriptor, %r.", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: Fail to get device descriptor, %r.", __func__, Status));\r
     return Status;\r
   }\r
 \r
@@ -71,7 +71,7 @@ RedfishCreateSmbiosTable42 (
       (DeviceType != REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2)\r
       )\r
   {\r
-    DEBUG ((DEBUG_ERROR, "%a: Only support either protocol type 04h or 05h as Redfish host interface.", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Only support either protocol type 04h or 05h as Redfish host interface.", __func__));\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
@@ -98,7 +98,7 @@ RedfishCreateSmbiosTable42 (
     }\r
 \r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_ERROR, "%a: Fail to get Redfish host interafce protocol type data.", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a: Fail to get Redfish host interafce protocol type data.", __func__));\r
       if (ProtocolRecords != NULL) {\r
         FreePool (ProtocolRecords);\r
       }\r
@@ -124,7 +124,7 @@ RedfishCreateSmbiosTable42 (
     } else {\r
       NewProtocolRecords = ReallocatePool (CurrentProtocolsDataLength, NewProtocolsDataLength, (VOID *)ProtocolRecords);\r
       if (NewProtocolRecords == NULL) {\r
-        DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish host interface protocol data.", __FUNCTION__));\r
+        DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish host interface protocol data.", __func__));\r
         FreePool (ProtocolRecords);\r
         FreePool (ProtocolRecord);\r
         return EFI_OUT_OF_RESOURCES;\r
@@ -258,7 +258,7 @@ PlatformHostInterfaceInformationReady (
   IN  VOID       *Context\r
   )\r
 {\r
-  DEBUG ((DEBUG_INFO, "%a: Platform Redfish Host Interface informtion is ready\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Platform Redfish Host Interface informtion is ready\n", __func__));\r
 \r
   RedfishCreateSmbiosTable42 ();\r
 \r
@@ -290,7 +290,7 @@ RedfishHostInterfaceDxeEntryPoint (
   EFI_STATUS  Status;\r
   EFI_GUID    *ReadyGuid;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: Entry\n.", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Entry\n.", __func__));\r
 \r
   //\r
   // Check if the Redfish Host Interface depends on\r
index 75b3f1fab8fc22008c9947fd66f0dbd28fe931f6..41f2b29c83bee1c0afcddaa6163b036cb6d6f2b1 100644 (file)
@@ -28,17 +28,17 @@ ResetHttpTslSession (
 {\r
   EFI_STATUS  Status;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: TCP connection is finished. Could be TSL session closure, reset HTTP instance for the new TLS session.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: TCP connection is finished. Could be TSL session closure, reset HTTP instance for the new TLS session.\n", __func__));\r
 \r
   Status = Instance->HttpIo.Http->Configure (Instance->HttpIo.Http, NULL);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Error to reset HTTP instance.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Error to reset HTTP instance.\n", __func__));\r
     return Status;\r
   }\r
 \r
   Status = Instance->HttpIo.Http->Configure (Instance->HttpIo.Http, &((EFI_REST_EX_HTTP_CONFIG_DATA *)Instance->ConfigData)->HttpConfigData);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Error to re-initiate HTTP instance.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Error to re-initiate HTTP instance.\n", __func__));\r
   }\r
 \r
   return Status;\r
@@ -70,7 +70,7 @@ RedfishCheckHttpReceiveStatus (
     ReturnStatus = EFI_SUCCESS;\r
   } else if (HttpIoReceiveStatus != EFI_CONNECTION_FIN) {\r
     if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY) == 0) {\r
-      DEBUG ((DEBUG_ERROR, "%a: TCP error, reset HTTP session.\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a: TCP error, reset HTTP session.\n", __func__));\r
       Instance->Flags |= RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY;\r
       gBS->Stall (500);\r
       Status = ResetHttpTslSession (Instance);\r
@@ -78,20 +78,20 @@ RedfishCheckHttpReceiveStatus (
         return EFI_NOT_READY;\r
       }\r
 \r
-      DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __func__));\r
     }\r
 \r
     ReturnStatus = EFI_DEVICE_ERROR;\r
   } else {\r
     if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TLS_RETRY) != 0) {\r
-      DEBUG ((DEBUG_ERROR, "%a: REST_EX Send and receive fail even with a new TLS session.\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a: REST_EX Send and receive fail even with a new TLS session.\n", __func__));\r
       ReturnStatus = EFI_DEVICE_ERROR;\r
     }\r
 \r
     Instance->Flags |= RESTEX_INSTANCE_FLAGS_TLS_RETRY;\r
     Status           = ResetHttpTslSession (Instance);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__));\r
+      DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __func__));\r
       ReturnStatus = EFI_DEVICE_ERROR;\r
     }\r
 \r