summaryrefslogtreecommitdiff
path: root/RedfishPkg/RedfishConfigHandler
diff options
context:
space:
mode:
authorRebecca Cran <rebecca@bsdio.com>2023-04-06 13:51:09 -0600
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-10 14:19:57 +0000
commit997419d16fcd400d7cfb0dbbc3c37ef1239fb962 (patch)
treea512b2b7ad088503b3d1e433fe62c89eacd875c7 /RedfishPkg/RedfishConfigHandler
parentccbbb4b1c5bd039673c783eec281bd52a2407ffd (diff)
downloadedk2-997419d16fcd400d7cfb0dbbc3c37ef1239fb962.zip
edk2-997419d16fcd400d7cfb0dbbc3c37ef1239fb962.tar.gz
edk2-997419d16fcd400d7cfb0dbbc3c37ef1239fb962.tar.bz2
RedfishPkg: 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 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>
Diffstat (limited to 'RedfishPkg/RedfishConfigHandler')
-rw-r--r--RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c6
-rw-r--r--RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c20
2 files changed, 13 insertions, 13 deletions
diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c
index 96aac12..b51b558 100644
--- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c
+++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c
@@ -122,7 +122,7 @@ RedfishConfigCommonInit (
//
Status = gBS->LocateProtocol (&gEdkIIRedfishCredentialProtocolGuid, NULL, (VOID **)&gCredential);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_INFO, "%a: No Redfish Credential Protocol is installed on system.", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: No Redfish Credential Protocol is installed on system.", __func__));
return Status;
}
@@ -138,7 +138,7 @@ RedfishConfigCommonInit (
&gEndOfDxeEvent
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Fail to register End Of DXE event.", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Fail to register End Of DXE event.", __func__));
return Status;
}
@@ -156,7 +156,7 @@ RedfishConfigCommonInit (
if (EFI_ERROR (Status)) {
gBS->CloseEvent (gEndOfDxeEvent);
gEndOfDxeEvent = NULL;
- DEBUG ((DEBUG_ERROR, "%a: Fail to register Exit Boot Service event.", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Fail to register Exit Boot Service event.", __func__));
return Status;
}
diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c
index 96ac70f..993ad33 100644
--- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c
+++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c
@@ -372,7 +372,7 @@ RedfishDiscoverProtocolInstalled (
EFI_REDFISH_DISCOVER_NETWORK_INTERFACE *ThisNetworkInterface;
EFI_REDFISH_DISCOVERED_TOKEN *ThisRedfishDiscoveredToken;
- DEBUG ((DEBUG_INFO, "%a: New network interface is installed on system by EFI Redfish discover driver.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: New network interface is installed on system by EFI Redfish discover driver.\n", __func__));
BufferSize = sizeof (EFI_HANDLE);
Status = gBS->LocateHandle (
@@ -383,7 +383,7 @@ RedfishDiscoverProtocolInstalled (
&HandleBuffer
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Can't locate handle with EFI_REDFISH_DISCOVER_PROTOCOL installed.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Can't locate handle with EFI_REDFISH_DISCOVER_PROTOCOL installed.\n", __func__));
}
gRedfishDiscoverActivated = TRUE;
@@ -403,7 +403,7 @@ RedfishDiscoverProtocolInstalled (
if (EFI_ERROR (Status)) {
gEfiRedfishDiscoverProtocol = NULL;
gRedfishDiscoverActivated = FALSE;
- DEBUG ((DEBUG_ERROR, "%a: Can't locate EFI_REDFISH_DISCOVER_PROTOCOL.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Can't locate EFI_REDFISH_DISCOVER_PROTOCOL.\n", __func__));
return;
}
}
@@ -422,13 +422,13 @@ RedfishDiscoverProtocolInstalled (
&gNetworkInterfaceInstances
);
if (EFI_ERROR (Status) || (gNumberOfNetworkInterfaces == 0)) {
- DEBUG ((DEBUG_ERROR, "%a: No network interfaces found on the handle.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: No network interfaces found on the handle.\n", __func__));
return;
}
gRedfishDiscoveredToken = AllocateZeroPool (gNumberOfNetworkInterfaces * sizeof (EFI_REDFISH_DISCOVERED_TOKEN));
if (gRedfishDiscoveredToken == NULL) {
- DEBUG ((DEBUG_ERROR, "%a: Not enough memory for EFI_REDFISH_DISCOVERED_TOKEN.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Not enough memory for EFI_REDFISH_DISCOVERED_TOKEN.\n", __func__));
return;
}
@@ -449,7 +449,7 @@ RedfishDiscoverProtocolInstalled (
&ThisRedfishDiscoveredToken->Event
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Failed to create event for Redfish discovered token.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Failed to create event for Redfish discovered token.\n", __func__));
goto ErrorReturn;
}
@@ -472,7 +472,7 @@ RedfishDiscoverProtocolInstalled (
}
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Acquire Redfish service fail.\n", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Acquire Redfish service fail.\n", __func__));
goto ErrorReturn;
}
@@ -556,7 +556,7 @@ RedfishConfigHandlerDriverEntryPoint (
&gEfiRedfishDiscoverProtocolEvent
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Fail to create event for the installation of EFI_REDFISH_DISCOVER_PROTOCOL.", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Fail to create event for the installation of EFI_REDFISH_DISCOVER_PROTOCOL.", __func__));
return Status;
}
@@ -566,7 +566,7 @@ RedfishConfigHandlerDriverEntryPoint (
&gEfiRedfishDiscoverRegistration
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: Fail to register event for the installation of EFI_REDFISH_DISCOVER_PROTOCOL.", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Fail to register event for the installation of EFI_REDFISH_DISCOVER_PROTOCOL.", __func__));
return Status;
}
@@ -593,7 +593,7 @@ RedfishConfigHandlerDriverEntryPoint (
gExitBootServiceEvent = NULL;
gBS->CloseEvent (gEfiRedfishDiscoverProtocolEvent);
gEfiRedfishDiscoverProtocolEvent = NULL;
- DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI Binding Protocol of EFI Redfish Config driver.", __FUNCTION__));
+ DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI Binding Protocol of EFI Redfish Config driver.", __func__));
return Status;
}