From 997419d16fcd400d7cfb0dbbc3c37ef1239fb962 Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Thu, 6 Apr 2023 13:51:09 -0600 Subject: 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 Reviewed-by: Michael D Kinney Ard Biesheuvel Reviewed-by: Nickle Wang --- .../RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'RedfishPkg/RedfishHostInterfaceDxe') diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c index 872cf3a..45fc6e2 100644 --- a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c @@ -59,11 +59,11 @@ RedfishCreateSmbiosTable42 ( Status = RedfishPlatformHostInterfaceDeviceDescriptor (&DeviceType, &DeviceDescriptor); if (EFI_ERROR (Status)) { if (Status == EFI_NOT_FOUND) { - DEBUG ((DEBUG_ERROR, "%a: No Redfish host interface descriptor is provided on this platform.", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: No Redfish host interface descriptor is provided on this platform.", __func__)); return EFI_NOT_FOUND; } - DEBUG ((DEBUG_ERROR, "%a: Fail to get device descriptor, %r.", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Fail to get device descriptor, %r.", __func__, Status)); return Status; } @@ -71,7 +71,7 @@ RedfishCreateSmbiosTable42 ( (DeviceType != REDFISH_HOST_INTERFACE_DEVICE_TYPE_PCI_PCIE_V2) ) { - DEBUG ((DEBUG_ERROR, "%a: Only support either protocol type 04h or 05h as Redfish host interface.", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Only support either protocol type 04h or 05h as Redfish host interface.", __func__)); return EFI_UNSUPPORTED; } @@ -98,7 +98,7 @@ RedfishCreateSmbiosTable42 ( } if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to get Redfish host interafce protocol type data.", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to get Redfish host interafce protocol type data.", __func__)); if (ProtocolRecords != NULL) { FreePool (ProtocolRecords); } @@ -124,7 +124,7 @@ RedfishCreateSmbiosTable42 ( } else { NewProtocolRecords = ReallocatePool (CurrentProtocolsDataLength, NewProtocolsDataLength, (VOID *)ProtocolRecords); if (NewProtocolRecords == NULL) { - DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish host interface protocol data.", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to allocate memory for Redfish host interface protocol data.", __func__)); FreePool (ProtocolRecords); FreePool (ProtocolRecord); return EFI_OUT_OF_RESOURCES; @@ -258,7 +258,7 @@ PlatformHostInterfaceInformationReady ( IN VOID *Context ) { - DEBUG ((DEBUG_INFO, "%a: Platform Redfish Host Interface informtion is ready\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Platform Redfish Host Interface informtion is ready\n", __func__)); RedfishCreateSmbiosTable42 (); @@ -290,7 +290,7 @@ RedfishHostInterfaceDxeEntryPoint ( EFI_STATUS Status; EFI_GUID *ReadyGuid; - DEBUG ((DEBUG_INFO, "%a: Entry\n.", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Entry\n.", __func__)); // // Check if the Redfish Host Interface depends on -- cgit v1.1