From nobody Tue Feb 10 15:46:09 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+102638+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+102638+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819846; cv=none; d=zohomail.com; s=zohoarc; b=k0ZWi3j9eKeA26qGb/n/mW63sLqiR2/OPC8YeF4WlxsTBVaHSNNOfRavdFKvSaJAgM4/SSxuuqAs/dCdAps2KaSj6DYz9SPjR9AdPTYG9URF+7rO6w4kR0ZkgGez39KORIREAR/IeGu3B3dNioCKF0rslsDAaPoHFcJPScZAnFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819846; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=5Zc5aFpv4Pb2ehyuf3ow2yyXVQ1It2+eL9BzsF6icNY=; b=CRRwddiFoGcuP98IwM1HGwv9LrPEkKGmlO0Ap76FsOIckwf238Eotgg7KzfaDQMa8vSy/80SR4VLHOPxZyigI+OgCTazhXBnaY6Yta3Hn/mEXnotYJBwW2I+H7ZNvBke9cRr5WxOUzCLQocgHBNbHEh0+/Sgw/RVxmyR563wZFQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+102638+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819846916198.36876550274985; Thu, 6 Apr 2023 15:24:06 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 7roRYY1788612xfPRgE6XAMZ; Thu, 06 Apr 2023 15:24:06 -0700 X-Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web10.171998.1680819845780670072 for ; Thu, 06 Apr 2023 15:24:06 -0700 X-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 1D40F5C01EB; Thu, 6 Apr 2023 18:24:05 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 06 Apr 2023 18:24:05 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:24:01 -0400 (EDT) From: "Rebecca Cran" To: devel@edk2.groups.io, Liming Gao , Michael D Kinney , Guomin Jiang , Wei6 Xu , Guo Dong , Ray Ni , Sean Rhodes , James Lu , Gua Guo , Andrew Fish , Hao A Wu , Maciej Rabeda , Siyuan Fu , Jiewen Yao , Jian J Wang , Xiaoyu Lu , Ard Biesheuvel , Sami Mujawar , Supreeth Venkatesh , Michael Kubacki , Nate DeSimone , Sean Brogan Cc: Rebecca Cran , Leif Lindholm , Abner Chang , Nickle Wang , Igor Kulchytskyy , Daniel Schaefer , Min Xu , Jordan Justen , Gerd Hoffmann , Peter Grehan , Erdem Aktas , James Bottomley , Tom Lendacky , Michael Roth , Sunil V L , Andrei Warkentin Subject: [edk2-devel] [PATCH 08/18] RedfishPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:09 -0600 Message-Id: <20230406222319.2281263-9-rebecca@bsdio.com> In-Reply-To: <20230406222319.2281263-1-rebecca@bsdio.com> References: <20230406222319.2281263-1-rebecca@bsdio.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rebecca@bsdio.com X-Gm-Message-State: rLFy1H2Zw7cU0KJmdzCsnLPHx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819846; bh=jr85sjFm1QB+x22AJfDg602oaTdI6MZIGiu/UEVJ6j8=; h=Cc:Date:From:Reply-To:Subject:To; b=N8+JLcgnau5QatOFYGsBYLWk5cWDSnY9tlLfED5rxP5prq4QCU2YsZ4KCJO6MGwpt3L Dx0MklgGcRqptwtqwab5Wi9yobntSLBQI4+xo+yifZksi454IG328JdLwTy0UamvJ34i1 r7pQc4msAjODjA3KkXbyXDiirEXcy/MvKIQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819847795100003 Content-Type: text/plain; charset="utf-8" __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. Visual Studio versions before VS 2015 don't support __func__ and so will fail to compile. A workaround is to define __func__ as __FUNCTION__ : #define __func__ __FUNCTION__ Signed-off-by: Rebecca Cran Reviewed-by: Nickle Wang --- RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInterface= BmcUsbNicLib.c | 36 ++++++------ RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCredent= ialIpmiLib.c | 28 ++++----- RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c = | 2 +- RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c = | 4 +- RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c = | 6 +- RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c = | 20 +++---- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c = | 62 ++++++++++---------- RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c = | 14 ++--- RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c = | 14 ++--- 9 files changed, 93 insertions(+), 93 deletions(-) diff --git a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformH= ostInterfaceBmcUsbNicLib.c b/RedfishPkg/Library/PlatformHostInterfaceBmcUsb= NicLib/PlatformHostInterfaceBmcUsbNicLib.c index 122473dbe446..4bd01850af93 100644 --- a/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInte= rfaceBmcUsbNicLib.c +++ b/RedfishPkg/Library/PlatformHostInterfaceBmcUsbNicLib/PlatformHostInte= rfaceBmcUsbNicLib.c @@ -37,7 +37,7 @@ ProbeRedfishCredentialBootstrap ( UINT32 ResponseSize; BOOLEAN ReturnBool; =20 - DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__)); =20 // // IPMI callout to NetFn 2C, command 02 @@ -65,10 +65,10 @@ ProbeRedfishCredentialBootstrap ( (ResponseData.CompletionCode =3D=3D REDFISH_IPMI_COMP_CODE_BOOTSTRA= P_CREDENTIAL_DISABLED) )) { - DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " Redfish Credentail Bootstra= pping is supported\n", __FUNCTION__)); + DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " Redfish Credentail Bootstra= pping is supported\n", __func__)); ReturnBool =3D TRUE; } else { - DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " Redfish Credentail Bootstra= pping is not supported\n", __FUNCTION__)); + DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, " Redfish Credentail Bootstra= pping is not supported\n", __func__)); ReturnBool =3D FALSE; } =20 @@ -94,7 +94,7 @@ RedfishPlatformHostInterfaceDeviceDescriptor ( HOST_INTERFACE_BMC_USB_NIC_INFO *ThisInstance; REDFISH_INTERFACE_DATA *InterfaceData; =20 - DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__)); =20 if (IsListEmpty (&mBmcUsbNic)) { return EFI_NOT_FOUND; @@ -166,7 +166,7 @@ RedfishPlatformHostInterfaceProtocolData ( UINT8 HostNameLength; CHAR8 *HostNameString; =20 - DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__)); =20 if (IsListEmpty (&mBmcUsbNic) || (IndexOfProtocolData > 0)) { return EFI_NOT_FOUND; @@ -300,7 +300,7 @@ RetrievedBmcUsbNicInfo ( IPMI_LAN_VLAN_ID *LanVlanId; EFI_USB_DEVICE_DESCRIPTOR UsbDeviceDescriptor; =20 - DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__)); =20 if (IsListEmpty (&mBmcUsbNic)) { return EFI_NOT_FOUND; @@ -605,7 +605,7 @@ HostInterfaceIpmiCheckMacAddress ( EFI_MAC_ADDRESS IpmiLanChannelMacAddress; BOOLEAN AlreadyCached; =20 - DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__)); =20 GetLanConfigReps =3D NULL; AlreadyCached =3D FALSE; @@ -823,7 +823,7 @@ UsbNicSearchUsbIo ( EFI_DEVICE_PATH_PROTOCOL *ThisUsbDevicePath; EFI_DEVICE_PATH_PROTOCOL *ThisUsbDevicePathEnd; =20 - DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__)); DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "Device path on the EFI handle whi= ch has UsbIo and SNP instaleld on it.\n")); DevicePathStr =3D ConvertDevicePathToText (UsbDevicePath, FALSE, FALSE); if (DevicePathStr !=3D NULL) { @@ -987,7 +987,7 @@ IdentifyUsbNicBmcChannel ( EFI_USB_IO_PROTOCOL *UsbIo; HOST_INTERFACE_BMC_USB_NIC_INFO *BmcUsbNic; =20 - DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__)); Status =3D gBS->HandleProtocol ( Handle, &gEfiSimpleNetworkProtocolGuid, @@ -1074,7 +1074,7 @@ CheckBmcUsbNicOnHandles ( return EFI_INVALID_PARAMETER; } =20 - DEBUG ((DEBUG_INFO, "%a: Entry, #%d SNP handle\n", __FUNCTION__, HandleN= umer)); + DEBUG ((DEBUG_INFO, "%a: Entry, #%d SNP handle\n", __func__, HandleNumer= )); =20 GotOneUsbNIc =3D FALSE; for (Index =3D 0; Index < HandleNumer; Index++) { @@ -1084,7 +1084,7 @@ CheckBmcUsbNicOnHandles ( (VOID **)&DevicePath ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, " Failed to locate SNP on %d handle.\n", __F= UNCTION__, Index)); + DEBUG ((DEBUG_ERROR, " Failed to locate SNP on %d handle.\n", __f= unc__, Index)); continue; } =20 @@ -1137,7 +1137,7 @@ CheckBmcUsbNic ( UINTN BufferSize; EFI_HANDLE *HandleBuffer; =20 - DEBUG ((DEBUG_INFO, "%a: Entry, the registration key - 0x%08x.\n", __FUN= CTION__, Registration)); + DEBUG ((DEBUG_INFO, "%a: Entry, the registration key - 0x%08x.\n", __fun= c__, Registration)); =20 Handle =3D NULL; Status =3D EFI_SUCCESS; @@ -1213,7 +1213,7 @@ PlatformHostInterfaceSnpCallback ( IN VOID *Context ) { - DEBUG ((DEBUG_INFO, "%a: Entry.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Entry.\n", __func__)); =20 CheckBmcUsbNic (mPlatformHostInterfaceSnpRegistration); return; @@ -1241,7 +1241,7 @@ RedfishPlatformHostInterfaceNotification ( { EFI_STATUS Status; =20 - DEBUG ((DEBUG_INFO, "%a: Entry\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Entry\n", __func__)); =20 *InformationReadinessGuid =3D NULL; InitializeListHead (&mBmcUsbNic); @@ -1257,7 +1257,7 @@ RedfishPlatformHostInterfaceNotification ( } =20 if (Status =3D=3D EFI_NOT_FOUND) { - DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "%a: BMC USB NIC is not found. R= egister the notification.\n", __FUNCTION__)); + DEBUG ((DEBUG_REDFISH_HOST_INTERFACE, "%a: BMC USB NIC is not found. R= egister the notification.\n", __func__)); =20 // Register the notification of SNP installation. Status =3D gBS->CreateEvent ( @@ -1268,7 +1268,7 @@ RedfishPlatformHostInterfaceNotification ( &mPlatformHostInterfaceSnpEvent ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to create event for the installation = of SNP protocol.", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to create event for the installation = of SNP protocol.", __func__)); return Status; } =20 @@ -1278,7 +1278,7 @@ RedfishPlatformHostInterfaceNotification ( &mPlatformHostInterfaceSnpRegistration ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to register event for the installatio= n of SNP protocol.", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to register event for the installatio= n of SNP protocol.", __func__)); return Status; } =20 @@ -1286,6 +1286,6 @@ RedfishPlatformHostInterfaceNotification ( return EFI_SUCCESS; } =20 - DEBUG ((DEBUG_ERROR, "%a: Something wrong when look for BMC USB NIC.\n",= __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Something wrong when look for BMC USB NIC.\n",= __func__)); return Status; } diff --git a/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPla= tformCredentialIpmiLib.c b/RedfishPkg/Library/RedfishPlatformCredentialIpmi= Lib/RedfishPlatformCredentialIpmiLib.c index dacb09bb2399..3b34dafbaf60 100644 --- a/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCr= edentialIpmiLib.c +++ b/RedfishPkg/Library/RedfishPlatformCredentialIpmiLib/RedfishPlatformCr= edentialIpmiLib.c @@ -63,10 +63,10 @@ LibStopRedfishService ( // Status =3D SetBootstrapAccountCredentialsToVariable (NULL, NULL, TRUE); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: fail to remove bootstrap credential: %r\n", = __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: fail to remove bootstrap credential: %r\n", = __func__, Status)); } =20 - DEBUG ((DEBUG_INFO, "%a: bootstrap credential service stopped\n", __FUNC= TION__)); + DEBUG ((DEBUG_INFO, "%a: bootstrap credential service stopped\n", __func= __)); =20 return EFI_SUCCESS; } @@ -153,7 +153,7 @@ GetBootstrapAccountCredentials ( return EFI_INVALID_PARAMETER; } =20 - DEBUG ((DEBUG_VERBOSE, "%a: Disable bootstrap control: 0x%x\n", __FUNCTI= ON__, DisableBootstrapControl)); + DEBUG ((DEBUG_VERBOSE, "%a: Disable bootstrap control: 0x%x\n", __func__= , DisableBootstrapControl)); =20 // // IPMI callout to NetFn 2C, command 02 @@ -183,19 +183,19 @@ GetBootstrapAccountCredentials ( ); =20 if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: IPMI transaction failure. Returning\n", __FU= NCTION__)); + DEBUG ((DEBUG_ERROR, "%a: IPMI transaction failure. Returning\n", __fu= nc__)); return Status; } else { if (ResponseData.CompletionCode !=3D IPMI_COMP_CODE_NORMAL) { if (ResponseData.CompletionCode =3D=3D REDFISH_IPMI_COMP_CODE_BOOTST= RAP_CREDENTIAL_DISABLED) { - DEBUG ((DEBUG_ERROR, "%a: bootstrap credential support was disable= d\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: bootstrap credential support was disable= d\n", __func__)); return EFI_ACCESS_DENIED; } =20 - DEBUG ((DEBUG_ERROR, "%a: Completion code =3D 0x%x. Returning\n", __= FUNCTION__, ResponseData.CompletionCode)); + DEBUG ((DEBUG_ERROR, "%a: Completion code =3D 0x%x. Returning\n", __= func__, ResponseData.CompletionCode)); return EFI_PROTOCOL_ERROR; } else if (ResponseData.GroupExtensionId !=3D REDFISH_IPMI_GROUP_EXTEN= SION) { - DEBUG ((DEBUG_ERROR, "%a: Group Extension Response =3D 0x%x. Returni= ng\n", __FUNCTION__, ResponseData.GroupExtensionId)); + DEBUG ((DEBUG_ERROR, "%a: Group Extension Response =3D 0x%x. Returni= ng\n", __func__, ResponseData.GroupExtensionId)); return EFI_DEVICE_ERROR; } else { if (BootstrapUsername !=3D NULL) { @@ -216,7 +216,7 @@ GetBootstrapAccountCredentials ( } } =20 - DEBUG ((DEBUG_INFO, "%a: get bootstrap credential via IPMI: %r\n", __FUN= CTION__, Status)); + DEBUG ((DEBUG_INFO, "%a: get bootstrap credential via IPMI: %r\n", __fun= c__, Status)); =20 return Status; } @@ -269,7 +269,7 @@ GetBootstrapAccountCredentialsFromVariable ( } =20 if (DataSize !=3D sizeof (BOOTSTRAP_CREDENTIALS_VARIABLE)) { - DEBUG ((DEBUG_ERROR, "%a: data corruption. returned size: %d !=3D stru= cture size: %d\n", __FUNCTION__, DataSize, sizeof (BOOTSTRAP_CREDENTIALS_VA= RIABLE))); + DEBUG ((DEBUG_ERROR, "%a: data corruption. returned size: %d !=3D stru= cture size: %d\n", __func__, DataSize, sizeof (BOOTSTRAP_CREDENTIALS_VARIAB= LE))); FreePool (Data); return EFI_NOT_FOUND; } @@ -284,7 +284,7 @@ GetBootstrapAccountCredentialsFromVariable ( =20 FreePool (Data); =20 - DEBUG ((DEBUG_INFO, "%a: get bootstrap credential from variable\n", __FU= NCTION__)); + DEBUG ((DEBUG_INFO, "%a: get bootstrap credential from variable\n", __fu= nc__)); =20 return EFI_SUCCESS; } @@ -412,7 +412,7 @@ LibCredentialGetAuthInfo ( DisableCredentialService =3D PcdGetBool (PcdRedfishDisableBootstrapCrede= ntialService); =20 if (mRedfishServiceStopped) { - DEBUG ((DEBUG_ERROR, "%a: credential service is stopped due to securit= y reason\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: credential service is stopped due to securit= y reason\n", __func__)); return EFI_ACCESS_DENIED; } =20 @@ -441,17 +441,17 @@ LibCredentialGetAuthInfo ( // Status =3D GetBootstrapAccountCredentials (DisableCredentialService, *Us= erId, USERNAME_MAX_SIZE, *Password, PASSWORD_MAX_SIZE); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: fail to get bootstrap credential: %r\n", __F= UNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: fail to get bootstrap credential: %r\n", __f= unc__, Status)); return Status; } =20 if (DisableCredentialService) { - DEBUG ((DEBUG_INFO, "%a: credential bootstrapping control disabled\n",= __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: credential bootstrapping control disabled\n",= __func__)); } =20 Status =3D SetBootstrapAccountCredentialsToVariable (*UserId, *Password,= FALSE); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: fail to cache bootstrap credential: %r\n", _= _FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: fail to cache bootstrap credential: %r\n", _= _func__, Status)); } =20 return EFI_SUCCESS; diff --git a/RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c b/RedfishPkg= /PrivateLibrary/RedfishLib/RedfishLib.c index 51a85a73360d..0a0a4e645872 100644 --- a/RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c +++ b/RedfishPkg/PrivateLibrary/RedfishLib/RedfishLib.c @@ -1101,7 +1101,7 @@ RedfishIsValidOdataType ( } } =20 - DEBUG ((DEBUG_INFO, "%a: This Odata type is not in the list.\n", __FUNCT= ION__)); + DEBUG ((DEBUG_INFO, "%a: This Odata type is not in the list.\n", __func_= _)); return FALSE; } =20 diff --git a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/servic= e.c b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c index cbd4330a0ed0..206094d87d0f 100644 --- a/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c +++ b/RedfishPkg/PrivateLibrary/RedfishLib/edk2libredfish/src/service.c @@ -521,7 +521,7 @@ getUriFromService ( // Status =3D DecodeResponseContent (ContentEncodedHeader->FieldValue, = &ResponseMsg.Body, &ResponseMsg.BodyLength); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Failed to decompress the response conten= t %r\n.", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Failed to decompress the response conten= t %r\n.", __func__, Status)); ret =3D NULL; goto ON_EXIT; } @@ -656,7 +656,7 @@ patchUriFromService ( // Status =3D EncodeRequestContent ((CHAR8 *)HTTP_CONTENT_ENCODING_GZIP, (C= HAR8 *)content, (VOID **)&EncodedContent, &EncodedContentLen); if (Status =3D=3D EFI_INVALID_PARAMETER) { - DEBUG ((DEBUG_ERROR, "%a: Error to encode content.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Error to encode content.\n", __func__)); ret =3D NULL; goto ON_EXIT; } else if (Status =3D=3D EFI_UNSUPPORTED) { diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c b= /RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c index 96aac125ee22..b51b558a487d 100644 --- a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c +++ b/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerCommon.c @@ -122,7 +122,7 @@ RedfishConfigCommonInit ( // Status =3D gBS->LocateProtocol (&gEdkIIRedfishCredentialProtocolGuid, NU= LL, (VOID **)&gCredential); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a: No Redfish Credential Protocol is installed o= n system.", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: No Redfish Credential Protocol is installed o= n system.", __func__)); return Status; } =20 @@ -138,7 +138,7 @@ RedfishConfigCommonInit ( &gEndOfDxeEvent ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to register End Of DXE event.", __FUNCT= ION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to register End Of DXE event.", __func_= _)); return Status; } =20 @@ -156,7 +156,7 @@ RedfishConfigCommonInit ( if (EFI_ERROR (Status)) { gBS->CloseEvent (gEndOfDxeEvent); gEndOfDxeEvent =3D 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; } =20 diff --git a/RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c b= /RedfishPkg/RedfishConfigHandler/RedfishConfigHandlerDriver.c index 96ac70f418c8..993ad338b6eb 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; =20 - 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__)); =20 BufferSize =3D sizeof (EFI_HANDLE); Status =3D gBS->LocateHandle ( @@ -383,7 +383,7 @@ RedfishDiscoverProtocolInstalled ( &HandleBuffer ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Can't locate handle with EFI_REDFISH_DISCOVE= R_PROTOCOL installed.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Can't locate handle with EFI_REDFISH_DISCOVE= R_PROTOCOL installed.\n", __func__)); } =20 gRedfishDiscoverActivated =3D TRUE; @@ -403,7 +403,7 @@ RedfishDiscoverProtocolInstalled ( if (EFI_ERROR (Status)) { gEfiRedfishDiscoverProtocol =3D NULL; gRedfishDiscoverActivated =3D 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 =3D=3D 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; } =20 gRedfishDiscoveredToken =3D AllocateZeroPool (gNumberOfNetworkInterfaces= * sizeof (EFI_REDFISH_DISCOVERED_TOKEN)); if (gRedfishDiscoveredToken =3D=3D 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; } =20 @@ -449,7 +449,7 @@ RedfishDiscoverProtocolInstalled ( &ThisRedfishDiscoveredToken->Event ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Failed to create event for Redfish discove= red token.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Failed to create event for Redfish discove= red token.\n", __func__)); goto ErrorReturn; } =20 @@ -472,7 +472,7 @@ RedfishDiscoverProtocolInstalled ( } =20 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; } =20 @@ -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; } =20 @@ -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; } =20 @@ -593,7 +593,7 @@ RedfishConfigHandlerDriverEntryPoint ( gExitBootServiceEvent =3D NULL; gBS->CloseEvent (gEfiRedfishDiscoverProtocolEvent); gEfiRedfishDiscoverProtocolEvent =3D 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; } =20 diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPk= g/RedfishDiscoverDxe/RedfishDiscoverDxe.c index f64c79088f63..583c6f78e19c 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -196,13 +196,13 @@ Tcp4GetSubnetInfo ( Tcp4Option.EnableNagle =3D TRUE; Status =3D Tcp4->Configure (Tcp4, &Tcp4CfgData); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Can't get subnet information\n", __FUNCTION_= _)); + DEBUG ((DEBUG_ERROR, "%a: Can't get subnet information\n", __func__)); return Status; } =20 Status =3D Tcp4->GetModeData (Tcp4, NULL, NULL, &IpModedata, NULL, NULL); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n", __FUN= CTION__)); + DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n", __fun= c__)); return Status; } =20 @@ -265,12 +265,12 @@ Tcp6GetSubnetInfo ( ZeroMem ((VOID *)&IpModedata, sizeof (EFI_IP6_MODE_DATA)); Status =3D Tcp6->GetModeData (Tcp6, NULL, NULL, &IpModedata, NULL, NULL); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n", __FUN= CTION__)); + DEBUG ((DEBUG_ERROR, "%a: Can't get IP mode data information\n", __fun= c__)); return Status; } =20 if (IpModedata.AddressCount =3D=3D 0) { - DEBUG ((DEBUG_INFO, "%a: No IPv6 address configured.\n", __FUNCTION__)= ); + DEBUG ((DEBUG_INFO, "%a: No IPv6 address configured.\n", __func__)); Instance->SubnetAddrInfoIPv6Number =3D 0; return EFI_SUCCESS; } @@ -282,7 +282,7 @@ Tcp6GetSubnetInfo ( =20 Instance->SubnetAddrInfoIPv6 =3D AllocateZeroPool (IpModedata.AddressCou= nt * sizeof (EFI_IP6_ADDRESS_INFO)); if (Instance->SubnetAddrInfoIPv6 =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Failed to allocate memory for IPv6 subnet ad= dress information\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Failed to allocate memory for IPv6 subnet ad= dress information\n", __func__)); return EFI_OUT_OF_RESOURCES; } =20 @@ -529,7 +529,7 @@ DiscoverRedfishHostInterface ( IP4_COPY_ADDRESS ((VOID *)&Instance->HostSubnetMask.v4, (VOID *)Data= ->HostIpMask); =20 if (EFI_IP4_EQUAL (&Instance->HostIpAddress.v4, &mZeroIp4Addr)) { - DEBUG ((DEBUG_ERROR, "%a: invalid host IP address: zero address\n"= , __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: invalid host IP address: zero address\n"= , __func__)); // // Invalid IP address detected. Change address format to Unknown a= nd use system default address. // @@ -537,7 +537,7 @@ DiscoverRedfishHostInterface ( } =20 if (!IP4_IS_VALID_NETMASK (EFI_IP4 (Instance->HostSubnetMask.v4))) { - DEBUG ((DEBUG_ERROR, "%a: invalid subnet mask address\n", __FUNCTI= ON__)); + DEBUG ((DEBUG_ERROR, "%a: invalid subnet mask address\n", __func__= )); // // Invalid subnet mast address detected. Change address format to = Unknown and use system default address. // @@ -551,14 +551,14 @@ DiscoverRedfishHostInterface ( IP4_COPY_ADDRESS ((VOID *)&Instance->TargetIpAddress.v4, (VOID *)Dat= a->RedfishServiceIpAddress); =20 if (EFI_IP4_EQUAL (&Instance->TargetIpAddress.v4, &mZeroIp4Addr)) { - DEBUG ((DEBUG_ERROR, "%a: invalid service IP address: zero address= \n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: invalid service IP address: zero address= \n", __func__)); } } else { IP6_COPY_ADDRESS ((VOID *)&Instance->TargetIpAddress.v6, (VOID *)Dat= a->RedfishServiceIpAddress); } =20 if (Instance->HostIntfValidation) { - DEBUG ((DEBUG_ERROR, "%a:Send UPnP unicast SSDP to validate this Red= fish Host Interface is not supported.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a:Send UPnP unicast SSDP to validate this Red= fish Host Interface is not supported.\n", __func__)); Status =3D EFI_UNSUPPORTED; } else { // @@ -682,7 +682,7 @@ AddAndSignalNewRedfishService ( RestExOpened =3D FALSE; DeleteRestEx =3D FALSE; =20 - DEBUG ((DEBUG_INFO, "%a:Add this instance to Redfish instance list.\n", = __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a:Add this instance to Redfish instance list.\n", = __func__)); =20 if (Uuid !=3D NULL) { Char16Uuid =3D (CHAR16 *)AllocateZeroPool (AsciiStrSize ((const CHAR8 = *)Uuid) * sizeof (CHAR16)); @@ -846,7 +846,7 @@ AddAndSignalNewRedfishService ( if (!InfoRefresh) { Status =3D CreateRestExInstance (Instance, Instance->DiscoverToken);= // Create REST EX child. if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a:Can't create REST EX child instance.\n", = __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a:Can't create REST EX child instance.\n", = __func__)); goto ON_EXIT; } =20 @@ -906,7 +906,7 @@ AddAndSignalNewRedfishService ( (EFI_REST_EX_CONFIG_DATA)(UINT8 *)RestExHttpConfi= gData ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a:REST EX configured..\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a:REST EX configured..\n", __func__)); DeleteRestEx =3D TRUE; goto EXIT_FREE_ALL; } @@ -927,7 +927,7 @@ AddAndSignalNewRedfishService ( =20 Status =3D gBS->SignalEvent (Instance->DiscoverToken->Event); if (!EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a:No event to signal!\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a:No event to signal!\n", __func__)); } } =20 @@ -997,13 +997,13 @@ NetworkInterfaceGetSubnetInfo ( Instance ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a:Failed to get Subnet infomation.\n", __FUNC= TION__)); + DEBUG ((DEBUG_ERROR, "%a:Failed to get Subnet infomation.\n", __func= __)); return Status; } else { - DEBUG ((DEBUG_INFO, "%a:MAC address: %s\n", __FUNCTION__, Instance->= StrMacAddr)); + DEBUG ((DEBUG_INFO, "%a:MAC address: %s\n", __func__, Instance->StrM= acAddr)); if (CheckIsIpVersion6 (Instance)) { if (Instance->SubnetAddrInfoIPv6Number =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a: There is no Subnet infomation for IPv6= network interface.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: There is no Subnet infomation for IPv6= network interface.\n", __func__)); return EFI_NOT_FOUND; } =20 @@ -1184,13 +1184,13 @@ RedfishServiceAcquireService ( UINTN NetworkInterfacesIndex; EFI_REDFISH_DISCOVER_NETWORK_INTERFACE_INTERNAL *TargetNetworkInterface= Internal; =20 - DEBUG ((DEBUG_INFO, "%a:Entry.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a:Entry.\n", __func__)); =20 // // Validate parameters. // if ((ImageHandle =3D=3D NULL) || (Token =3D=3D NULL) || ((Flags & ~EFI_R= EDFISH_DISCOVER_VALIDATION) =3D=3D 0)) { - DEBUG ((DEBUG_ERROR, "%a:Invalid parameters.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a:Invalid parameters.\n", __func__)); return EFI_INVALID_PARAMETER; } =20 @@ -1208,7 +1208,7 @@ RedfishServiceAcquireService ( TargetNetworkInterfaceInternal =3D (EFI_REDFISH_DISCOVER_NETWORK_INTER= FACE_INTERNAL *)GetFirstNode (&mEfiRedfishDiscoverNetworkInterface); NumNetworkInterfaces =3D NumberOfNetworkInterface (); if (NumNetworkInterfaces =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a:No network interface on platform.\n", __FUN= CTION__)); + DEBUG ((DEBUG_ERROR, "%a:No network interface on platform.\n", __fun= c__)); return EFI_UNSUPPORTED; } } @@ -1219,10 +1219,10 @@ RedfishServiceAcquireService ( NewInstance =3D FALSE; Instance =3D GetInstanceByOwner (ImageHandle, TargetNetworkInterfac= eInternal, Flags & ~EFI_REDFISH_DISCOVER_VALIDATION); // Check if we can re= -use previous instance. if (Instance =3D=3D NULL) { - DEBUG ((DEBUG_INFO, "%a:Create new EFI_REDFISH_DISCOVERED_INTERNAL_I= NSTANCE.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a:Create new EFI_REDFISH_DISCOVERED_INTERNAL_I= NSTANCE.\n", __func__)); Instance =3D (EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE *)AllocateZer= oPool (sizeof (EFI_REDFISH_DISCOVERED_INTERNAL_INSTANCE)); if (Instance =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a:Memory allocation fail.\n", __FUNCTION__)= ); + DEBUG ((DEBUG_ERROR, "%a:Memory allocation fail.\n", __func__)); } =20 InitializeListHead (&Instance->Entry); @@ -1238,14 +1238,14 @@ RedfishServiceAcquireService ( } =20 if (TargetNetworkInterfaceInternal->StrMacAddr !=3D NULL) { - DEBUG ((DEBUG_INFO, "%a:Acquire Redfish service on network interface= MAC address:%s.\n", __FUNCTION__, TargetNetworkInterfaceInternal->StrMacAd= dr)); + DEBUG ((DEBUG_INFO, "%a:Acquire Redfish service on network interface= MAC address:%s.\n", __func__, TargetNetworkInterfaceInternal->StrMacAddr)); } else { - DEBUG ((DEBUG_INFO, "%a:WARNING: No MAC address on this network inte= rface.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a:WARNING: No MAC address on this network inte= rface.\n", __func__)); } =20 Instance->DiscoverToken =3D Token; // Always use the latest Token pass= ed by caller. if ((Flags & EFI_REDFISH_DISCOVER_HOST_INTERFACE) !=3D 0) { - DEBUG ((DEBUG_INFO, "%a:Redfish HOST interface discovery.\n", __FUNC= TION__)); + DEBUG ((DEBUG_INFO, "%a:Redfish HOST interface discovery.\n", __func= __)); Instance->HostIntfValidation =3D FALSE; if ((Flags & EFI_REDFISH_DISCOVER_VALIDATION) !=3D 0) { Instance->HostIntfValidation =3D TRUE; @@ -1255,12 +1255,12 @@ RedfishServiceAcquireService ( } =20 if ((Flags & EFI_REDFISH_DISCOVER_SSDP) !=3D 0) { - DEBUG ((DEBUG_ERROR, "%a:Redfish service discovery through SSDP is n= ot supported\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a:Redfish service discovery through SSDP is n= ot supported\n", __func__)); return EFI_UNSUPPORTED; } else { if (EFI_ERROR (Status1) && EFI_ERROR (Status2)) { FreePool ((VOID *)Instance); - DEBUG ((DEBUG_ERROR, "%a:Something wrong on Redfish service discov= ery Status1=3D%x, Status2=3D%x.\n", __FUNCTION__, Status1, Status2)); + DEBUG ((DEBUG_ERROR, "%a:Something wrong on Redfish service discov= ery Status1=3D%x, Status2=3D%x.\n", __func__, Status1, Status2)); } else { if (NewInstance) { InsertTailList (&mRedfishDiscoverList, &Instance->Entry); @@ -1326,7 +1326,7 @@ RedfishServiceReleaseService ( EFI_REDFISH_DISCOVERED_INTERNAL_LIST *DiscoveredRedfishInstance; =20 if (IsListEmpty (&mRedfishInstanceList)) { - DEBUG ((DEBUG_ERROR, "%a:No any discovered Redfish service.\n", __FUNC= TION__)); + DEBUG ((DEBUG_ERROR, "%a:No any discovered Redfish service.\n", __func= __)); return EFI_NOT_FOUND; } =20 @@ -1535,7 +1535,7 @@ TestForRequiredProtocols ( ); if (EFI_ERROR (Status)) { if (Index =3D=3D ListCount - 1) { - DEBUG ((DEBUG_ERROR, "%a: all required protocols are found on th= is controller handle: %p.\n", __FUNCTION__, ControllerHandle)); + DEBUG ((DEBUG_ERROR, "%a: all required protocols are found on th= is controller handle: %p.\n", __func__, ControllerHandle)); return EFI_SUCCESS; } } @@ -1706,7 +1706,7 @@ BuildupNetworkInterface ( if (!NewNetworkInterfaceInstalled) { NetworkInterface =3D GetTargetNetworkInterfaceInternalByContro= ller (ControllerHandle); if (NetworkInterface =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Can't find network interface by Co= ntrollerHandle\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Can't find network interface by Co= ntrollerHandle\n", __func__)); return Status; } } @@ -1720,10 +1720,10 @@ BuildupNetworkInterface ( (VOI= D *)&mRedfishDiscover ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI_REDFISH_DISCOVER= _PROTOCOL\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to install EFI_REDFISH_DISCOVER= _PROTOCOL\n", __func__)); } } else { - DEBUG ((DEBUG_INFO, "%a: Not REST EX, continue with next\n", __F= UNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Not REST EX, continue with next\n", __f= unc__)); Index++; if (Index =3D=3D (sizeof (gRequiredProtocol) / sizeof (REDFISH_D= ISCOVER_REQUIRED_PROTOCOL))) { break; diff --git a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c b= /RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c index 872cf3ae0609..45fc6e2182bc 100644 --- a/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c +++ b/RedfishPkg/RedfishHostInterfaceDxe/RedfishHostInterfaceDxe.c @@ -59,11 +59,11 @@ RedfishCreateSmbiosTable42 ( Status =3D RedfishPlatformHostInterfaceDeviceDescriptor (&DeviceType, &D= eviceDescriptor); if (EFI_ERROR (Status)) { if (Status =3D=3D EFI_NOT_FOUND) { - DEBUG ((DEBUG_ERROR, "%a: No Redfish host interface descriptor is pr= ovided on this platform.", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: No Redfish host interface descriptor is pr= ovided on this platform.", __func__)); return EFI_NOT_FOUND; } =20 - DEBUG ((DEBUG_ERROR, "%a: Fail to get device descriptor, %r.", __FUNCT= ION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Fail to get device descriptor, %r.", __func_= _, Status)); return Status; } =20 @@ -71,7 +71,7 @@ RedfishCreateSmbiosTable42 ( (DeviceType !=3D 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; } =20 @@ -98,7 +98,7 @@ RedfishCreateSmbiosTable42 ( } =20 if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to get Redfish host interafce protoco= l type data.", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to get Redfish host interafce protoco= l type data.", __func__)); if (ProtocolRecords !=3D NULL) { FreePool (ProtocolRecords); } @@ -124,7 +124,7 @@ RedfishCreateSmbiosTable42 ( } else { NewProtocolRecords =3D ReallocatePool (CurrentProtocolsDataLength, N= ewProtocolsDataLength, (VOID *)ProtocolRecords); if (NewProtocolRecords =3D=3D 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 r= eady\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Platform Redfish Host Interface informtion is r= eady\n", __func__)); =20 RedfishCreateSmbiosTable42 (); =20 @@ -290,7 +290,7 @@ RedfishHostInterfaceDxeEntryPoint ( EFI_STATUS Status; EFI_GUID *ReadyGuid; =20 - DEBUG ((DEBUG_INFO, "%a: Entry\n.", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Entry\n.", __func__)); =20 // // Check if the Redfish Host Interface depends on diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c b/RedfishPkg/R= edfishRestExDxe/RedfishRestExImpl.c index 75b3f1fab8fc..41f2b29c83be 100644 --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExImpl.c @@ -28,17 +28,17 @@ ResetHttpTslSession ( { EFI_STATUS Status; =20 - DEBUG ((DEBUG_INFO, "%a: TCP connection is finished. Could be TSL sessio= n closure, reset HTTP instance for the new TLS session.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: TCP connection is finished. Could be TSL sessio= n closure, reset HTTP instance for the new TLS session.\n", __func__)); =20 Status =3D Instance->HttpIo.Http->Configure (Instance->HttpIo.Http, NULL= ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Error to reset HTTP instance.\n", __FUNCTION= __)); + DEBUG ((DEBUG_ERROR, "%a: Error to reset HTTP instance.\n", __func__)); return Status; } =20 Status =3D Instance->HttpIo.Http->Configure (Instance->HttpIo.Http, &((E= FI_REST_EX_HTTP_CONFIG_DATA *)Instance->ConfigData)->HttpConfigData); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Error to re-initiate HTTP instance.\n", __FU= NCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Error to re-initiate HTTP instance.\n", __fu= nc__)); } =20 return Status; @@ -70,7 +70,7 @@ RedfishCheckHttpReceiveStatus ( ReturnStatus =3D EFI_SUCCESS; } else if (HttpIoReceiveStatus !=3D EFI_CONNECTION_FIN) { if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY) =3D=3D 0= ) { - DEBUG ((DEBUG_ERROR, "%a: TCP error, reset HTTP session.\n", __FUNCT= ION__)); + DEBUG ((DEBUG_ERROR, "%a: TCP error, reset HTTP session.\n", __func_= _)); Instance->Flags |=3D RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY; gBS->Stall (500); Status =3D ResetHttpTslSession (Instance); @@ -78,20 +78,20 @@ RedfishCheckHttpReceiveStatus ( return EFI_NOT_READY; } =20 - DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__= )); + DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __func__)); } =20 ReturnStatus =3D EFI_DEVICE_ERROR; } else { if ((Instance->Flags & RESTEX_INSTANCE_FLAGS_TLS_RETRY) !=3D 0) { - DEBUG ((DEBUG_ERROR, "%a: REST_EX Send and receive fail even with a = new TLS session.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: REST_EX Send and receive fail even with a = new TLS session.\n", __func__)); ReturnStatus =3D EFI_DEVICE_ERROR; } =20 Instance->Flags |=3D RESTEX_INSTANCE_FLAGS_TLS_RETRY; Status =3D ResetHttpTslSession (Instance); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __FUNCTION__= )); + DEBUG ((DEBUG_ERROR, "%a: Reset HTTP instance fail.\n", __func__)); ReturnStatus =3D EFI_DEVICE_ERROR; } =20 --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#102638): https://edk2.groups.io/g/devel/message/102638 Mute This Topic: https://groups.io/mt/98115244/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-