From nobody Wed May 15 21:28:32 2024 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+102631+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+102631+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819822; cv=none; d=zohomail.com; s=zohoarc; b=GNF2tldODSjyPQiAWOD/6ijEjj1vuDGQ2cduVwxnNrdGptL31xMExkq0k7i7L9oCK+hZj8otBCb0+ysDR4RyKaZ0VBwBEpC5GOZdQgs2/KuIg+Zeis/Q8bZ7lgmHH3P0OvpFSkY99YIoB78qhJRqotBBJKw+FjpvwQLA3nobMtI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819822; 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=TQTYFNjs5dqfnqblSSWPBuX1T5wV73MOY2wRbAWCYfI=; b=jFngU0kNT/lfyq0704cAAH5gYTsKZZJ0Rxt4Vgypi/YB6zArOeqiaFfmFlRA5g3vYuktKf0UlU335YuAXYnZpz3XRMzzMHfU+KdvjQ6Mg1EfYoK+JUyHY1UNqynlRAHxZ+Islub9oO1ut2PjrkU4/kUqX+aom9d+qY2SsHViYK8= 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+102631+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819822264790.3881454563358; Thu, 6 Apr 2023 15:23:42 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id qeewYY1788612xv85x91CLa8; Thu, 06 Apr 2023 15:23:41 -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.171986.1680819821020914161 for ; Thu, 06 Apr 2023 15:23:41 -0700 X-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 57ED65C01D1; Thu, 6 Apr 2023 18:23:40 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 06 Apr 2023 18:23:40 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:23:36 -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 01/18] ArmPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:02 -0600 Message-Id: <20230406222319.2281263-2-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: Y6xPWnARKA5R5CuPQsn1lBTUx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819821; bh=Ntlt9U6qQIEDWNTRV7C/yXSGescT41rfxrzpfK9O3Q8=; h=Cc:Date:From:Reply-To:Subject:To; b=qdMmu4N6kCd1eqUDvhGlWnAcV20+vchE7ssoQAVenJvavDtHzN9QnEyt0br+ywikPed lDNCpAgDQEca9h1UgRmZt8XssqGyXDTMdP/EhiGjX7EnaWAluLVARvTS1OxDxYHVn2Lt9 WEc4cyf70trca1XCvCRwqlYH0C2KJ+bz94k= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819824117100003 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 ArmPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c = | 4 +-- ArmPkg/Drivers/CpuDxe/MemoryAttribute.c = | 10 +++--- ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c = | 4 +-- ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c = | 2 +- ArmPkg/Library/LinuxBootBootManagerLib/LinuxBootBm.c = | 2 +- ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c = | 32 ++++++++++---------- ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c = | 2 +- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c = | 2 +- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFunctio= n.c | 2 +- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacturerFunc= tion.c | 2 +- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerFuncti= on.c | 2 +- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableLangua= gesFunction.c | 2 +- ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunction.c= | 2 +- 13 files changed, 34 insertions(+), 34 deletions(-) diff --git a/ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c b/ArmPkg/Drivers/ArmGi= c/ArmGicCommonDxe.c index cd12fcda27e9..d560c42fc9f3 100644 --- a/ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c +++ b/ArmPkg/Drivers/ArmGic/ArmGicCommonDxe.c @@ -137,7 +137,7 @@ CpuArchEventProtocolNotify ( DEBUG (( DEBUG_ERROR, "%a: Cpu->RegisterInterruptHandler() - %r\n", - __FUNCTION__, + __func__, Status )); return; @@ -153,7 +153,7 @@ CpuArchEventProtocolNotify ( DEBUG (( DEBUG_ERROR, "%a: Cpu->RegisterInterruptHandler() - %r\n", - __FUNCTION__, + __func__, Status )); } diff --git a/ArmPkg/Drivers/CpuDxe/MemoryAttribute.c b/ArmPkg/Drivers/CpuDx= e/MemoryAttribute.c index cbc8261a68b7..61ba8fbbae4e 100644 --- a/ArmPkg/Drivers/CpuDxe/MemoryAttribute.c +++ b/ArmPkg/Drivers/CpuDxe/MemoryAttribute.c @@ -92,7 +92,7 @@ GetMemoryAttributes ( DEBUG (( DEBUG_VERBOSE, "%a: BaseAddress =3D=3D 0x%lx, Length =3D=3D 0x%lx\n", - __FUNCTION__, + __func__, BaseAddress, Length )); @@ -113,7 +113,7 @@ GetMemoryAttributes ( DEBUG (( DEBUG_VERBOSE, "%a: RegionAddress =3D=3D 0x%lx, RegionLength =3D=3D 0x%lx, RegionAt= tributes =3D=3D 0x%lx\n", - __FUNCTION__, + __func__, (UINT64)RegionAddress, (UINT64)RegionLength, (UINT64)RegionAttributes @@ -130,7 +130,7 @@ GetMemoryAttributes ( DEBUG (( DEBUG_VERBOSE, "%a: Union =3D=3D %lx, Intersection =3D=3D %lx\n", - __FUNCTION__, + __func__, (UINT64)Union, (UINT64)Intersection )); @@ -188,7 +188,7 @@ SetMemoryAttributes ( DEBUG (( DEBUG_INFO, "%a: BaseAddress =3D=3D 0x%lx, Length =3D=3D 0x%lx, Attributes =3D=3D = 0x%lx\n", - __FUNCTION__, + __func__, (UINTN)BaseAddress, (UINTN)Length, (UINTN)Attributes @@ -272,7 +272,7 @@ ClearMemoryAttributes ( DEBUG (( DEBUG_INFO, "%a: BaseAddress =3D=3D 0x%lx, Length =3D=3D 0x%lx, Attributes =3D=3D = 0x%lx\n", - __FUNCTION__, + __func__, (UINTN)BaseAddress, (UINTN)Length, (UINTN)Attributes diff --git a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c b/ArmPkg/Libr= ary/ArmMmuLib/AArch64/ArmMmuLibCore.c index 7acfd2e89a92..7ed758fbbc69 100644 --- a/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c +++ b/ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c @@ -139,7 +139,7 @@ ReplaceTableEntry ( (((RegionStart ^ (UINTN)Entry) & ~BlockMask) =3D=3D 0)) { DisableMmu =3D TRUE; - DEBUG ((DEBUG_WARN, "%a: splitting block entry with MMU disabled\n",= __FUNCTION__)); + DEBUG ((DEBUG_WARN, "%a: splitting block entry with MMU disabled\n",= __func__)); } =20 mReplaceLiveEntryFunc (Entry, Value, RegionStart, DisableMmu); @@ -233,7 +233,7 @@ UpdateRegionMappingRecursive ( DEBUG (( DEBUG_VERBOSE, "%a(%d): %llx - %llx set %lx clr %lx\n", - __FUNCTION__, + __func__, Level, RegionStart, RegionEnd, diff --git a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c b= /ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c index 7bcd34849507..02b0c27e4df3 100644 --- a/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c +++ b/ArmPkg/Library/ArmPsciResetSystemLib/ArmPsciResetSystemLib.c @@ -65,7 +65,7 @@ LibResetSystem ( ArmCallSmc (&ArmSmcArgs); =20 // We should never be here - DEBUG ((DEBUG_ERROR, "%a: PSCI Reset failed\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: PSCI Reset failed\n", __func__)); CpuDeadLoop (); return EFI_UNSUPPORTED; } diff --git a/ArmPkg/Library/LinuxBootBootManagerLib/LinuxBootBm.c b/ArmPkg/= Library/LinuxBootBootManagerLib/LinuxBootBm.c index 5a44af5a755d..75998eabb1c6 100644 --- a/ArmPkg/Library/LinuxBootBootManagerLib/LinuxBootBm.c +++ b/ArmPkg/Library/LinuxBootBootManagerLib/LinuxBootBm.c @@ -151,7 +151,7 @@ PlatformBootManagerAfterConsole ( LOAD_OPTION_ACTIVE ); } else { - DEBUG ((DEBUG_ERROR, "%a: PcdLinuxBootFileGuid was not set!\n", __FUNC= TION__)); + DEBUG ((DEBUG_ERROR, "%a: PcdLinuxBootFileGuid was not set!\n", __func= __)); } } =20 diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Li= brary/PlatformBootManagerLib/PlatformBm.c index 2fb1a4aa4fb8..08998ffe4d17 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -195,7 +195,7 @@ FilterAndProcess ( DEBUG (( DEBUG_VERBOSE, "%a: %g: %r\n", - __FUNCTION__, + __func__, ProtocolGuid, Status )); @@ -266,7 +266,7 @@ IsPciDisplay ( &Pci ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __FUNCTION__, ReportText, Status)= ); + DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __func__, ReportText, Status)); return FALSE; } =20 @@ -330,7 +330,7 @@ Connect ( DEBUG (( EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: %s: %r\n", - __FUNCTION__, + __func__, ReportText, Status )); @@ -356,7 +356,7 @@ AddOutput ( DEBUG (( DEBUG_ERROR, "%a: %s: handle %p: device path not found\n", - __FUNCTION__, + __func__, ReportText, Handle )); @@ -368,7 +368,7 @@ AddOutput ( DEBUG (( DEBUG_ERROR, "%a: %s: adding to ConOut: %r\n", - __FUNCTION__, + __func__, ReportText, Status )); @@ -380,7 +380,7 @@ AddOutput ( DEBUG (( DEBUG_ERROR, "%a: %s: adding to ErrOut: %r\n", - __FUNCTION__, + __func__, ReportText, Status )); @@ -390,7 +390,7 @@ AddOutput ( DEBUG (( DEBUG_VERBOSE, "%a: %s: added to ConOut and ErrOut\n", - __FUNCTION__, + __func__, ReportText )); } @@ -547,7 +547,7 @@ GetPlatformOptions ( DEBUG (( DEBUG_ERROR, "%a: failed to register \"%s\": %r\n", - __FUNCTION__, + __func__, BootOptions[Index].Description, Status )); @@ -575,7 +575,7 @@ GetPlatformOptions ( DEBUG (( DEBUG_ERROR, "%a: failed to register hotkey for \"%s\": %r\n", - __FUNCTION__, + __func__, BootOptions[Index].Description, Status )); @@ -757,7 +757,7 @@ HandleCapsules ( BOOLEAN NeedReset; EFI_STATUS Status; =20 - DEBUG ((DEBUG_INFO, "%a: processing capsules ...\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: processing capsules ...\n", __func__)); =20 Status =3D gBS->LocateProtocol ( &gEsrtManagementProtocolGuid, @@ -785,7 +785,7 @@ HandleCapsules ( DEBUG (( DEBUG_ERROR, "%a: failed to process capsule %p - %r\n", - __FUNCTION__, + __func__, CapsuleHeader, Status )); @@ -800,7 +800,7 @@ HandleCapsules ( DEBUG (( DEBUG_WARN, "%a: capsule update successful, resetting ...\n", - __FUNCTION__ + __func__ )); =20 gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL); @@ -868,7 +868,7 @@ BootDiscoveryPolicyHandler ( DEBUG (( DEBUG_INFO, "%a - Unexpected DiscoveryPolicy (0x%x). Run Minimal Discovery Pol= icy\n", - __FUNCTION__, + __func__, DiscoveryPolicy )); return EFI_SUCCESS; @@ -884,14 +884,14 @@ BootDiscoveryPolicyHandler ( DEBUG_INFO, "%a - Failed to locate gEfiBootManagerPolicyProtocolGuid." "Driver connect will be skipped.\n", - __FUNCTION__ + __func__ )); return Status; } =20 Status =3D BMPolicy->ConnectDeviceClass (BMPolicy, Class); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - ConnectDeviceClass returns - %r\n", __FUNCT= ION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - ConnectDeviceClass returns - %r\n", __func_= _, Status)); return Status; } =20 @@ -1096,7 +1096,7 @@ PlatformBootManagerUnableToBoot ( DEBUG (( DEBUG_WARN, "%a: rebooting after refreshing all boot options\n", - __FUNCTION__ + __func__ )); gRT->ResetSystem (EfiResetCold, EFI_SUCCESS, 0, NULL); } diff --git a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass= .c b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c index 3b12e26abf6e..905058850056 100644 --- a/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c +++ b/ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClass.c @@ -741,7 +741,7 @@ AddSmbiosProcessorTypeTable ( DEBUG (( DEBUG_ERROR, "[%a]:[%dL] Smbios Type04 Table Log Failed! %r \n", - __FUNCTION__, + __func__, DEBUG_LINE_NUMBER, Status )); diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFun= ction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFuncti= on.c index c9f25b750254..38f3864b160e 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type00/MiscBiosVendorFunction.c @@ -287,7 +287,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBiosVendor) { DEBUG (( DEBUG_ERROR, "[%a]:[%dL] Smbios Type00 Table Log Failed! %r \n", - __FUNCTION__, + __func__, DEBUG_LINE_NUMBER, Status )); diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufac= turerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemMa= nufacturerFunction.c index 22fb5eccaa63..8867de4815a2 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFu= nction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type01/MiscSystemManufacturerFu= nction.c @@ -184,7 +184,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscSystemManufacturer) { DEBUG (( DEBUG_ERROR, "[%a]:[%dL] Smbios Type01 Table Log Failed! %r \n", - __FUNCTION__, + __func__, DEBUG_LINE_NUMBER, Status )); diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManu= facturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseB= oardManufacturerFunction.c index 3441e7798860..feb42e6f5dee 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacture= rFunction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type02/MiscBaseBoardManufacture= rFunction.c @@ -214,7 +214,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBaseBoardManufacturer) { DEBUG (( DEBUG_ERROR, "[%a]:[%dL] Smbios Type02 Table Log Failed! %r \n", - __FUNCTION__, + __func__, DEBUG_LINE_NUMBER, Status )); diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufa= cturerFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassis= ManufacturerFunction.c index d161970c023e..6b3b63b0e8d5 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerF= unction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type03/MiscChassisManufacturerF= unction.c @@ -179,7 +179,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscChassisManufacturer) { DEBUG (( DEBUG_ERROR, "[%a]:[%dL] Smbios Type03 Table Log Failed! %r \n", - __FUNCTION__, + __func__, DEBUG_LINE_NUMBER, Status )); diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInsta= llableLanguagesFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/Mi= scNumberOfInstallableLanguagesFunction.c index 386b8800e29b..951ac2a905b6 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableL= anguagesFunction.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type13/MiscNumberOfInstallableL= anguagesFunction.c @@ -161,7 +161,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscNumberOfInstallableLang= uages) { DEBUG (( DEBUG_ERROR, "[%a]:[%dL] Smbios Type13 Table Log Failed! %r \n", - __FUNCTION__, + __func__, DEBUG_LINE_NUMBER, Status )); diff --git a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformati= onFunction.c b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInforma= tionFunction.c index fdf6262aa7f5..fa1ea95f2bc3 100644 --- a/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunct= ion.c +++ b/ArmPkg/Universal/Smbios/SmbiosMiscDxe/Type32/MiscBootInformationFunct= ion.c @@ -69,7 +69,7 @@ SMBIOS_MISC_TABLE_FUNCTION (MiscBootInformation) { DEBUG (( DEBUG_ERROR, "[%a]:[%dL] Smbios Type32 Table Log Failed! %r \n", - __FUNCTION__, + __func__, DEBUG_LINE_NUMBER, Status )); --=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 (#102631): https://edk2.groups.io/g/devel/message/102631 Mute This Topic: https://groups.io/mt/98115219/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- From nobody Wed May 15 21:28:32 2024 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+102632+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+102632+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819825; cv=none; d=zohomail.com; s=zohoarc; b=SfwfDNwIXk05ehEURNHaforQPJHRDsNaVMamAoWEUguRAes2SPoFuwQ4yZnlKb00zpOYfYPwP2VHCpBlYIkCCtN8cNCf5zC/Zy6A123AzjodY5V+YfliaJGzPhE3JRrD1Nb5Ul5WWsvefl3IRWmze1D6v+gQ09CVquW1XIUNn6Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819825; 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=FIDVfDJRkaZiZtjRqhclfcHcntMR8Y8392Y1OmM+lcY=; b=nzcaB0k5PJr/7qB/orCZeMLYj+kowxajM0zlPUfz2/L3S3yXqNvFqpCOGoXMI32XJAKLe3ezC/X2UPvn1KWT7K123prXhFumM0Df/N5sBnJrSX9k+mxTeUa7y/hMty0LdK2MBM3GzRtN0fDfX9sAHNV3t6FPZKgyb7n1Y1z0cBw= 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+102632+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819825693295.76155865028807; Thu, 6 Apr 2023 15:23:45 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id KGVLYY1788612xJHwLC0QgL2; Thu, 06 Apr 2023 15:23:45 -0700 X-Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.171734.1680819824601874879 for ; Thu, 06 Apr 2023 15:23:44 -0700 X-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id E58655C01E1; Thu, 6 Apr 2023 18:23:43 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 06 Apr 2023 18:23:43 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:23:40 -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 02/18] ArmVirtPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:03 -0600 Message-Id: <20230406222319.2281263-3-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: KlNsMaJRh9V1UAqYW20XmjHEx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819825; bh=C7GplKTlDLVJr1v9kId1pKNGdrzv3b4TujTY47kgeng=; h=Cc:Date:From:Reply-To:Subject:To; b=akyoTrLJOxX005iD5zIVpa2UbjUOCJUSw7qSFVXKM6MwmjTMjz7LmoZFVlg+8NSGpZp /yNH7DoteF7YHjGeh+ylovO/29SjE0tqlI2GFd37gehfzZE+i7S+JcLeQQjAsbCyavsiL 91MNMjR9KCaUWvqN+7+QWzDo2R+/KC6FdnE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819827194100001 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 ArmVirtPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpi.c = | 4 ++-- ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c = | 2 +- ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.c = | 4 ++-- ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetSystemLib.c = | 6 +++--- ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSystemPeiL= ib.c | 6 +++--- ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoLib.c = | 10 +++++----- ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c = | 4 ++-- ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c = | 2 +- ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c = | 4 ++-- ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c = | 2 +- ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c = | 20 ++++++++++---------- ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c = | 2 +- ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c = | 6 +++--- ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c = | 4 ++-- ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLibConstructor.c = | 4 ++-- ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.c = | 4 ++-- ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.c = | 4 ++-- 17 files changed, 44 insertions(+), 44 deletions(-) diff --git a/ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpi.c b/ArmVirtPkg/C= loudHvAcpiPlatformDxe/CloudHvAcpi.c index 0595b0e1d384..254aa978c67a 100644 --- a/ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpi.c +++ b/ArmVirtPkg/CloudHvAcpiPlatformDxe/CloudHvAcpi.c @@ -106,7 +106,7 @@ InstallCloudHvAcpiTables ( } // while =20 if (DsdtPtr =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: no DSDT found\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: no DSDT found\n", __func__)); return EFI_NOT_FOUND; } =20 @@ -151,7 +151,7 @@ CloudHvAcpiPlatformEntryPoint ( DEBUG (( DEBUG_ERROR, "%a: Fail to install Acpi table: %r\n", - __FUNCTION__, + __func__, Status )); CpuDeadLoop (); diff --git a/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c b/Arm= VirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c index 57bbfd20d03c..cf9434e534b5 100644 --- a/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c +++ b/ArmVirtPkg/Library/ArmVirtGicArchLib/ArmVirtGicArchLib.c @@ -150,7 +150,7 @@ ArmVirtGicArchLibConstructor ( break; =20 default: - DEBUG ((DEBUG_ERROR, "%a: No GIC revision specified!\n", __FUNCTION_= _)); + DEBUG ((DEBUG_ERROR, "%a: No GIC revision specified!\n", __func__)); return RETURN_NOT_FOUND; } =20 diff --git a/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtCli= entLib.c b/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClien= tLib.c index 45dd9f179c6a..01bcd58d30e9 100644 --- a/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.c +++ b/ArmVirtPkg/Library/ArmVirtPL031FdtClientLib/ArmVirtPL031FdtClientLib.c @@ -42,7 +42,7 @@ ArmVirtPL031FdtClientLibConstructor ( DEBUG (( DEBUG_WARN, "%a: No 'arm,pl031' compatible DT node found\n", - __FUNCTION__ + __func__ )); return EFI_SUCCESS; } @@ -58,7 +58,7 @@ ArmVirtPL031FdtClientLibConstructor ( DEBUG (( DEBUG_WARN, "%a: No 'reg' property found in 'arm,pl031' compatible DT node\n", - __FUNCTION__ + __func__ )); return EFI_SUCCESS; } diff --git a/ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetS= ystemLib.c b/ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetS= ystemLib.c index c7065b7ec5c1..1f27b7648d16 100644 --- a/ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetSystemLi= b.c +++ b/ArmVirtPkg/Library/ArmVirtPsciResetSystemLib/ArmVirtPsciResetSystemLi= b.c @@ -65,7 +65,7 @@ ArmPsciResetSystemLibConstructor ( DEBUG (( DEBUG_ERROR, "%a: Unknown PSCI method \"%a\"\n", - __FUNCTION__, + __func__, Prop )); return EFI_NOT_FOUND; @@ -105,7 +105,7 @@ ResetCold ( break; =20 default: - DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __func__)); } } =20 @@ -154,7 +154,7 @@ ResetShutdown ( break; =20 default: - DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __func__)); } } =20 diff --git a/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciRes= etSystemPeiLib.c b/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtP= sciResetSystemPeiLib.c index 03d14fe4325d..dffc1fb9790b 100644 --- a/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSyste= mPeiLib.c +++ b/ArmVirtPkg/Library/ArmVirtPsciResetSystemPeiLib/ArmVirtPsciResetSyste= mPeiLib.c @@ -73,7 +73,7 @@ DiscoverPsciMethod ( DEBUG (( DEBUG_ERROR, "%a: Missing PSCI method property\n", - __FUNCTION__ + __func__ )); return PsciMethodUnknown; } @@ -86,7 +86,7 @@ DiscoverPsciMethod ( DEBUG (( DEBUG_ERROR, "%a: Unknown PSCI method \"%a\"\n", - __FUNCTION__, + __func__, Prop )); return PsciMethodUnknown; @@ -119,7 +119,7 @@ PerformPsciAction ( break; =20 default: - DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: no PSCI method defined\n", __func__)); ASSERT (FALSE); } } diff --git a/ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoLib= .c b/ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoLib.c index 28a0c0b0785f..98cc13870599 100644 --- a/ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoLib.c +++ b/ArmVirtPkg/Library/CloudHvVirtMemInfoLib/CloudHvVirtMemInfoLib.c @@ -98,7 +98,7 @@ CloudHvVirtMemInfoPeiLibConstructor ( DEBUG (( DEBUG_INFO, "%a: System RAM @ 0x%lx - 0x%lx\n", - __FUNCTION__, + __func__, CurBase, CurBase + CurSize - 1 )); @@ -124,7 +124,7 @@ CloudHvVirtMemInfoPeiLibConstructor ( DEBUG (( DEBUG_WARN, "%a: memory node larger than %d will not be included into Memo= ry System\n", - __FUNCTION__, + __func__, CLOUDHV_MAX_MEM_NODE_NUM )); break; @@ -133,7 +133,7 @@ CloudHvVirtMemInfoPeiLibConstructor ( DEBUG (( DEBUG_ERROR, "%a: Failed to parse FDT memory node\n", - __FUNCTION__ + __func__ )); } } @@ -186,7 +186,7 @@ ArmVirtGetMemoryMap ( ); =20 if (VirtualMemoryTable =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __FUNCTION_= _)); + DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __func__)); return; } =20 @@ -205,7 +205,7 @@ ArmVirtGetMemoryMap ( "\tPhysicalBase: 0x%lX\n" "\tVirtualBase: 0x%lX\n" "\tLength: 0x%lX\n", - __FUNCTION__, + __func__, MemNodeIndex, VirtualMemoryTable[Index].PhysicalBase, VirtualMemoryTable[Index].VirtualBase, diff --git a/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientL= ib.c b/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c index 89eee757d141..e8d3576a71cf 100644 --- a/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c +++ b/ArmVirtPkg/Library/KvmtoolRtcFdtClientLib/KvmtoolRtcFdtClientLib.c @@ -147,7 +147,7 @@ KvmtoolRtcFdtClientLibConstructor ( DEBUG (( DEBUG_ERROR, "%a: No 'motorola,mc146818' compatible DT node found\n", - __FUNCTION__ + __func__ )); return Status; } @@ -163,7 +163,7 @@ KvmtoolRtcFdtClientLibConstructor ( DEBUG (( DEBUG_ERROR, "%a: No 'reg' property found in 'motorola,mc146818' compatible DT no= de\n", - __FUNCTION__ + __func__ )); return Status; } diff --git a/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib= .c b/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c index 29122856b6e8..79412897f225 100644 --- a/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c +++ b/ArmVirtPkg/Library/KvmtoolVirtMemInfoLib/KvmtoolVirtMemInfoLib.c @@ -54,7 +54,7 @@ ArmVirtGetMemoryMap ( DEBUG (( DEBUG_ERROR, "%a: Error: Failed to Allocate Pages\n", - __FUNCTION__ + __func__ )); return; } diff --git a/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c b/ArmV= irtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c index 129c16b7110c..43f5858644b1 100644 --- a/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c +++ b/ArmVirtPkg/Library/NorFlashKvmtoolLib/NorFlashKvmtool.c @@ -265,7 +265,7 @@ NorFlashPlatformLibConstructor ( DEBUG (( DEBUG_ERROR, "%a: GetNodeProperty ('label') failed (Status =3D=3D %r)\n", - __FUNCTION__, + __func__, Status )); } else if (AsciiStrCmp (Label, LABEL_UEFI_VAR_STORE) =3D=3D 0) { @@ -284,7 +284,7 @@ NorFlashPlatformLibConstructor ( DEBUG (( DEBUG_ERROR, "%a: GetNodeProperty () failed (Status =3D=3D %r)\n", - __FUNCTION__, + __func__, Status )); continue; diff --git a/ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c b/ArmVirt= Pkg/Library/NorFlashQemuLib/NorFlashQemuLib.c index 55bce88bc8dd..d0fa7e5046c9 100644 --- a/ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c +++ b/ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c @@ -75,7 +75,7 @@ VirtNorFlashPlatformGetDevices ( DEBUG (( DEBUG_ERROR, "%a: GetNodeProperty () failed (Status =3D=3D %r)\n", - __FUNCTION__, + __func__, Status )); continue; diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmVi= rtPkg/Library/PlatformBootManagerLib/PlatformBm.c index 3ad1ecd9d286..10c815378cd5 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -190,7 +190,7 @@ FilterAndProcess ( DEBUG (( DEBUG_VERBOSE, "%a: %g: %r\n", - __FUNCTION__, + __func__, ProtocolGuid, Status )); @@ -261,7 +261,7 @@ IsPciDisplay ( &Pci ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __FUNCTION__, ReportText, Status)= ); + DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __func__, ReportText, Status)); return FALSE; } =20 @@ -410,7 +410,7 @@ IsVirtioPciRng ( return FALSE; =20 PciError: - DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __FUNCTION__, ReportText, Status)); + DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __func__, ReportText, Status)); return FALSE; } =20 @@ -437,7 +437,7 @@ Connect ( DEBUG (( EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: %s: %r\n", - __FUNCTION__, + __func__, ReportText, Status )); @@ -463,7 +463,7 @@ AddOutput ( DEBUG (( DEBUG_ERROR, "%a: %s: handle %p: device path not found\n", - __FUNCTION__, + __func__, ReportText, Handle )); @@ -475,7 +475,7 @@ AddOutput ( DEBUG (( DEBUG_ERROR, "%a: %s: adding to ConOut: %r\n", - __FUNCTION__, + __func__, ReportText, Status )); @@ -487,7 +487,7 @@ AddOutput ( DEBUG (( DEBUG_ERROR, "%a: %s: adding to ErrOut: %r\n", - __FUNCTION__, + __func__, ReportText, Status )); @@ -497,7 +497,7 @@ AddOutput ( DEBUG (( DEBUG_VERBOSE, "%a: %s: added to ConOut and ErrOut\n", - __FUNCTION__, + __func__, ReportText )); } @@ -698,7 +698,7 @@ RemoveStaleFvFileOptions ( DEBUG (( EFI_ERROR (Status) ? DEBUG_WARN : DEBUG_VERBOSE, "%a: removing stale Boot#%04x %s: %r\n", - __FUNCTION__, + __func__, (UINT32)BootOptions[Index].OptionNumber, DevicePathString =3D=3D NULL ? L"" : DevicePathString, Status @@ -878,7 +878,7 @@ PlatformBootManagerBeforeConsole ( DEBUG (( EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: SetVariable(%s, %u): %r\n", - __FUNCTION__, + __func__, EFI_TIME_OUT_VARIABLE_NAME, FrontPageTimeout, Status diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c b/ArmVi= rtPkg/Library/PlatformBootManagerLib/QemuKernel.c index c66b7c7b21fc..7dc59ae14d90 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/QemuKernel.c @@ -66,7 +66,7 @@ TryRunningQemuKernel ( DEBUG (( DEBUG_ERROR, "%a: QemuStartKernelImage(): %r\n", - __FUNCTION__, + __func__, Status )); } diff --git a/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c b/ArmVirtPk= g/Library/PlatformPeiLib/PlatformPeiLib.c index bb71fee64920..8d9dcf504dc6 100644 --- a/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c +++ b/ArmVirtPkg/Library/PlatformPeiLib/PlatformPeiLib.c @@ -111,7 +111,7 @@ PlatformPeim ( =20 UartBase =3D fdt64_to_cpu (ReadUnaligned64 (RegProp)); =20 - DEBUG ((DEBUG_INFO, "%a: PL011 UART @ 0x%lx\n", __FUNCTION__, Uart= Base)); + DEBUG ((DEBUG_INFO, "%a: PL011 UART @ 0x%lx\n", __func__, UartBase= )); =20 *UartHobData =3D UartBase; break; @@ -148,7 +148,7 @@ PlatformPeim ( DEBUG (( DEBUG_WARN, "%a: 'ranges' property has unexpected size %d\n", - __FUNCTION__, + __func__, RangesLen )); break; @@ -175,7 +175,7 @@ PlatformPeim ( =20 if (FeaturePcdGet (PcdTpm2SupportEnabled)) { if (TpmBase !=3D 0) { - DEBUG ((DEBUG_INFO, "%a: TPM @ 0x%lx\n", __FUNCTION__, TpmBase)); + DEBUG ((DEBUG_INFO, "%a: TPM @ 0x%lx\n", __func__, TpmBase)); =20 Status =3D (EFI_STATUS)PcdSet64S (PcdTpmBaseAddress, TpmBase); ASSERT_EFI_ERROR (Status); diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c b/A= rmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c index 9cf43f06c073..23bd0fe68ef7 100644 --- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c +++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoLib.c @@ -83,7 +83,7 @@ ArmVirtGetMemoryMap ( ); =20 if (VirtualMemoryTable =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __FUNCTION_= _)); + DEBUG ((DEBUG_ERROR, "%a: Error: Failed AllocatePool()\n", __func__)); return; } =20 @@ -99,7 +99,7 @@ ArmVirtGetMemoryMap ( "\tPhysicalBase: 0x%lX\n" "\tVirtualBase: 0x%lX\n" "\tLength: 0x%lX\n", - __FUNCTION__, + __func__, VirtualMemoryTable[0].PhysicalBase, VirtualMemoryTable[0].VirtualBase, VirtualMemoryTable[0].Length diff --git a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLibCon= structor.c b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLibCon= structor.c index c47ab8296622..1bcc2e26aa60 100644 --- a/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLibConstructo= r.c +++ b/ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLibConstructo= r.c @@ -64,7 +64,7 @@ QemuVirtMemInfoPeiLibConstructor ( DEBUG (( DEBUG_INFO, "%a: System RAM @ 0x%lx - 0x%lx\n", - __FUNCTION__, + __func__, CurBase, CurBase + CurSize - 1 )); @@ -77,7 +77,7 @@ QemuVirtMemInfoPeiLibConstructor ( DEBUG (( DEBUG_ERROR, "%a: Failed to parse FDT memory node\n", - __FUNCTION__ + __func__ )); } } diff --git a/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.c b/ArmVirtPk= g/XenAcpiPlatformDxe/XenAcpiPlatformDxe.c index 96bc442f6912..32c8b1e94ed2 100644 --- a/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.c +++ b/ArmVirtPkg/XenAcpiPlatformDxe/XenAcpiPlatformDxe.c @@ -68,7 +68,7 @@ GetXenArmAcpiRsdp ( DEBUG (( DEBUG_WARN, "%a: No 'xen,guest-acpi' compatible DT node found\n", - __FUNCTION__ + __func__ )); return EFI_NOT_FOUND; } @@ -140,7 +140,7 @@ InstallXenArmTables ( // Status =3D GetXenArmAcpiRsdp (&XenAcpiRsdpStructurePtr); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a: No RSDP table found\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: No RSDP table found\n", __func__)); return Status; } =20 diff --git a/ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.c b/ArmVirtPkg/XenioFdtDxe/= XenioFdtDxe.c index 23d504cc64da..f626c455c411 100644 --- a/ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.c +++ b/ArmVirtPkg/XenioFdtDxe/XenioFdtDxe.c @@ -49,7 +49,7 @@ InitializeXenioFdtDxe ( DEBUG (( DEBUG_WARN, "%a: No 'xen,xen' compatible DT node found\n", - __FUNCTION__ + __func__ )); return EFI_UNSUPPORTED; } @@ -70,7 +70,7 @@ InitializeXenioFdtDxe ( DEBUG_ERROR, "%a: XenIoMmioInstall () failed on a new handle " "(Status =3D=3D %r)\n", - __FUNCTION__, + __func__, Status )); return Status; --=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 (#102632): https://edk2.groups.io/g/devel/message/102632 Mute This Topic: https://groups.io/mt/98115220/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- From nobody Wed May 15 21:28:32 2024 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+102633+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+102633+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819829; cv=none; d=zohomail.com; s=zohoarc; b=jHtZudmhKMKLX4t7gbN3HWIAC46WTE+B4SwLUxJGyWH96vBMe/EGbVjK90vqlT/Patl6PaV+ifRqn6RVarhNzNu21l5pjexXo4wAhMwYOz0g4hVG354YPWaaI5mv9AvwKRWTIhh0HSaudluuxJVvfrYs3UfWl+gILwJ7LViQrCg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819829; 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=UkLNov3Q9X4VCfUNojzadOfJaty0SsPE+y6Na838cUU=; b=b0t/J5segeOyANjrAI+16kT1TJkaaWm4qEQKHyQt2QccPuu8Y3po4zQ/6LHxkWqAGbmKy+kpgUDqbcxvHMpl4U9FpCsmiIi99bal1yfjA6ZtzK6VSujSBXWVV+G5WqfAdaGmcudQxVEXy60OqtLNUG0j97ulR7KLMoYZxA49eWY= 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+102633+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819829121102.64012670309137; Thu, 6 Apr 2023 15:23:49 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ENrvYY1788612x3pk2KND7VM; Thu, 06 Apr 2023 15:23:48 -0700 X-Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.171737.1680819828116373664 for ; Thu, 06 Apr 2023 15:23:48 -0700 X-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 74E7D5C01A7; Thu, 6 Apr 2023 18:23:47 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 06 Apr 2023 18:23:47 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:23:44 -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 03/18] UefiCpuPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:04 -0600 Message-Id: <20230406222319.2281263-4-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: Qc4YEdWJzeBQD7xDOFiI6Rz9x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819828; bh=wCWYOfyzOm3qC2NrHP1+l6eVMSWA3H1Snam4o1Ka4GY=; h=Cc:Date:From:Reply-To:Subject:To; b=ZDnsVeSu8Qu6/HYWtyMGVCySXjhsdGesElxYlAmynHOHX+VOdmPnzYFGkDPSVlDR9Px CVxRbEhtLpvrmKjW0kewqCCuY+vAi/ti5ehQMdfvRqJn5Mc06mk9oANPLb9ka3ZLD+jUG gJe8nfwdxRO5rMg8QaVt9NuwKr2Ng3CuA1E= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819829718100001 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 UefiCpuPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel Reviewed-by: Ray Ni Reviewed-by: Sunil V L --- UefiCpuPkg/CpuDxe/CpuDxe.c = | 8 ++++---- UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c = | 6 +++--- UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c = | 2 +- UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/CpuExceptionHandlerLi= b.c | 2 +- UefiCpuPkg/Library/CpuExceptionHandlerLib/UnitTest/CpuExceptionHandlerTest= Common.c | 2 +- UefiCpuPkg/Library/MpInitLib/DxeMpLib.c = | 2 +- UefiCpuPkg/Library/MpInitLib/Microcode.c = | 8 ++++---- UefiCpuPkg/Library/MpInitLib/MpLib.c = | 2 +- UefiCpuPkg/Library/MpInitLib/PeiMpLib.c = | 2 +- UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c = | 2 +- UefiCpuPkg/SecCore/SecMain.c = | 10 +++++----- UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTestCom= mom.c | 16 ++++++++-------- UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c = | 2 +- 13 files changed, 32 insertions(+), 32 deletions(-) diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c index 3febd59d99e0..804ef5d1fe8e 100644 --- a/UefiCpuPkg/CpuDxe/CpuDxe.c +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c @@ -1078,7 +1078,7 @@ IntersectMemoryDescriptor ( EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: %a: add [%Lx, %Lx): %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, IntersectionBase, IntersectionEnd, Status @@ -1091,7 +1091,7 @@ IntersectMemoryDescriptor ( "%a: %a: desc [%Lx, %Lx) type %u cap %Lx conflicts " "with aperture [%Lx, %Lx) cap %Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Descriptor->BaseAddress, Descriptor->BaseAddress + Descriptor->Length, (UINT32)Descriptor->GcdMemoryType, @@ -1132,7 +1132,7 @@ AddMemoryMappedIoSpace ( DEBUG_ERROR, "%a: %a: GetMemorySpaceMap(): %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return Status; @@ -1215,7 +1215,7 @@ AddLocalApicMemorySpace ( DEBUG_INFO, "%a: %a: AllocateMemorySpace() Status - %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); } diff --git a/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c b/UefiCpuPkg/CpuDxeRiscV64/C= puDxe.c index 7551e0653603..25fe3f54c325 100644 --- a/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c +++ b/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c @@ -296,7 +296,7 @@ CpuSetMemoryAttributes ( IN UINT64 Attributes ) { - DEBUG ((DEBUG_INFO, "%a: Set memory attributes not supported yet\n", __F= UNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Set memory attributes not supported yet\n", __f= unc__)); return EFI_SUCCESS; } =20 @@ -328,10 +328,10 @@ InitializeCpu ( return EFI_NOT_FOUND; } =20 - DEBUG ((DEBUG_INFO, " %a: Firmware Context is at 0x%x.\n", __FUNCTION__,= FirmwareContext)); + DEBUG ((DEBUG_INFO, " %a: Firmware Context is at 0x%x.\n", __func__, Fir= mwareContext)); =20 mBootHartId =3D FirmwareContext->BootHartId; - DEBUG ((DEBUG_INFO, " %a: mBootHartId =3D 0x%x.\n", __FUNCTION__, mBootH= artId)); + DEBUG ((DEBUG_INFO, " %a: mBootHartId =3D 0x%x.\n", __func__, mBootHartI= d)); =20 InitializeCpuExceptionHandlers (NULL); =20 diff --git a/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c b/UefiCpuPkg/CpuS3DataDxe/= CpuS3Data.c index 59a5d932eee2..86ce5303cab4 100644 --- a/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c +++ b/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c @@ -127,7 +127,7 @@ CpuS3DataOnEndOfDxe ( ); ASSERT_EFI_ERROR (Status); =20 - DEBUG ((DEBUG_VERBOSE, "%a\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a\n", __func__)); MtrrGetAllMtrrs (&AcpiCpuDataEx->MtrrTable); =20 // diff --git a/UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/CpuExcept= ionHandlerLib.c b/UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/CpuE= xceptionHandlerLib.c index bce089feb0da..73a9dd57658c 100644 --- a/UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/CpuExceptionHand= lerLib.c +++ b/UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/CpuExceptionHand= lerLib.c @@ -230,7 +230,7 @@ RegisterCpuInterruptHandler ( IN EFI_CPU_INTERRUPT_HANDLER InterruptHandler ) { - DEBUG ((DEBUG_INFO, "%a: Type:%x Handler: %x\n", __FUNCTION__, Exception= Type, InterruptHandler)); + DEBUG ((DEBUG_INFO, "%a: Type:%x Handler: %x\n", __func__, ExceptionType= , InterruptHandler)); if (EXCEPT_RISCV_IS_IRQ (ExceptionType)) { if (EXCEPT_RISCV_IRQ_INDEX (ExceptionType) > EXCEPT_RISCV_MAX_IRQS) { return EFI_UNSUPPORTED; diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/UnitTest/CpuExceptio= nHandlerTestCommon.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/UnitTest/C= puExceptionHandlerTestCommon.c index 17afb592d3c8..9ba70c5b7340 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/UnitTest/CpuExceptionHandle= rTestCommon.c +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/UnitTest/CpuExceptionHandle= rTestCommon.c @@ -292,7 +292,7 @@ GetBspStackBase ( DEBUG (( DEBUG_INFO, "%a: Bsp StackBase =3D 0x%016lx StackSize =3D 0x%016lx\n", - __FUNCTION__, + __func__, MemoryHob->AllocDescriptor.MemoryBaseAddress, MemoryHob->AllocDescriptor.MemoryLength )); diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c b/UefiCpuPkg/Library/M= pInitLib/DxeMpLib.c index 330676b700d1..57ddb86600a7 100644 --- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c @@ -463,7 +463,7 @@ MpInitChangeApLoopCallback ( ); } =20 - DEBUG ((DEBUG_INFO, "%a() done!\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() done!\n", __func__)); } =20 /** diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c b/UefiCpuPkg/Library/= MpInitLib/Microcode.c index f9f070fa8bf2..11720560afee 100644 --- a/UefiCpuPkg/Library/MpInitLib/Microcode.c +++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c @@ -170,7 +170,7 @@ ShadowMicrocodePatchWorker ( DEBUG (( DEBUG_INFO, "%a: Required microcode patches have been loaded at 0x%lx, with size 0= x%lx.\n", - __FUNCTION__, + __func__, CpuMpData->MicrocodePatchAddress, CpuMpData->MicrocodePatchRegionSize )); @@ -305,7 +305,7 @@ ShadowMicrocodePatchByPcd ( DEBUG (( DEBUG_INFO, "%a: 0x%x microcode patches will be loaded into memory, with size 0x= %x.\n", - __FUNCTION__, + __func__, PatchCount, TotalLoadSize )); @@ -365,7 +365,7 @@ GetMicrocodePatchInfoFromHob ( =20 GuidHob =3D GetFirstGuidHob (&gEdkiiMicrocodePatchHobGuid); if (GuidHob =3D=3D NULL) { - DEBUG ((DEBUG_INFO, "%a: Microcode patch cache HOB is not found.\n", _= _FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Microcode patch cache HOB is not found.\n", _= _func__)); return FALSE; } =20 @@ -377,7 +377,7 @@ GetMicrocodePatchInfoFromHob ( DEBUG (( DEBUG_INFO, "%a: MicrocodeBase =3D 0x%lx, MicrocodeSize =3D 0x%lx\n", - __FUNCTION__, + __func__, *Address, *RegionSize )); diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpIn= itLib/MpLib.c index e5dc852ed95f..f1f284071441 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -1537,7 +1537,7 @@ TimedWaitForApFinish ( DEBUG (( DEBUG_VERBOSE, "%a: reached FinishedApLimit=3D%u in %Lu microseconds\n", - __FUNCTION__, + __func__, FinishedApLimit, DivU64x64Remainder ( MultU64x32 (CpuMpData->TotalTime, 1000000), diff --git a/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c b/UefiCpuPkg/Library/M= pInitLib/PeiMpLib.c index e732371ddd21..013f89b197d0 100644 --- a/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c @@ -758,7 +758,7 @@ PlatformShadowMicrocode ( DEBUG (( DEBUG_INFO, "%a: Required microcode patches have been loaded at 0x%lx, with size 0= x%lx.\n", - __FUNCTION__, + __func__, CpuMpData->MicrocodePatchAddress, CpuMpData->MicrocodePatchRegionSize )); diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c b/UefiCpuPkg/PiSmmCpuDxeSmm/= CpuS3.c index 240eee6a7d2f..0f7ee0372dbd 100644 --- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c @@ -932,7 +932,7 @@ InitSmmS3ResumeState ( DEBUG (( DEBUG_ERROR, "ERROR:%a(): HOB(gEfiAcpiVariableGuid=3D%g) needed by S3 resume does= n't exist!\n", - __FUNCTION__, + __func__, &gEfiAcpiVariableGuid )); CpuDeadLoop (); diff --git a/UefiCpuPkg/SecCore/SecMain.c b/UefiCpuPkg/SecCore/SecMain.c index fe03d8019a40..95375850ec76 100644 --- a/UefiCpuPkg/SecCore/SecMain.c +++ b/UefiCpuPkg/SecCore/SecMain.c @@ -170,7 +170,7 @@ SecStartup ( DEBUG (( DEBUG_INFO, "%a() TempRAM Base: 0x%x, TempRAM Size: 0x%x, BootFirmwareVolume 0x%x\= n", - __FUNCTION__, + __func__, TempRamBase, SizeOfRam, BootFirmwareVolume @@ -242,7 +242,7 @@ SecStartup ( DEBUG (( DEBUG_INFO, "%a() BFV Base: 0x%x, BFV Size: 0x%x, TempRAM Base: 0x%x, TempRAM Size= : 0x%x, PeiTempRamBase: 0x%x, PeiTempRamSize: 0x%x, StackBase: 0x%x, StackS= ize: 0x%x\n", - __FUNCTION__, + __func__, SecCoreData.BootFirmwareVolumeBase, SecCoreData.BootFirmwareVolumeSize, SecCoreData.TemporaryRamBase, @@ -345,7 +345,7 @@ SecStartupPhase2 ( DEBUG (( DEBUG_INFO, "%a() PeiCoreEntryPoint: 0x%x\n", - __FUNCTION__, + __func__, PeiCoreEntryPoint )); =20 @@ -394,7 +394,7 @@ SecStartupPhase2 ( DEBUG (( DEBUG_INFO, "%a() PeiTemporaryRamBase: 0x%x, PeiTemporaryRamSize: 0x%x\n", - __FUNCTION__, + __func__, SecCoreData->PeiTemporaryRamBase, SecCoreData->PeiTemporaryRamSize )); @@ -408,7 +408,7 @@ SecStartupPhase2 ( DEBUG (( DEBUG_INFO, "%a() Stack Base: 0x%p, Stack Size: 0x%x\n", - __FUNCTION__, + __func__, SecCoreData->StackBase, (UINT32)SecCoreData->StackSize )); diff --git a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpService= sUnitTestCommom.c b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMp= ServicesUnitTestCommom.c index ff79c5e8d43b..7cd3f48d761f 100644 --- a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTe= stCommom.c +++ b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTe= stCommom.c @@ -45,7 +45,7 @@ InitUTContext ( =20 Status =3D MpServicesUnitTestWhoAmI (LocalContext->MpServices, &BspNumbe= r); UT_ASSERT_NOT_EFI_ERROR (Status); - DEBUG ((DEBUG_INFO, "%a: BspNumber =3D 0x%x\n", __FUNCTION__, BspNumber)= ); + DEBUG ((DEBUG_INFO, "%a: BspNumber =3D 0x%x\n", __func__, BspNumber)); =20 Status =3D MpServicesUnitTestGetNumberOfProcessors ( LocalContext->MpServices, @@ -56,7 +56,7 @@ InitUTContext ( DEBUG (( DEBUG_INFO, "%a: NumberOfProcessors =3D 0x%x, NumberOfEnabledProcessors =3D 0x%x\n= ", - __FUNCTION__, + __func__, NumberOfProcessors, NumberOfEnabledProcessors )); @@ -89,7 +89,7 @@ InitUTContext ( LocalContext->DisabledApNumber[IndexOfDisabledAPs] =3D ProcessorNu= mber; IndexOfDisabledAPs++; =20 - DEBUG ((DEBUG_INFO, "%a: AP(0x%x) is disabled and temporarily enab= le it.\n", __FUNCTION__, ProcessorNumber)); + DEBUG ((DEBUG_INFO, "%a: AP(0x%x) is disabled and temporarily enab= le it.\n", __func__, ProcessorNumber)); Status =3D MpServicesUnitTestEnableDisableAP ( LocalContext->MpServices, ProcessorNumber, @@ -134,7 +134,7 @@ CheckUTContext ( =20 if (BspNumber !=3D LocalContext->BspNumber) { LocalContext->BspNumber =3D BspNumber; - DEBUG ((DEBUG_INFO, "%a: New BspNumber =3D 0x%x\n", __FUNCTION__, BspN= umber)); + DEBUG ((DEBUG_INFO, "%a: New BspNumber =3D 0x%x\n", __func__, BspNumbe= r)); } =20 ASSERT (BspNumber =3D=3D LocalContext->BspNumber); @@ -148,11 +148,11 @@ CheckUTContext ( =20 if (NumberOfProcessors !=3D LocalContext->NumberOfProcessors) { LocalContext->NumberOfProcessors =3D NumberOfProcessors; - DEBUG ((DEBUG_INFO, "%a: New NumberOfProcessors =3D 0x%x\n", __FUNCTIO= N__, NumberOfProcessors)); + DEBUG ((DEBUG_INFO, "%a: New NumberOfProcessors =3D 0x%x\n", __func__,= NumberOfProcessors)); } =20 if (NumberOfEnabledProcessors !=3D LocalContext->NumberOfProcessors) { - DEBUG ((DEBUG_INFO, "%a: New NumberOfEnabledProcessors =3D 0x%x\n", __= FUNCTION__, NumberOfEnabledProcessors)); + DEBUG ((DEBUG_INFO, "%a: New NumberOfEnabledProcessors =3D 0x%x\n", __= func__, NumberOfEnabledProcessors)); =20 for (ProcessorNumber =3D 0; ProcessorNumber < LocalContext->NumberOfPr= ocessors; ProcessorNumber++) { Status =3D MpServicesUnitTestGetProcessorInfo ( @@ -163,7 +163,7 @@ CheckUTContext ( ASSERT_EFI_ERROR (Status); =20 if (!(ProcessorInfoBuffer.StatusFlag & PROCESSOR_ENABLED_BIT)) { - DEBUG ((DEBUG_INFO, "%a: AP(0x%x) is disabled unexpectedly and ree= nable it.\n", __FUNCTION__, ProcessorNumber)); + DEBUG ((DEBUG_INFO, "%a: AP(0x%x) is disabled unexpectedly and ree= nable it.\n", __func__, ProcessorNumber)); Status =3D MpServicesUnitTestEnableDisableAP ( LocalContext->MpServices, ProcessorNumber, @@ -204,7 +204,7 @@ FreeUTContext ( DEBUG (( DEBUG_INFO, "%a: Disable AP(0x%x) to restore its state.\n", - __FUNCTION__, + __func__, LocalContext->DisabledApNumber[IndexOfDisabledAPs] )); =20 diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c b/UefiCpuPkg= /Universal/Acpi/S3Resume2Pei/S3Resume.c index e82f179569e9..9ea5f6f4e5e5 100644 --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c @@ -509,7 +509,7 @@ S3ResumeBootOs ( DEBUG (( DEBUG_INFO, "%a() Stack Base: 0x%x, Stack Size: 0x%x\n", - __FUNCTION__, + __func__, TempStackTop, sizeof (TempStack) )); --=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 (#102633): https://edk2.groups.io/g/devel/message/102633 Mute This Topic: https://groups.io/mt/98115226/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- From nobody Wed May 15 21:28:32 2024 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+102634+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+102634+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819833; cv=none; d=zohomail.com; s=zohoarc; b=WIQ7jnB37EvfKw83IkhkN4HL2AEtv5imfUmffBuZEPZRPO/eGhBVNMlfhBr4P3/egy5HxQgTy4HUTuav+CEaehfCEqYPcAclUjj2Cv1X8b/ZyaSF88nl3WItHGuhbjVD8u5hMee8TLKJMYMBuma7aCNGkum7ZvJ9EKaBTlbuOAI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819833; 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=OutZukh+L1FiE0+ReP/V/+888374xW0BXHNAig82HO0=; b=dMcbDje9pkekwW77muiX6jpxYkfDl/fh0eNUS46udzHNPxYongGJ7BIV5U7q0ElVHx8tO/ysicZzkK7mvKcHfqiKQIir8XmDSdte6N2RR4ySJB5urahnXmDvDs66yjw773yp6a+szi6y/JcAmcEVgTUe9ppk9L/3iU9tiifM+hg= 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+102634+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819833444824.8467701363676; Thu, 6 Apr 2023 15:23:53 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id YV9DYY1788612xPTU97Nh20t; Thu, 06 Apr 2023 15:23:53 -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.171988.1680819831944229070 for ; Thu, 06 Apr 2023 15:23:52 -0700 X-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 4953A5C01E2; Thu, 6 Apr 2023 18:23:51 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 06 Apr 2023 18:23:51 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:23:47 -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 04/18] OvmfPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:05 -0600 Message-Id: <20230406222319.2281263-5-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: 9VFl7ROS1Eg6oxDrsBLRMvEux1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819833; bh=vnBIoeP5GK2m14px83lg2ZkqI1+RwCYmzs1t/b2Y+Do=; h=Cc:Date:From:Reply-To:Subject:To; b=eJrEU5bc9R9xLwTJqFe/ONekA57YtAyE582jpRxsX5Q4MtrDFi9WuMPC12KQNa84zuv YHPrCc59pJY+ma/Te0LeMz9sWtAKT+7Ma1/RVOqlf8zQhaof4eIHO2Oj9neva9fonNkFC 1D6rCQJ/Q4eiSRSoCFTb0CAi9fOFtDogpvQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819835340100003 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 OvmfPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel Reviewed-by: Sunil V L --- OvmfPkg/AcpiPlatformDxe/BootScript.c | = 4 +- OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | = 4 +- OvmfPkg/AcpiPlatformDxe/EntryPoint.c | = 8 +-- OvmfPkg/AcpiPlatformDxe/PciDecoding.c | = 10 +-- OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c | = 64 ++++++++++---------- OvmfPkg/AmdSev/BlobVerifierLibSevHashes/BlobVerifierSevHashes.c | = 18 +++--- OvmfPkg/AmdSevDxe/AmdSevDxe.c | = 2 +- OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c | = 8 +-- OvmfPkg/Bhyve/AcpiPlatformDxe/PciDecoding.c | = 10 +-- OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.c | = 6 +- OvmfPkg/Bhyve/PlatformPei/ClearCache.c | = 6 +- OvmfPkg/Bhyve/PlatformPei/MemDetect.c | = 12 ++-- OvmfPkg/Bhyve/PlatformPei/Platform.c | = 10 +-- OvmfPkg/CpuHotplugSmm/CpuHotplug.c | = 40 ++++++------ OvmfPkg/CpuHotplugSmm/QemuCpuhp.c | = 32 +++++----- OvmfPkg/CpuHotplugSmm/Smbase.c | = 10 +-- OvmfPkg/CpuS3DataDxe/CpuS3Data.c | = 2 +- OvmfPkg/Csm/CsmSupportLib/LegacyInterrupt.c | = 2 +- OvmfPkg/Csm/CsmSupportLib/LegacyRegion.c | = 2 +- OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c | = 2 +- OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c | = 28 ++++----- OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c | = 4 +- OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c | = 10 +-- OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.c | = 10 +-- OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c | = 2 +- OvmfPkg/IoMmuDxe/CcIoMmu.c | = 18 +++--- OvmfPkg/IoMmuDxe/IoMmuBuffer.c | = 8 +-- OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c | = 2 +- OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c | = 4 +- OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c | = 2 +- OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeVirtualMemory.c | = 22 +++---- OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c | = 4 +- OvmfPkg/Library/BaseMemEncryptTdxLib/MemoryEncryption.c | = 26 ++++---- OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c | = 4 +- OvmfPkg/Library/CcExitLib/CcExitVeHandler.c | = 18 +++--- OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c | = 6 +- OvmfPkg/Library/HardwareInfoLib/HardwareInfoDxe.c | = 2 +- OvmfPkg/Library/LockBoxLib/LockBoxLib.c | = 10 +-- OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.c | = 22 +++---- OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c | = 2 +- OvmfPkg/Library/PlatformBmPrintScLib/StatusCodeHandler.c | = 12 ++-- OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | = 12 ++-- OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c | = 2 +- OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c | = 10 +-- OvmfPkg/Library/PlatformBootManagerLibGrub/BdsPlatform.c | = 10 +-- OvmfPkg/Library/PlatformBootManagerLibGrub/QemuKernel.c | = 2 +- OvmfPkg/Library/PlatformInitLib/MemDetect.c | = 28 ++++----- OvmfPkg/Library/PlatformInitLib/Platform.c | = 20 +++--- OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c | = 2 +- OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c | = 42 ++++++------- OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c | = 18 +++--- OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c | = 2 +- OvmfPkg/Library/QemuFwCfgS3Lib/QemuFwCfgS3Dxe.c | = 34 +++++------ OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c | = 8 +-- OvmfPkg/Library/ResetSystemLib/ResetSystemLibMicrovm.c | = 8 +-- OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.c | = 4 +- OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.c | = 4 +- OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c | = 4 +- OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.c | = 24 ++++---- OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c | = 4 +- OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c | = 8 +-- OvmfPkg/Library/XenIoMmioLib/XenIoMmioLib.c | = 4 +- OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand.c | = 2 +- OvmfPkg/LsiScsiDxe/LsiScsi.c | = 4 +- OvmfPkg/MptScsiDxe/MptScsi.c | = 10 +-- OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c | = 6 +- OvmfPkg/PlatformDxe/Platform.c | = 14 ++--- OvmfPkg/PlatformPei/ClearCache.c | = 6 +- OvmfPkg/PlatformPei/FeatureControl.c | = 6 +- OvmfPkg/PlatformPei/MemDetect.c | = 12 ++-- OvmfPkg/PlatformPei/MemTypeInfo.c | = 10 +-- OvmfPkg/PlatformPei/Platform.c | = 18 +++--- OvmfPkg/PvScsiDxe/PvScsi.c | = 4 +- OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c | = 12 ++-- OvmfPkg/QemuRamfbDxe/QemuRamfb.c | = 2 +- OvmfPkg/QemuVideoDxe/Gop.c | = 2 +- OvmfPkg/QemuVideoDxe/Initialize.c | = 14 ++--- OvmfPkg/QemuVideoDxe/VbeShim.c | = 12 ++-- OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/PlatformBm.c | = 20 +++--- OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/QemuKernel.c | = 2 +- OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPointer.c | = 4 +- OvmfPkg/RiscVVirt/Sec/Memory.c | = 10 +-- OvmfPkg/RiscVVirt/Sec/Platform.c | = 12 ++-- OvmfPkg/RiscVVirt/Sec/SecMain.c | = 2 +- OvmfPkg/Sec/SecMain.c | = 2 +- OvmfPkg/SmmAccess/SmmAccessPei.c | = 6 +- OvmfPkg/SmmControl2Dxe/SmiFeatures.c | = 22 +++---- OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c | = 18 +++--- OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | = 8 +-- OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPeim.c | = 6 +- OvmfPkg/TdxDxe/TdxAcpiTable.c | = 2 +- OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c | = 4 +- OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c | = 22 +++---- OvmfPkg/VirtioBlkDxe/VirtioBlk.c | = 8 +-- OvmfPkg/VirtioFsDxe/FuseFlush.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseFsync.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseGetAttr.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseInit.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseLookup.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseMkDir.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseOpen.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseOpenDir.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseOpenOrCreate.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseRead.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseRelease.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseRename.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseSetAttr.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseStatFs.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseUnlink.c | = 2 +- OvmfPkg/VirtioFsDxe/FuseWrite.c | = 2 +- OvmfPkg/VirtioFsDxe/Helpers.c | = 2 +- OvmfPkg/VirtioFsDxe/SimpleFsOpen.c | = 4 +- OvmfPkg/VirtioGpuDxe/Commands.c | = 6 +- OvmfPkg/VirtioGpuDxe/DriverBinding.c | = 8 +-- OvmfPkg/VirtioGpuDxe/Gop.c | = 2 +- OvmfPkg/VirtioNetDxe/Events.c | = 2 +- OvmfPkg/VirtioRngDxe/VirtioRng.c | = 2 +- OvmfPkg/VirtioScsiDxe/VirtioScsi.c | = 2 +- OvmfPkg/XenAcpiPlatformDxe/Xen.c | = 2 +- OvmfPkg/XenPlatformPei/ClearCache.c | = 6 +- OvmfPkg/XenPlatformPei/MemDetect.c | = 6 +- OvmfPkg/XenPlatformPei/Platform.c | = 2 +- OvmfPkg/XenPvBlkDxe/BlockFront.c | = 4 +- 123 files changed, 540 insertions(+), 540 deletions(-) diff --git a/OvmfPkg/AcpiPlatformDxe/BootScript.c b/OvmfPkg/AcpiPlatformDxe= /BootScript.c index 08d0f41bda5c..ff1491de0d2d 100644 --- a/OvmfPkg/AcpiPlatformDxe/BootScript.c +++ b/OvmfPkg/AcpiPlatformDxe/BootScript.c @@ -175,7 +175,7 @@ SaveCondensedWritePointerToS3Context ( DEBUG (( DEBUG_VERBOSE, "%a: 0x%04x/[0x%08x+%d] :=3D 0x%Lx (%Lu)\n", - __FUNCTION__, + __func__, PointerItem, PointerOffset, PointerSize, @@ -225,7 +225,7 @@ AppendFwCfgBootScript ( } } =20 - DEBUG ((DEBUG_VERBOSE, "%a: boot script fragment saved\n", __FUNCTION__)= ); + DEBUG ((DEBUG_VERBOSE, "%a: boot script fragment saved\n", __func__)); =20 ReleaseS3Context (S3Context); return; diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDx= e/CloudHvAcpi.c index d56eb074a987..d3e73c155e8f 100644 --- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c @@ -69,7 +69,7 @@ InstallCloudHvTablesTdx ( // then we're out of sync with the hypervisor, and cannot continue. // if (DsdtTable =3D=3D NULL) { - DEBUG ((DEBUG_INFO, "%a: no DSDT found\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: no DSDT found\n", __func__)); ASSERT (FALSE); } =20 @@ -201,7 +201,7 @@ InstallCloudHvTables ( // then we're out of sync with the hypervisor, and cannot continue. // if (DsdtTable =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: no DSDT found\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: no DSDT found\n", __func__)); ASSERT (FALSE); CpuDeadLoop (); } diff --git a/OvmfPkg/AcpiPlatformDxe/EntryPoint.c b/OvmfPkg/AcpiPlatformDxe= /EntryPoint.c index 143e860fe187..17f1c4017f87 100644 --- a/OvmfPkg/AcpiPlatformDxe/EntryPoint.c +++ b/OvmfPkg/AcpiPlatformDxe/EntryPoint.c @@ -46,11 +46,11 @@ OnRootBridgesConnected ( DEBUG (( DEBUG_INFO, "%a: root bridges have been connected, installing ACPI tables\n", - __FUNCTION__ + __func__ )); Status =3D InstallAcpiTables (FindAcpiTableProtocol ()); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTables: %r\n", __FUNCTION__, Stat= us)); + DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTables: %r\n", __func__, Status)); } =20 gBS->CloseEvent (Event); @@ -76,7 +76,7 @@ AcpiPlatformEntryPoint ( DEBUG_INFO, "%a: PCI or its enumeration disabled, installing " "ACPI tables\n", - __FUNCTION__ + __func__ )); return InstallAcpiTables (FindAcpiTableProtocol ()); } @@ -99,7 +99,7 @@ AcpiPlatformEntryPoint ( DEBUG (( DEBUG_INFO, "%a: waiting for root bridges to be connected, registered callback\n= ", - __FUNCTION__ + __func__ )); } =20 diff --git a/OvmfPkg/AcpiPlatformDxe/PciDecoding.c b/OvmfPkg/AcpiPlatformDx= e/PciDecoding.c index c178f857a224..c7dbfb1baaea 100644 --- a/OvmfPkg/AcpiPlatformDxe/PciDecoding.c +++ b/OvmfPkg/AcpiPlatformDxe/PciDecoding.c @@ -78,7 +78,7 @@ EnablePciDecoding ( DEBUG (( DEBUG_WARN, "%a: LocateHandleBuffer(): %r\n", - __FUNCTION__, + __func__, Status )); return; @@ -89,7 +89,7 @@ EnablePciDecoding ( DEBUG (( DEBUG_WARN, "%a: AllocatePool(): out of resources\n", - __FUNCTION__ + __func__ )); goto FreeHandles; } @@ -122,7 +122,7 @@ EnablePciDecoding ( DEBUG (( DEBUG_WARN, "%a: EfiPciIoAttributeOperationGet: %r\n", - __FUNCTION__, + __func__, Status )); goto RestoreAttributes; @@ -141,7 +141,7 @@ EnablePciDecoding ( DEBUG (( DEBUG_WARN, "%a: EfiPciIoAttributeOperationSupported: %r\n", - __FUNCTION__, + __func__, Status )); goto RestoreAttributes; @@ -161,7 +161,7 @@ EnablePciDecoding ( DEBUG (( DEBUG_WARN, "%a: EfiPciIoAttributeOperationEnable: %r\n", - __FUNCTION__, + __func__, Status )); goto RestoreAttributes; diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatform= Dxe/QemuFwCfgAcpi.c index 68abc34f2280..a073b292b743 100644 --- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c +++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c @@ -238,7 +238,7 @@ CollectAllocationsRestrictedTo32Bit ( } =20 if (AddPointer->PointeeFile[QEMU_LOADER_FNAME_SIZE - 1] !=3D '\0') { - DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__)); Status =3D EFI_PROTOCOL_ERROR; goto RollBack; } @@ -253,7 +253,7 @@ CollectAllocationsRestrictedTo32Bit ( DEBUG (( DEBUG_VERBOSE, "%a: restricting blob \"%a\" from 64-bit allocation\n", - __FUNCTION__, + __func__, AddPointer->PointeeFile )); break; @@ -330,7 +330,7 @@ ProcessCmdAllocate ( BLOB *Blob; =20 if (Allocate->File[QEMU_LOADER_FNAME_SIZE - 1] !=3D '\0') { - DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__)); return EFI_PROTOCOL_ERROR; } =20 @@ -338,7 +338,7 @@ ProcessCmdAllocate ( DEBUG (( DEBUG_ERROR, "%a: unsupported alignment 0x%x\n", - __FUNCTION__, + __func__, Allocate->Alignment )); return EFI_UNSUPPORTED; @@ -349,7 +349,7 @@ ProcessCmdAllocate ( DEBUG (( DEBUG_ERROR, "%a: QemuFwCfgFindFile(\"%a\"): %r\n", - __FUNCTION__, + __func__, Allocate->File, Status )); @@ -392,7 +392,7 @@ ProcessCmdAllocate ( DEBUG (( DEBUG_ERROR, "%a: duplicated file \"%a\"\n", - __FUNCTION__, + __func__, Allocate->File )); Status =3D EFI_PROTOCOL_ERROR; @@ -410,7 +410,7 @@ ProcessCmdAllocate ( DEBUG_VERBOSE, "%a: File=3D\"%a\" Alignment=3D0x%x Zone=3D%d Size=3D0x%Lx " "Address=3D0x%Lx\n", - __FUNCTION__, + __func__, Allocate->File, Allocate->Alignment, Allocate->Zone, @@ -477,7 +477,7 @@ ProcessCmdAddPointer ( if ((AddPointer->PointerFile[QEMU_LOADER_FNAME_SIZE - 1] !=3D '\0') || (AddPointer->PointeeFile[QEMU_LOADER_FNAME_SIZE - 1] !=3D '\0')) { - DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__)); return EFI_PROTOCOL_ERROR; } =20 @@ -487,7 +487,7 @@ ProcessCmdAddPointer ( DEBUG (( DEBUG_ERROR, "%a: invalid blob reference(s) \"%a\" / \"%a\"\n", - __FUNCTION__, + __func__, AddPointer->PointerFile, AddPointer->PointeeFile )); @@ -504,7 +504,7 @@ ProcessCmdAddPointer ( DEBUG (( DEBUG_ERROR, "%a: invalid pointer location or size in \"%a\"\n", - __FUNCTION__, + __func__, AddPointer->PointerFile )); return EFI_PROTOCOL_ERROR; @@ -517,7 +517,7 @@ ProcessCmdAddPointer ( DEBUG (( DEBUG_ERROR, "%a: invalid pointer value in \"%a\"\n", - __FUNCTION__, + __func__, AddPointer->PointerFile )); return EFI_PROTOCOL_ERROR; @@ -537,7 +537,7 @@ ProcessCmdAddPointer ( DEBUG_ERROR, "%a: relocated pointer value unrepresentable in " "\"%a\"\n", - __FUNCTION__, + __func__, AddPointer->PointerFile )); return EFI_PROTOCOL_ERROR; @@ -549,7 +549,7 @@ ProcessCmdAddPointer ( DEBUG_VERBOSE, "%a: PointerFile=3D\"%a\" PointeeFile=3D\"%a\" " "PointerOffset=3D0x%x PointerSize=3D%d\n", - __FUNCTION__, + __func__, AddPointer->PointerFile, AddPointer->PointeeFile, AddPointer->PointerOffset, @@ -585,7 +585,7 @@ ProcessCmdAddChecksum ( BLOB *Blob; =20 if (AddChecksum->File[QEMU_LOADER_FNAME_SIZE - 1] !=3D '\0') { - DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__)); return EFI_PROTOCOL_ERROR; } =20 @@ -594,7 +594,7 @@ ProcessCmdAddChecksum ( DEBUG (( DEBUG_ERROR, "%a: invalid blob reference \"%a\"\n", - __FUNCTION__, + __func__, AddChecksum->File )); return EFI_PROTOCOL_ERROR; @@ -608,7 +608,7 @@ ProcessCmdAddChecksum ( DEBUG (( DEBUG_ERROR, "%a: invalid checksum range in \"%a\"\n", - __FUNCTION__, + __func__, AddChecksum->File )); return EFI_PROTOCOL_ERROR; @@ -622,7 +622,7 @@ ProcessCmdAddChecksum ( DEBUG_VERBOSE, "%a: File=3D\"%a\" ResultOffset=3D0x%x Start=3D0x%x " "Length=3D0x%x\n", - __FUNCTION__, + __func__, AddChecksum->File, AddChecksum->ResultOffset, AddChecksum->Start, @@ -680,7 +680,7 @@ ProcessCmdWritePointer ( if ((WritePointer->PointerFile[QEMU_LOADER_FNAME_SIZE - 1] !=3D '\0') || (WritePointer->PointeeFile[QEMU_LOADER_FNAME_SIZE - 1] !=3D '\0')) { - DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__)); return EFI_PROTOCOL_ERROR; } =20 @@ -694,7 +694,7 @@ ProcessCmdWritePointer ( DEBUG (( DEBUG_ERROR, "%a: invalid fw_cfg file or blob reference \"%a\" / \"%a\"\n", - __FUNCTION__, + __func__, WritePointer->PointerFile, WritePointer->PointeeFile )); @@ -710,7 +710,7 @@ ProcessCmdWritePointer ( DEBUG (( DEBUG_ERROR, "%a: invalid pointer location or size in \"%a\"\n", - __FUNCTION__, + __func__, WritePointer->PointerFile )); return EFI_PROTOCOL_ERROR; @@ -719,7 +719,7 @@ ProcessCmdWritePointer ( PointeeBlob =3D OrderedCollectionUserStruct (PointeeEntry); PointerValue =3D WritePointer->PointeeOffset; if (PointerValue >=3D PointeeBlob->Size) { - DEBUG ((DEBUG_ERROR, "%a: invalid PointeeOffset\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: invalid PointeeOffset\n", __func__)); return EFI_PROTOCOL_ERROR; } =20 @@ -736,7 +736,7 @@ ProcessCmdWritePointer ( DEBUG (( DEBUG_ERROR, "%a: pointer value unrepresentable in \"%a\"\n", - __FUNCTION__, + __func__, WritePointer->PointerFile )); return EFI_PROTOCOL_ERROR; @@ -776,7 +776,7 @@ ProcessCmdWritePointer ( DEBUG_VERBOSE, "%a: PointerFile=3D\"%a\" PointeeFile=3D\"%a\" " "PointerOffset=3D0x%x PointeeOffset=3D0x%x PointerSize=3D%d\n", - __FUNCTION__, + __func__, WritePointer->PointerFile, WritePointer->PointeeFile, WritePointer->PointerOffset, @@ -822,7 +822,7 @@ UndoCmdWritePointer ( DEBUG (( DEBUG_VERBOSE, "%a: PointerFile=3D\"%a\" PointerOffset=3D0x%x PointerSize=3D%d\n", - __FUNCTION__, + __func__, WritePointer->PointerFile, WritePointer->PointerOffset, WritePointer->PointerSize @@ -953,7 +953,7 @@ Process2ndPassCmdAddPointer ( DEBUG (( DEBUG_VERBOSE, "%a: PointerValue=3D0x%Lx already processed, skipping.\n", - __FUNCTION__, + __func__, PointerValue )); Status =3D EFI_SUCCESS; @@ -967,7 +967,7 @@ Process2ndPassCmdAddPointer ( DEBUG_VERBOSE, "%a: checking for ACPI header in \"%a\" at 0x%Lx " "(remaining: 0x%Lx): ", - __FUNCTION__, + __func__, AddPointer->PointeeFile, PointerValue, (UINT64)Blob2Remaining @@ -1042,7 +1042,7 @@ Process2ndPassCmdAddPointer ( DEBUG (( DEBUG_ERROR, "%a: can't install more than %d tables\n", - __FUNCTION__, + __func__, INSTALLED_TABLES_MAX )); Status =3D EFI_OUT_OF_RESOURCES; @@ -1059,7 +1059,7 @@ Process2ndPassCmdAddPointer ( DEBUG (( DEBUG_ERROR, "%a: InstallAcpiTable(): %r\n", - __FUNCTION__, + __func__, Status )); goto RollbackSeenPointer; @@ -1128,7 +1128,7 @@ InstallQemuFwCfgTables ( DEBUG (( DEBUG_ERROR, "%a: \"etc/table-loader\" has invalid size 0x%Lx\n", - __FUNCTION__, + __func__, (UINT64)FwCfgSize )); return EFI_PROTOCOL_ERROR; @@ -1236,7 +1236,7 @@ InstallQemuFwCfgTables ( DEBUG (( DEBUG_VERBOSE, "%a: unknown loader command: 0x%x\n", - __FUNCTION__, + __func__, LoaderEntry->Type )); break; @@ -1311,7 +1311,7 @@ InstallQemuFwCfgTables ( S3Context =3D NULL; } =20 - DEBUG ((DEBUG_INFO, "%a: installed %d tables\n", __FUNCTION__, Installed= )); + DEBUG ((DEBUG_INFO, "%a: installed %d tables\n", __func__, Installed)); =20 UninstallQemuAcpiTableNotifyProtocol: if (EFI_ERROR (Status)) { @@ -1380,7 +1380,7 @@ InstallQemuFwCfgTables ( DEBUG (( DEBUG_VERBOSE, "%a: freeing \"%a\"\n", - __FUNCTION__, + __func__, Blob->File )); gBS->FreePages ((UINTN)Blob->Base, EFI_SIZE_TO_PAGES (Blob->Size)); diff --git a/OvmfPkg/AmdSev/BlobVerifierLibSevHashes/BlobVerifierSevHashes.= c b/OvmfPkg/AmdSev/BlobVerifierLibSevHashes/BlobVerifierSevHashes.c index 65f040f94758..2e58794c3c70 100644 --- a/OvmfPkg/AmdSev/BlobVerifierLibSevHashes/BlobVerifierSevHashes.c +++ b/OvmfPkg/AmdSev/BlobVerifierLibSevHashes/BlobVerifierSevHashes.c @@ -101,7 +101,7 @@ VerifyBlob ( DEBUG (( DEBUG_ERROR, "%a: Verifier called but no hashes table discoverd in MEMFD\n", - __FUNCTION__ + __func__ )); return EFI_ACCESS_DENIED; } @@ -111,7 +111,7 @@ VerifyBlob ( DEBUG (( DEBUG_ERROR, "%a: Unknown blob name \"%s\"\n", - __FUNCTION__, + __func__, BlobName )); return EFI_ACCESS_DENIED; @@ -134,14 +134,14 @@ VerifyBlob ( continue; } =20 - DEBUG ((DEBUG_INFO, "%a: Found GUID %g in table\n", __FUNCTION__, Guid= )); + DEBUG ((DEBUG_INFO, "%a: Found GUID %g in table\n", __func__, Guid)); =20 EntrySize =3D Entry->Len - sizeof Entry->Guid - sizeof Entry->Len; if (EntrySize !=3D SHA256_DIGEST_SIZE) { DEBUG (( DEBUG_ERROR, "%a: Hash has the wrong size %d !=3D %d\n", - __FUNCTION__, + __func__, EntrySize, SHA256_DIGEST_SIZE )); @@ -159,7 +159,7 @@ VerifyBlob ( DEBUG (( DEBUG_INFO, "%a: Hash comparison succeeded for \"%s\"\n", - __FUNCTION__, + __func__, BlobName )); } else { @@ -167,7 +167,7 @@ VerifyBlob ( DEBUG (( DEBUG_ERROR, "%a: Hash comparison failed for \"%s\"\n", - __FUNCTION__, + __func__, BlobName )); } @@ -178,7 +178,7 @@ VerifyBlob ( DEBUG (( DEBUG_ERROR, "%a: Hash GUID %g not found in table\n", - __FUNCTION__, + __func__, Guid )); return EFI_ACCESS_DENIED; @@ -218,7 +218,7 @@ BlobVerifierLibSevHashesConstructor ( DEBUG (( DEBUG_INFO, "%a: Found injected hashes table in secure location\n", - __FUNCTION__ + __func__ )); =20 mHashesTable =3D (HASH_TABLE *)Ptr->Data; @@ -227,7 +227,7 @@ BlobVerifierLibSevHashesConstructor ( DEBUG (( DEBUG_VERBOSE, "%a: mHashesTable=3D0x%p, Size=3D%u\n", - __FUNCTION__, + __func__, mHashesTable, mHashesTableSize )); diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c index 9b0d0e92b6f7..05b728d32a65 100644 --- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c +++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c @@ -276,7 +276,7 @@ AmdSevDxeEntryPoint ( DEBUG (( DEBUG_ERROR, "%a: MemEncryptSevClearPageEncMask(): %r\n", - __FUNCTION__, + __func__, Status )); ASSERT (FALSE); diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c b/OvmfPkg/Bhyve/Acp= iPlatformDxe/EntryPoint.c index b6ef101b2abe..23d1856ad5e2 100644 --- a/OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c +++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/EntryPoint.c @@ -41,11 +41,11 @@ OnRootBridgesConnected ( DEBUG (( DEBUG_INFO, "%a: root bridges have been connected, installing ACPI tables\n", - __FUNCTION__ + __func__ )); Status =3D InstallAcpiTables (FindAcpiTableProtocol ()); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTables: %r\n", __FUNCTION__, Stat= us)); + DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTables: %r\n", __func__, Status)); } =20 gBS->CloseEvent (Event); @@ -71,7 +71,7 @@ AcpiPlatformEntryPoint ( DEBUG_INFO, "%a: PCI or its enumeration disabled, installing " "ACPI tables\n", - __FUNCTION__ + __func__ )); return InstallAcpiTables (FindAcpiTableProtocol ()); } @@ -94,7 +94,7 @@ AcpiPlatformEntryPoint ( DEBUG (( DEBUG_INFO, "%a: waiting for root bridges to be connected, registered callback\n= ", - __FUNCTION__ + __func__ )); } =20 diff --git a/OvmfPkg/Bhyve/AcpiPlatformDxe/PciDecoding.c b/OvmfPkg/Bhyve/Ac= piPlatformDxe/PciDecoding.c index d31fd6539363..0dcf3517f1e7 100644 --- a/OvmfPkg/Bhyve/AcpiPlatformDxe/PciDecoding.c +++ b/OvmfPkg/Bhyve/AcpiPlatformDxe/PciDecoding.c @@ -76,7 +76,7 @@ EnablePciDecoding ( DEBUG (( DEBUG_WARN, "%a: LocateHandleBuffer(): %r\n", - __FUNCTION__, + __func__, Status )); return; @@ -87,7 +87,7 @@ EnablePciDecoding ( DEBUG (( DEBUG_WARN, "%a: AllocatePool(): out of resources\n", - __FUNCTION__ + __func__ )); goto FreeHandles; } @@ -120,7 +120,7 @@ EnablePciDecoding ( DEBUG (( DEBUG_WARN, "%a: EfiPciIoAttributeOperationGet: %r\n", - __FUNCTION__, + __func__, Status )); goto RestoreAttributes; @@ -139,7 +139,7 @@ EnablePciDecoding ( DEBUG (( DEBUG_WARN, "%a: EfiPciIoAttributeOperationSupported: %r\n", - __FUNCTION__, + __func__, Status )); goto RestoreAttributes; @@ -159,7 +159,7 @@ EnablePciDecoding ( DEBUG (( DEBUG_WARN, "%a: EfiPciIoAttributeOperationEnable: %r\n", - __FUNCTION__, + __func__, Status )); goto RestoreAttributes; diff --git a/OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.c b/OvmfPkg/Bhyve/BhyveRfbDx= e/VbeShim.c index 41f0180001f9..ea7a364d8500 100644 --- a/OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.c +++ b/OvmfPkg/Bhyve/BhyveRfbDxe/VbeShim.c @@ -147,7 +147,7 @@ InstallVbeShim ( DEBUG (( DEBUG_VERBOSE, "%a: Video BIOS handler found at %04x:%04x\n", - __FUNCTION__, + __func__, Int0x10->Segment, Int0x10->Offset )); @@ -161,7 +161,7 @@ InstallVbeShim ( DEBUG (( DEBUG_VERBOSE, "%a: failed to allocate page at zero: %r\n", - __FUNCTION__, + __func__, Status )); } else { @@ -271,7 +271,7 @@ InstallVbeShim ( DEBUG (( DEBUG_INFO, "%a: VBE shim installed to %x:%x\n", - __FUNCTION__, + __func__, Int0x10->Segment, Int0x10->Offset )); diff --git a/OvmfPkg/Bhyve/PlatformPei/ClearCache.c b/OvmfPkg/Bhyve/Platfor= mPei/ClearCache.c index 9f23f9a42847..9e59f31df7fd 100644 --- a/OvmfPkg/Bhyve/PlatformPei/ClearCache.c +++ b/OvmfPkg/Bhyve/PlatformPei/ClearCache.c @@ -59,7 +59,7 @@ ClearCacheOnMpServicesAvailable ( EFI_PEI_MP_SERVICES_PPI *MpServices; EFI_STATUS Status; =20 - DEBUG ((DEBUG_INFO, "%a: %a\n", gEfiCallerBaseName, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: %a\n", gEfiCallerBaseName, __func__)); =20 // // Clear cache on all the APs in parallel. @@ -74,7 +74,7 @@ ClearCacheOnMpServicesAvailable ( NULL // ProcedureArgument ); if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_STARTED)) { - DEBUG ((DEBUG_ERROR, "%a: StartupAllAps(): %r\n", __FUNCTION__, Status= )); + DEBUG ((DEBUG_ERROR, "%a: StartupAllAps(): %r\n", __func__, Status)); return Status; } =20 @@ -108,7 +108,7 @@ InstallClearCacheCallback ( DEBUG (( DEBUG_ERROR, "%a: failed to set up MP Services callback: %r\n", - __FUNCTION__, + __func__, Status )); } diff --git a/OvmfPkg/Bhyve/PlatformPei/MemDetect.c b/OvmfPkg/Bhyve/Platform= Pei/MemDetect.c index 1949e586a07e..29cbb9e3dcc8 100644 --- a/OvmfPkg/Bhyve/PlatformPei/MemDetect.c +++ b/OvmfPkg/Bhyve/PlatformPei/MemDetect.c @@ -58,7 +58,7 @@ Q35TsegMbytesInitialization ( DEBUG_ERROR, "%a: no TSEG (SMRAM) on host bridge DID=3D0x%04x; " "only DID=3D0x%04x (Q35) is supported\n", - __FUNCTION__, + __func__, mHostBridgeDevId, INTEL_Q35_MCH_DEVICE_ID )); @@ -92,7 +92,7 @@ Q35TsegMbytesInitialization ( DEBUG (( DEBUG_INFO, "%a: QEMU offers an extended TSEG (%d MB)\n", - __FUNCTION__, + __func__, ExtendedTsegMbytes )); PcdStatus =3D PcdSet16S (PcdQ35TsegMbytes, ExtendedTsegMbytes); @@ -185,7 +185,7 @@ GetFirstNonAddress ( DEBUG (( DEBUG_INFO, "%a: disabling 64-bit PCI host aperture\n", - __FUNCTION__ + __func__ )); PcdStatus =3D PcdSet64S (PcdPciMmio64Size, 0); ASSERT_RETURN_ERROR (PcdStatus); @@ -228,7 +228,7 @@ GetFirstNonAddress ( DEBUG (( DEBUG_INFO, "%a: Pci64Base=3D0x%Lx Pci64Size=3D0x%Lx\n", - __FUNCTION__, + __func__, Pci64Base, Pci64Size )); @@ -392,7 +392,7 @@ PublishPeiMemory ( DEBUG (( DEBUG_INFO, "%a: mPhysMemAddressWidth=3D%d PeiMemoryCap=3D%u KB\n", - __FUNCTION__, + __func__, mPhysMemAddressWidth, PeiMemoryCap >> 10 )); @@ -441,7 +441,7 @@ QemuInitializeRam ( MTRR_SETTINGS MtrrSettings; EFI_STATUS Status; =20 - DEBUG ((DEBUG_INFO, "%a called\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a called\n", __func__)); =20 // // Determine total memory size available diff --git a/OvmfPkg/Bhyve/PlatformPei/Platform.c b/OvmfPkg/Bhyve/PlatformP= ei/Platform.c index eba7c60fced8..2523e49e368a 100644 --- a/OvmfPkg/Bhyve/PlatformPei/Platform.c +++ b/OvmfPkg/Bhyve/PlatformPei/Platform.c @@ -373,7 +373,7 @@ MiscInitialization ( DEBUG (( DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", - __FUNCTION__, + __func__, mHostBridgeDevId )); ASSERT (FALSE); @@ -501,17 +501,17 @@ S3Verification ( DEBUG (( DEBUG_ERROR, "%a: S3Resume2Pei doesn't support X64 PEI + SMM yet.\n", - __FUNCTION__ + __func__ )); DEBUG (( DEBUG_ERROR, "%a: Please disable S3 on the QEMU command line (see the README),\n", - __FUNCTION__ + __func__ )); DEBUG (( DEBUG_ERROR, "%a: or build OVMF with \"OvmfPkgIa32X64.dsc\".\n", - __FUNCTION__ + __func__ )); ASSERT (FALSE); CpuDeadLoop (); @@ -558,7 +558,7 @@ MaxCpuCountInitialization ( DEBUG (( DEBUG_INFO, "%a: QEMU reports %d processor(s)\n", - __FUNCTION__, + __func__, ProcessorCount )); } diff --git a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c b/OvmfPkg/CpuHotplugSmm/Cpu= Hotplug.c index 97ecd32eb6de..d50416302677 100644 --- a/OvmfPkg/CpuHotplugSmm/CpuHotplug.c +++ b/OvmfPkg/CpuHotplugSmm/CpuHotplug.c @@ -135,7 +135,7 @@ ProcessHotAddedCpus ( DEBUG_VERBOSE, "%a: APIC ID " FMT_APIC_ID " was hot-plugged " "before; ignoring it\n", - __FUNCTION__, + __func__, NewApicId )); PluggedIdx++; @@ -155,7 +155,7 @@ ProcessHotAddedCpus ( DEBUG (( DEBUG_ERROR, "%a: no room for APIC ID " FMT_APIC_ID "\n", - __FUNCTION__, + __func__, NewApicId )); return EFI_OUT_OF_RESOURCES; @@ -190,7 +190,7 @@ ProcessHotAddedCpus ( DEBUG (( DEBUG_ERROR, "%a: AddProcessor(" FMT_APIC_ID "): %r\n", - __FUNCTION__, + __func__, NewApicId, Status )); @@ -201,7 +201,7 @@ ProcessHotAddedCpus ( DEBUG_INFO, "%a: hot-added APIC ID " FMT_APIC_ID ", SMBASE 0x%Lx, " "EFI_SMM_CPU_SERVICE_PROTOCOL a= ssigned number %Lu\n", - __FUNCTION__, + __func__, NewApicId, (UINT64)mCpuHotPlugData->SmBase[NewSlot], (UINT64)NewProcessorNumberByProtocol @@ -310,7 +310,7 @@ EjectCpu ( DEBUG_INFO, "%a: Unplugged ProcessorNum %u, " "QemuSelector %Lu\n", - __FUNCTION__, + __func__, Idx, QemuSelector )); @@ -454,7 +454,7 @@ UnplugCpus ( DEBUG_VERBOSE, "%a: did not find APIC ID " FMT_APIC_ID " to unplug\n", - __FUNCTION__, + __func__, RemoveApicId )); ToUnplugIdx++; @@ -469,7 +469,7 @@ UnplugCpus ( DEBUG (( DEBUG_ERROR, "%a: RemoveProcessor(" FMT_APIC_ID "): %r\n", - __FUNCTION__, + __func__, RemoveApicId, Status )); @@ -493,7 +493,7 @@ UnplugCpus ( DEBUG_ERROR, "%a: ProcessorNum %Lu maps to QemuSelector %Lu, " "cannot also map to %u\n", - __FUNCTION__, + __func__, (UINT64)ProcessorNum, mCpuHotEjectData->QemuSelectorMap[ProcessorNum], QemuSelector @@ -511,7 +511,7 @@ UnplugCpus ( DEBUG_INFO, "%a: Started hot-unplug on ProcessorNum %Lu, APIC ID " FMT_APIC_ID ", QemuSelector %u\n", - __FUNCTION__, + __func__, (UINT64)ProcessorNum, RemoveApicId, QemuSelector @@ -635,7 +635,7 @@ CpuHotplugMmi ( DEBUG (( DEBUG_ERROR, "%a: failed to read ICH9_APM_CNT: %r\n", - __FUNCTION__, + __func__, Status )); // @@ -736,7 +736,7 @@ CpuHotplugEntry ( (VOID **)&mMmCpuIo ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: locate MmCpuIo: %r\n", __FUNCTION__, Status)= ); + DEBUG ((DEBUG_ERROR, "%a: locate MmCpuIo: %r\n", __func__, Status)); goto Fatal; } =20 @@ -749,7 +749,7 @@ CpuHotplugEntry ( DEBUG (( DEBUG_ERROR, "%a: locate MmCpuService: %r\n", - __FUNCTION__, + __func__, Status )); goto Fatal; @@ -767,7 +767,7 @@ CpuHotplugEntry ( =20 if (mCpuHotPlugData =3D=3D NULL) { Status =3D EFI_NOT_FOUND; - DEBUG ((DEBUG_ERROR, "%a: CPU_HOT_PLUG_DATA: %r\n", __FUNCTION__, Stat= us)); + DEBUG ((DEBUG_ERROR, "%a: CPU_HOT_PLUG_DATA: %r\n", __func__, Status)); goto Fatal; } =20 @@ -787,7 +787,7 @@ CpuHotplugEntry ( } =20 if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: CPU_HOT_EJECT_DATA: %r\n", __FUNCTION__, Sta= tus)); + DEBUG ((DEBUG_ERROR, "%a: CPU_HOT_EJECT_DATA: %r\n", __func__, Status)= ); goto Fatal; } =20 @@ -799,7 +799,7 @@ CpuHotplugEntry ( RETURN_ERROR (SafeUintnMult (sizeof (UINT32), Len, &SizeSel))) { Status =3D EFI_ABORTED; - DEBUG ((DEBUG_ERROR, "%a: invalid CPU_HOT_PLUG_DATA\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: invalid CPU_HOT_PLUG_DATA\n", __func__)); goto Fatal; } =20 @@ -809,7 +809,7 @@ CpuHotplugEntry ( (VOID **)&mPluggedApicIds ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: MmAllocatePool(): %r\n", __FUNCTION__, Statu= s)); + DEBUG ((DEBUG_ERROR, "%a: MmAllocatePool(): %r\n", __func__, Status)); goto Fatal; } =20 @@ -819,7 +819,7 @@ CpuHotplugEntry ( (VOID **)&mToUnplugApicIds ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: MmAllocatePool(): %r\n", __FUNCTION__, Statu= s)); + DEBUG ((DEBUG_ERROR, "%a: MmAllocatePool(): %r\n", __func__, Status)); goto ReleasePluggedApicIds; } =20 @@ -829,7 +829,7 @@ CpuHotplugEntry ( (VOID **)&mToUnplugSelectors ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: MmAllocatePool(): %r\n", __FUNCTION__, Statu= s)); + DEBUG ((DEBUG_ERROR, "%a: MmAllocatePool(): %r\n", __func__, Status)); goto ReleaseToUnplugApicIds; } =20 @@ -874,7 +874,7 @@ CpuHotplugEntry ( DEBUG (( DEBUG_ERROR, "%a: modern CPU hotplug interface: %r\n", - __FUNCTION__, + __func__, Status )); goto ReleasePostSmmPen; @@ -892,7 +892,7 @@ CpuHotplugEntry ( DEBUG (( DEBUG_ERROR, "%a: MmiHandlerRegister(): %r\n", - __FUNCTION__, + __func__, Status )); goto ReleasePostSmmPen; diff --git a/OvmfPkg/CpuHotplugSmm/QemuCpuhp.c b/OvmfPkg/CpuHotplugSmm/Qemu= Cpuhp.c index ec3dc379f309..1687dada4c92 100644 --- a/OvmfPkg/CpuHotplugSmm/QemuCpuhp.c +++ b/OvmfPkg/CpuHotplugSmm/QemuCpuhp.c @@ -36,7 +36,7 @@ QemuCpuhpReadCommandData2 ( &CommandData2 ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, Status)); ASSERT (FALSE); CpuDeadLoop (); } @@ -61,7 +61,7 @@ QemuCpuhpReadCpuStatus ( &CpuStatus ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, Status)); ASSERT (FALSE); CpuDeadLoop (); } @@ -86,7 +86,7 @@ QemuCpuhpReadCommandData ( &CommandData ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, Status)); ASSERT (FALSE); CpuDeadLoop (); } @@ -110,7 +110,7 @@ QemuCpuhpWriteCpuSelector ( &Selector ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, Status)); ASSERT (FALSE); CpuDeadLoop (); } @@ -132,7 +132,7 @@ QemuCpuhpWriteCpuStatus ( &CpuStatus ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, Status)); ASSERT (FALSE); CpuDeadLoop (); } @@ -154,7 +154,7 @@ QemuCpuhpWriteCommand ( &Command ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, Status)); ASSERT (FALSE); CpuDeadLoop (); } @@ -266,7 +266,7 @@ QemuCpuhpCollectApicIds ( DEBUG_VERBOSE, "%a: CurrentSelector=3D%u PendingSelector=3D%u: " "wrap-around\n", - __FUNCTION__, + __func__, CurrentSelector, PendingSelector )); @@ -291,7 +291,7 @@ QemuCpuhpCollectApicIds ( DEBUG_ERROR, "%a: CurrentSelector=3D%u CpuStatus=3D0x%x: " "inconsistent CPU status\n", - __FUNCTION__, + __func__, CurrentSelector, CpuStatus )); @@ -301,7 +301,7 @@ QemuCpuhpCollectApicIds ( DEBUG (( DEBUG_VERBOSE, "%a: CurrentSelector=3D%u: insert\n", - __FUNCTION__, + __func__, CurrentSelector )); =20 @@ -317,7 +317,7 @@ QemuCpuhpCollectApicIds ( DEBUG_ERROR, "%a: CurrentSelector=3D%u CpuStatus=3D0x%x: " "inconsistent CPU status\n", - __FUNCTION__, + __func__, CurrentSelector, CpuStatus )); @@ -327,7 +327,7 @@ QemuCpuhpCollectApicIds ( DEBUG (( DEBUG_VERBOSE, "%a: CurrentSelector=3D%u: fw_remove\n", - __FUNCTION__, + __func__, CurrentSelector )); =20 @@ -341,7 +341,7 @@ QemuCpuhpCollectApicIds ( DEBUG (( DEBUG_VERBOSE, "%a: CurrentSelector=3D%u: remove (ignored)\n", - __FUNCTION__, + __func__, CurrentSelector )); =20 @@ -352,7 +352,7 @@ QemuCpuhpCollectApicIds ( DEBUG (( DEBUG_VERBOSE, "%a: CurrentSelector=3D%u: no event\n", - __FUNCTION__, + __func__, CurrentSelector )); break; @@ -368,7 +368,7 @@ QemuCpuhpCollectApicIds ( // For unplug events, also save the CurrentSelector. // if (*ExtendCount =3D=3D ApicIdCount) { - DEBUG ((DEBUG_ERROR, "%a: APIC ID array too small\n", __FUNCTION__= )); + DEBUG ((DEBUG_ERROR, "%a: APIC ID array too small\n", __func__)); return EFI_BUFFER_TOO_SMALL; } =20 @@ -377,7 +377,7 @@ QemuCpuhpCollectApicIds ( DEBUG (( DEBUG_VERBOSE, "%a: ApicId=3D" FMT_APIC_ID "\n", - __FUNCTION__, + __func__, NewApicId )); if (ExtendSels !=3D NULL) { @@ -399,7 +399,7 @@ QemuCpuhpCollectApicIds ( DEBUG (( DEBUG_VERBOSE, "%a: PluggedCount=3D%u ToUnplugCount=3D%u\n", - __FUNCTION__, + __func__, *PluggedCount, *ToUnplugCount )); diff --git a/OvmfPkg/CpuHotplugSmm/Smbase.c b/OvmfPkg/CpuHotplugSmm/Smbase.c index 5d5060589317..dc6f4f4b4994 100644 --- a/OvmfPkg/CpuHotplugSmm/Smbase.c +++ b/OvmfPkg/CpuHotplugSmm/Smbase.c @@ -62,7 +62,7 @@ SmbaseAllocatePostSmmPen ( DEBUG (( DEBUG_ERROR, "%a: mPostSmmPenSize=3D%u: %r\n", - __FUNCTION__, + __func__, mPostSmmPenSize, Status )); @@ -77,11 +77,11 @@ SmbaseAllocatePostSmmPen ( &Address ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: AllocatePages(): %r\n", __FUNCTION__, Status= )); + DEBUG ((DEBUG_ERROR, "%a: AllocatePages(): %r\n", __func__, Status)); return Status; } =20 - DEBUG ((DEBUG_INFO, "%a: Post-SMM Pen at 0x%Lx\n", __FUNCTION__, Address= )); + DEBUG ((DEBUG_INFO, "%a: Post-SMM Pen at 0x%Lx\n", __func__, Address)); *PenAddress =3D (UINT32)Address; return EFI_SUCCESS; } @@ -211,7 +211,7 @@ SmbaseRelocate ( DEBUG (( DEBUG_ERROR, "%a: ApicId=3D" FMT_APIC_ID " Smbase=3D0x%Lx: %r\n", - __FUNCTION__, + __func__, ApicId, (UINT64)Smbase, Status @@ -289,7 +289,7 @@ SmbaseRelocate ( DEBUG (( DEBUG_ERROR, "%a: ApicId=3D" FMT_APIC_ID " ApicIdGate=3D0x%Lx: %r\n", - __FUNCTION__, + __func__, ApicId, ExchangeResult, Status diff --git a/OvmfPkg/CpuS3DataDxe/CpuS3Data.c b/OvmfPkg/CpuS3DataDxe/CpuS3D= ata.c index c192a09cf182..289048b75db3 100644 --- a/OvmfPkg/CpuS3DataDxe/CpuS3Data.c +++ b/OvmfPkg/CpuS3DataDxe/CpuS3Data.c @@ -127,7 +127,7 @@ CpuS3DataOnEndOfDxe ( ); ASSERT_EFI_ERROR (Status); =20 - DEBUG ((DEBUG_VERBOSE, "%a\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a\n", __func__)); MtrrGetAllMtrrs (&AcpiCpuDataEx->MtrrTable); =20 // diff --git a/OvmfPkg/Csm/CsmSupportLib/LegacyInterrupt.c b/OvmfPkg/Csm/CsmS= upportLib/LegacyInterrupt.c index 5bed2e2b5107..410e4e457d9c 100644 --- a/OvmfPkg/Csm/CsmSupportLib/LegacyInterrupt.c +++ b/OvmfPkg/Csm/CsmSupportLib/LegacyInterrupt.c @@ -190,7 +190,7 @@ LegacyInterruptInstall ( DEBUG (( DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", - __FUNCTION__, + __func__, HostBridgeDevId )); ASSERT (FALSE); diff --git a/OvmfPkg/Csm/CsmSupportLib/LegacyRegion.c b/OvmfPkg/Csm/CsmSupp= ortLib/LegacyRegion.c index 4969c88dc33e..3c32b75bd692 100644 --- a/OvmfPkg/Csm/CsmSupportLib/LegacyRegion.c +++ b/OvmfPkg/Csm/CsmSupportLib/LegacyRegion.c @@ -484,7 +484,7 @@ LegacyRegionInit ( DEBUG (( DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", - __FUNCTION__, + __func__, HostBridgeDevId )); ASSERT (FALSE); diff --git a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c b/OvmfPkg/Enroll= DefaultKeys/EnrollDefaultKeys.c index 094e4c821bd5..88b6bafee8cc 100644 --- a/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c +++ b/OvmfPkg/EnrollDefaultKeys/EnrollDefaultKeys.c @@ -393,7 +393,7 @@ EnrollListOfCerts ( if (EFI_ERROR (Status)) { AsciiPrint ( "error: %a(\"%s\", %g): %r\n", - __FUNCTION__, + __func__, VariableName, VendorGuid, Status diff --git a/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c b/OvmfPk= g/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c index 14b41a533e96..0d116f60dd4d 100644 --- a/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c +++ b/OvmfPkg/Fdt/FdtPciHostBridgeLib/FdtPciHostBridgeLib.c @@ -61,7 +61,7 @@ MapGcdMmioSpace ( DEBUG (( DEBUG_ERROR, "%a: failed to add GCD memory space for region [0x%Lx+0x%Lx)\n", - __FUNCTION__, + __func__, Base, Size )); @@ -73,7 +73,7 @@ MapGcdMmioSpace ( DEBUG (( DEBUG_ERROR, "%a: failed to set memory space attributes for region [0x%Lx+0x%Lx)\= n", - __FUNCTION__, + __func__, Base, Size )); @@ -143,7 +143,7 @@ ProcessPciHost ( DEBUG (( DEBUG_INFO, "%a: No 'pci-host-ecam-generic' compatible DT node found\n", - __FUNCTION__ + __func__ )); return EFI_NOT_FOUND; } @@ -169,7 +169,7 @@ ProcessPciHost ( DEBUG (( DEBUG_ERROR, "%a: 'reg' property not found or invalid\n", - __FUNCTION__ + __func__ )); return EFI_PROTOCOL_ERROR; } @@ -194,7 +194,7 @@ ProcessPciHost ( DEBUG (( DEBUG_ERROR, "%a: 'bus-range' not found or invalid\n", - __FUNCTION__ + __func__ )); return EFI_PROTOCOL_ERROR; } @@ -212,7 +212,7 @@ ProcessPciHost ( DEBUG (( DEBUG_ERROR, "%a: invalid 'bus-range' and/or 'reg'\n", - __FUNCTION__ + __func__ )); return EFI_PROTOCOL_ERROR; } @@ -224,7 +224,7 @@ ProcessPciHost ( if (EFI_ERROR (Status) || (Len =3D=3D 0) || (Len % sizeof (DTB_PCI_HOST_RANGE_RECORD) !=3D 0)) { - DEBUG ((DEBUG_ERROR, "%a: 'ranges' not found or invalid\n", __FUNCTION= __)); + DEBUG ((DEBUG_ERROR, "%a: 'ranges' not found or invalid\n", __func__)); return EFI_PROTOCOL_ERROR; } =20 @@ -251,7 +251,7 @@ ProcessPciHost ( if ((*Mmio32Base > MAX_UINT32) || (*Mmio32Size > MAX_UINT32) || (*Mmio32Base + *Mmio32Size > SIZE_4GB)) { - DEBUG ((DEBUG_ERROR, "%a: MMIO32 space invalid\n", __FUNCTION__)= ); + DEBUG ((DEBUG_ERROR, "%a: MMIO32 space invalid\n", __func__)); return EFI_PROTOCOL_ERROR; } =20 @@ -262,7 +262,7 @@ ProcessPciHost ( DEBUG_ERROR, "%a: unsupported nonzero MMIO32 translation " "0x%Lx\n", - __FUNCTION__, + __func__, Mmio32Translation )); return EFI_UNSUPPORTED; @@ -282,7 +282,7 @@ ProcessPciHost ( DEBUG_ERROR, "%a: unsupported nonzero MMIO64 translation " "0x%Lx\n", - __FUNCTION__, + __func__, Mmio64Translation )); return EFI_UNSUPPORTED; @@ -293,7 +293,7 @@ ProcessPciHost ( } =20 if (*Mmio32Size =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a: MMIO32 space empty\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: MMIO32 space empty\n", __func__)); return EFI_PROTOCOL_ERROR; } =20 @@ -307,7 +307,7 @@ ProcessPciHost ( DEBUG_INFO, "%a: Config[0x%Lx+0x%Lx) Bus[0x%x..0x%x] " "Io[0x%Lx+0x%Lx)@0x%Lx Mem32[0x%Lx+0x%Lx)@0x0 Mem64[0x%Lx+0x%Lx)@0x0\n= ", - __FUNCTION__, + __func__, ConfigBase, ConfigSize, *BusMin, @@ -370,7 +370,7 @@ PciHostBridgeGetRootBridges ( PCI_ROOT_BRIDGE_APERTURE PMemAbove4G; =20 if (PcdGet64 (PcdPciExpressBaseAddress) =3D=3D 0) { - DEBUG ((DEBUG_INFO, "%a: PCI host bridge not present\n", __FUNCTION__)= ); + DEBUG ((DEBUG_INFO, "%a: PCI host bridge not present\n", __func__)); =20 *Count =3D 0; return NULL; @@ -390,7 +390,7 @@ PciHostBridgeGetRootBridges ( DEBUG (( DEBUG_ERROR, "%a: failed to discover PCI host bridge: %r\n", - __FUNCTION__, + __func__, Status )); *Count =3D 0; diff --git a/OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c b/Ovmf= Pkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c index b5a6718146f8..a3b09e547fb7 100644 --- a/OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c +++ b/OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.c @@ -58,7 +58,7 @@ GetPciIoTranslation ( if (EFI_ERROR (Status) || (Len =3D=3D 0) || (Len % sizeof (DTB_PCI_HOST_RANGE_RECORD) !=3D 0)) { - DEBUG ((DEBUG_ERROR, "%a: 'ranges' not found or invalid\n", __FUNCTION= __)); + DEBUG ((DEBUG_ERROR, "%a: 'ranges' not found or invalid\n", __func__)); return RETURN_PROTOCOL_ERROR; } =20 @@ -152,7 +152,7 @@ FdtPciPcdProducerLibConstructor ( DEBUG (( DEBUG_WARN, "%a: 'pci-host-ecam-generic' device encountered with no I/O rang= e\n", - __FUNCTION__ + __func__ )); } } diff --git a/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c b/OvmfPkg/Fdt/HighMemDxe/H= ighMemDxe.c index 87bc8b6827a2..779bf5c827f5 100644 --- a/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c +++ b/OvmfPkg/Fdt/HighMemDxe/HighMemDxe.c @@ -93,7 +93,7 @@ InitializeHighMemDxe ( DEBUG (( DEBUG_WARN, "%a: Region 0x%lx - 0x%lx not found in the GCD memory space map\= n", - __FUNCTION__, + __func__, CurBase, CurBase + CurSize - 1 )); @@ -112,7 +112,7 @@ InitializeHighMemDxe ( DEBUG (( DEBUG_ERROR, "%a: Failed to add System RAM @ 0x%lx - 0x%lx (%r)\n", - __FUNCTION__, + __func__, CurBase, CurBase + CurSize - 1, Status @@ -129,7 +129,7 @@ InitializeHighMemDxe ( DEBUG (( DEBUG_WARN, "%a: gDS->SetMemorySpaceAttributes() failed on region 0x%lx - = 0x%lx (%r)\n", - __FUNCTION__, + __func__, CurBase, CurBase + CurSize - 1, Status @@ -160,7 +160,7 @@ InitializeHighMemDxe ( DEBUG (( DEBUG_ERROR, "%a: Failed to set System RAM @ 0x%lx - 0x%lx attribute (%r)\n= ", - __FUNCTION__, + __func__, CurBase, CurBase + CurSize - 1, Status @@ -169,7 +169,7 @@ InitializeHighMemDxe ( DEBUG (( DEBUG_INFO, "%a: Add System RAM @ 0x%lx - 0x%lx\n", - __FUNCTION__, + __func__, CurBase, CurBase + CurSize - 1 )); diff --git a/OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.c b/OvmfPkg/Fdt/VirtioFd= tDxe/VirtioFdtDxe.c index 619740e6e708..668090dbea80 100644 --- a/OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.c +++ b/OvmfPkg/Fdt/VirtioFdtDxe/VirtioFdtDxe.c @@ -75,7 +75,7 @@ InitializeVirtioFdtDxe ( DEBUG (( DEBUG_ERROR, "%a: GetNodeProperty () failed (Status =3D=3D %r)\n", - __FUNCTION__, + __func__, Status )); continue; @@ -93,7 +93,7 @@ InitializeVirtioFdtDxe ( sizeof (VIRTIO_TRANSPOR= T_DEVICE_PATH) ); if (DevicePath =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Out of memory\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Out of memory\n", __func__)); continue; } =20 @@ -117,7 +117,7 @@ InitializeVirtioFdtDxe ( DEBUG_ERROR, "%a: Failed to install the EFI_DEVICE_PATH " "protocol on a new handle (Status =3D=3D %r)\n", - __FUNCTION__, + __func__, Status )); FreePool (DevicePath); @@ -130,7 +130,7 @@ InitializeVirtioFdtDxe ( DEBUG_ERROR, "%a: Failed to install VirtIO transport @ 0x%Lx " "on handle %p (Status =3D=3D %r)\n", - __FUNCTION__, + __func__, RegBase, Handle, Status @@ -152,7 +152,7 @@ InitializeVirtioFdtDxe ( DEBUG_ERROR, "%a: Error occurred while iterating DT nodes " "(FindNodeStatus =3D=3D %r)\n", - __FUNCTION__, + __func__, FindNodeStatus )); } diff --git a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceS= upport.c b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSup= port.c index 686d85633e7c..3092a174bc51 100644 --- a/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c +++ b/OvmfPkg/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c @@ -275,7 +275,7 @@ CheckDevice ( DEBUG (( DEBUG_WARN, "%a: 64-bit MMIO BARs may be degraded for PCI 0x%04x:0x%04x (rev %d)= \n", - __FUNCTION__, + __func__, (UINT32)VendorId, (UINT32)DeviceId, (UINT8)RevisionId diff --git a/OvmfPkg/IoMmuDxe/CcIoMmu.c b/OvmfPkg/IoMmuDxe/CcIoMmu.c index 7c2843cd238a..b83a9690062b 100644 --- a/OvmfPkg/IoMmuDxe/CcIoMmu.c +++ b/OvmfPkg/IoMmuDxe/CcIoMmu.c @@ -92,7 +92,7 @@ IoMmuMap ( DEBUG (( DEBUG_VERBOSE, "%a: Operation=3D%a Host=3D0x%p Bytes=3D0x%Lx\n", - __FUNCTION__, + __func__, ((Operation >=3D 0 && Operation < ARRAY_SIZE (mBusMasterOperationName)) ? mBusMasterOperationName[Operation] : @@ -289,7 +289,7 @@ IoMmuMap ( DEBUG (( DEBUG_VERBOSE, "%a: Mapping=3D0x%p Device(PlainText)=3D0x%Lx Crypted=3D0x%Lx Pages=3D= 0x%Lx, ReservedMemBitmap=3D0x%Lx\n", - __FUNCTION__, + __func__, MapInfo, MapInfo->PlainTextAddress, MapInfo->CryptedAddress, @@ -342,7 +342,7 @@ IoMmuUnmapWorker ( DEBUG (( DEBUG_VERBOSE, "%a: Mapping=3D0x%p MemoryMapLocked=3D%d\n", - __FUNCTION__, + __func__, Mapping, MemoryMapLocked )); @@ -537,7 +537,7 @@ IoMmuAllocateBuffer ( DEBUG (( DEBUG_VERBOSE, "%a: MemoryType=3D%u Pages=3D0x%Lx Attributes=3D0x%Lx\n", - __FUNCTION__, + __func__, (UINT32)MemoryType, (UINT64)Pages, Attributes @@ -625,7 +625,7 @@ IoMmuAllocateBuffer ( DEBUG (( DEBUG_VERBOSE, "%a: Host=3D0x%Lx Stash=3D0x%p\n", - __FUNCTION__, + __func__, PhysicalAddress, StashBuffer )); @@ -663,7 +663,7 @@ IoMmuFreeBuffer ( DEBUG (( DEBUG_VERBOSE, "%a: Host=3D0x%p Pages=3D0x%Lx\n", - __FUNCTION__, + __func__, HostAddress, (UINT64)Pages )); @@ -818,7 +818,7 @@ IoMmuExitBoot ( // queue EventToSignal's NotifyFunction after the NotifyFunctions of *= all* // events in EFI_EVENT_GROUP_EXIT_BOOT_SERVICES. // - DEBUG ((DEBUG_VERBOSE, "%a\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a\n", __func__)); gBS->SignalEvent (EventToSignal); } =20 @@ -847,7 +847,7 @@ IoMmuUnmapAllMappings ( LIST_ENTRY *NextNode; MAP_INFO *MapInfo; =20 - DEBUG ((DEBUG_VERBOSE, "%a\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a\n", __func__)); =20 // // All drivers that had set up IOMMU mappings have halted their respecti= ve @@ -933,7 +933,7 @@ InstallIoMmuProtocol ( if (EFI_ERROR (Status)) { mReservedSharedMemSupported =3D FALSE; } else { - DEBUG ((DEBUG_INFO, "%a: Feature of reserved memory for DMA is support= ed.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Feature of reserved memory for DMA is support= ed.\n", __func__)); } =20 return EFI_SUCCESS; diff --git a/OvmfPkg/IoMmuDxe/IoMmuBuffer.c b/OvmfPkg/IoMmuDxe/IoMmuBuffer.c index 83c7c5958340..c8f6cf4818e8 100644 --- a/OvmfPkg/IoMmuDxe/IoMmuBuffer.c +++ b/OvmfPkg/IoMmuDxe/IoMmuBuffer.c @@ -153,7 +153,7 @@ IoMmuInitReservedSharedMem ( DEBUG (( DEBUG_VERBOSE, "%a: ReservedMem (%d pages) address =3D 0x%llx\n", - __FUNCTION__, + __func__, TotalPages, PhysicalAddress )); @@ -330,7 +330,7 @@ InternalAllocateBuffer ( DEBUG (( DEBUG_VERBOSE, "%a: range-size: %lx, start-address=3D0x%llx, pages=3D0x%llx, bits=3D0= x%lx, bitmap: %lx =3D> %lx\n", - __FUNCTION__, + __func__, MemRange->DataSize, *PhysicalAddress, Pages, @@ -401,7 +401,7 @@ IoMmuFreeBounceBuffer ( DEBUG (( DEBUG_VERBOSE, "%a: PlainTextAddress=3D0x%Lx, bits=3D0x%Lx, bitmap: %Lx =3D> %Lx\n", - __FUNCTION__, + __func__, MapInfo->PlainTextAddress, MapInfo->ReservedMemBitmap, mReservedMemBitmap, @@ -480,7 +480,7 @@ IoMmuFreeCommonBuffer ( DEBUG (( DEBUG_VERBOSE, "%a: CommonBuffer=3D0x%Lx, bits=3D0x%Lx, bitmap: %Lx =3D> %Lx\n", - __FUNCTION__, + __func__, (UINT64)(UINTN)CommonBufferHeader + SIZE_4KB, CommonBufferHeader->ReservedMemBitmap, mReservedMemBitmap, diff --git a/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c b/OvmfPkg/Libr= ary/AcpiTimerLib/BaseAcpiTimerLib.c index 6d1e1cb05e00..150fe07c672b 100644 --- a/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c +++ b/OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c @@ -62,7 +62,7 @@ AcpiTimerLibConstructor ( DEBUG (( DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", - __FUNCTION__, + __func__, HostBridgeDevId )); ASSERT (FALSE); diff --git a/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c b/OvmfPkg/L= ibrary/AcpiTimerLib/BaseRomAcpiTimerLib.c index c771997a2a49..9b3cd055117a 100644 --- a/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c +++ b/OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.c @@ -59,7 +59,7 @@ AcpiTimerLibConstructor ( DEBUG (( DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", - __FUNCTION__, + __func__, HostBridgeDevId )); ASSERT (FALSE); @@ -119,7 +119,7 @@ InternalAcpiGetTimerTick ( DEBUG (( DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", - __FUNCTION__, + __func__, HostBridgeDevId )); ASSERT (FALSE); diff --git a/OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c b/OvmfPkg/Libra= ry/AcpiTimerLib/DxeAcpiTimerLib.c index 01a41a6a4515..03d47cf11cce 100644 --- a/OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c +++ b/OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.c @@ -76,7 +76,7 @@ AcpiTimerLibConstructor ( DEBUG (( DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", - __FUNCTION__, + __func__, HostBridgeDevId )); ASSERT (FALSE); diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeVirtualMemory.c= b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeVirtualMemory.c index b9c0a5b25ac0..a1f6e61c1e09 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeVirtualMemory.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/PeiDxeVirtualMemory.c @@ -164,7 +164,7 @@ AllocatePageTableMemory ( DEBUG_VERBOSE, "%a:%a: Buffer=3D0x%Lx Pages=3D%ld\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Buffer, Pages )); @@ -561,7 +561,7 @@ InternalMemEncryptSevCreateIdentityMap1G ( DEBUG_VERBOSE, "%a:%a: Cr3Base=3D0x%Lx Physical=3D0x%Lx Length=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Cr3BaseAddress, PhysicalAddress, (UINT64)Length @@ -606,7 +606,7 @@ InternalMemEncryptSevCreateIdentityMap1G ( DEBUG_ERROR, "%a:%a: bad PML4 for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); Status =3D RETURN_NO_MAPPING; @@ -713,7 +713,7 @@ SetMemoryEncDec ( DEBUG_VERBOSE, "%a:%a: Cr3Base=3D0x%Lx Physical=3D0x%Lx Length=3D0x%Lx Mode=3D%a Cach= eFlush=3D%u Mmio=3D%u\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Cr3BaseAddress, PhysicalAddress, (UINT64)Length, @@ -786,7 +786,7 @@ SetMemoryEncDec ( DEBUG_ERROR, "%a:%a: bad PML4 for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); Status =3D RETURN_NO_MAPPING; @@ -803,7 +803,7 @@ SetMemoryEncDec ( DEBUG_ERROR, "%a:%a: bad PDPE for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); Status =3D RETURN_NO_MAPPING; @@ -824,7 +824,7 @@ SetMemoryEncDec ( DEBUG_VERBOSE, "%a:%a: updated 1GB entry for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); PhysicalAddress +=3D BIT30; @@ -837,7 +837,7 @@ SetMemoryEncDec ( DEBUG_VERBOSE, "%a:%a: splitting 1GB page for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); Split1GPageTo2M ( @@ -865,7 +865,7 @@ SetMemoryEncDec ( DEBUG_ERROR, "%a:%a: bad PDE for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); Status =3D RETURN_NO_MAPPING; @@ -892,7 +892,7 @@ SetMemoryEncDec ( DEBUG_VERBOSE, "%a:%a: splitting 2MB page for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); Split2MPageTo4K ( @@ -917,7 +917,7 @@ SetMemoryEncDec ( DEBUG_ERROR, "%a:%a: bad PTE for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); Status =3D RETURN_NO_MAPPING; diff --git a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInt= ernal.c b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeIntern= al.c index 7a8878b1a9c2..85eb41585b91 100644 --- a/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c +++ b/OvmfPkg/Library/BaseMemEncryptSevLib/X64/SnpPageStateChangeInternal.c @@ -113,7 +113,7 @@ PvalidateRange ( DEBUG_ERROR, "%a:%a: Failed to %a address 0x%Lx Error code %d\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Validate ? "Validate" : "Invalidate", Address, Ret @@ -237,7 +237,7 @@ InternalSetPageState ( DEBUG_VERBOSE, "%a:%a Address 0x%Lx - 0x%Lx State =3D %a LargeEntry =3D %d\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, BaseAddress, EndAddress, State =3D=3D SevSnpPageShared ? "Shared" : "Private", diff --git a/OvmfPkg/Library/BaseMemEncryptTdxLib/MemoryEncryption.c b/Ovmf= Pkg/Library/BaseMemEncryptTdxLib/MemoryEncryption.c index 5b13042512ad..a01dc98852b8 100644 --- a/OvmfPkg/Library/BaseMemEncryptTdxLib/MemoryEncryption.c +++ b/OvmfPkg/Library/BaseMemEncryptTdxLib/MemoryEncryption.c @@ -180,7 +180,7 @@ AllocatePageTableMemory ( DEBUG_VERBOSE, "%a:%a: Buffer=3D0x%Lx Pages=3D%ld\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Buffer, Pages )); @@ -542,7 +542,7 @@ SetOrClearSharedBit ( =20 TdStatus =3D TdVmCall (TDVMCALL_MAPGPA, PhysicalAddress, Length, 0, 0, N= ULL); if (TdStatus !=3D 0) { - DEBUG ((DEBUG_ERROR, "%a: TdVmcall(MAPGPA) failed with %llx\n", __FUNC= TION__, TdStatus)); + DEBUG ((DEBUG_ERROR, "%a: TdVmcall(MAPGPA) failed with %llx\n", __func= __, TdStatus)); ASSERT (FALSE); return EFI_DEVICE_ERROR; } @@ -553,14 +553,14 @@ SetOrClearSharedBit ( if (Mode =3D=3D ClearSharedBit) { Status =3D gBS->LocateProtocol (&gEdkiiMemoryAcceptProtocolGuid, NULL,= (VOID **)&MemoryAcceptProtocol); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Failed to locate MemoryAcceptProtocol with= %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Failed to locate MemoryAcceptProtocol with= %r\n", __func__, Status)); ASSERT (FALSE); return Status; } =20 Status =3D MemoryAcceptProtocol->AcceptMemory (MemoryAcceptProtocol, P= hysicalAddress, Length); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Failed to AcceptMemory with %r\n", __FUNCT= ION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Failed to AcceptMemory with %r\n", __func_= _, Status)); ASSERT (FALSE); return Status; } @@ -570,7 +570,7 @@ SetOrClearSharedBit ( DEBUG_VERBOSE, "%a:%a: pte=3D0x%Lx AddressEncMask=3D0x%Lx Mode=3D0x%x MapGPA Status= =3D0x%x\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, *PageTablePointer, AddressEncMask, Mode, @@ -677,7 +677,7 @@ SetMemorySharedOrPrivate ( DEBUG_VERBOSE, "%a:%a: Cr3Base=3D0x%Lx Physical=3D0x%Lx Length=3D0x%Lx Mode=3D%a\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Cr3BaseAddress, PhysicalAddress, (UINT64)Length, @@ -734,7 +734,7 @@ SetMemorySharedOrPrivate ( DEBUG_ERROR, "%a:%a: bad PML4 for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); Status =3D RETURN_NO_MAPPING; @@ -751,7 +751,7 @@ SetMemorySharedOrPrivate ( DEBUG_ERROR, "%a:%a: bad PDPE for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); Status =3D RETURN_NO_MAPPING; @@ -776,7 +776,7 @@ SetMemorySharedOrPrivate ( DEBUG_VERBOSE, "%a:%a: updated 1GB entry for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); PhysicalAddress +=3D BIT30; @@ -789,7 +789,7 @@ SetMemorySharedOrPrivate ( DEBUG_VERBOSE, "%a:%a: splitting 1GB page for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); Split1GPageTo2M ( @@ -817,7 +817,7 @@ SetMemorySharedOrPrivate ( DEBUG_ERROR, "%a:%a: bad PDE for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); Status =3D RETURN_NO_MAPPING; @@ -848,7 +848,7 @@ SetMemorySharedOrPrivate ( DEBUG_VERBOSE, "%a:%a: splitting 2MB page for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); =20 @@ -877,7 +877,7 @@ SetMemorySharedOrPrivate ( DEBUG_ERROR, "%a:%a: bad PTE for Physical=3D0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, PhysicalAddress )); Status =3D RETURN_NO_MAPPING; diff --git a/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c b/OvmfPkg/Librar= y/BasePciCapLib/BasePciCapLib.c index 4215e6cdaa2e..766a2ccb9c60 100644 --- a/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c +++ b/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c @@ -427,7 +427,7 @@ DebugDumpPciCapList ( DEBUG_VERBOSE, "%a:%a: %a 0x%04x %03u/%03u v0x%x @0x%03x+0x%03x\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (Info.Domain =3D=3D PciCapNormal ? "Norm" : "Extd"), Info.CapId, Info.Instance, @@ -753,7 +753,7 @@ PciCapListInit ( DEBUG_ERROR, "%a:%a: %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return Status; diff --git a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c b/OvmfPkg/Library/= CcExitLib/CcExitVeHandler.c index 2c1de0039d36..9acc6fbe20fc 100644 --- a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c +++ b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c @@ -265,7 +265,7 @@ TdxMmioReadWrite ( UINT64 TdStatus; =20 if ((MmioSize !=3D 1) && (MmioSize !=3D 2) && (MmioSize !=3D 4) && (Mmio= Size !=3D 8)) { - DEBUG ((DEBUG_ERROR, "%a: Invalid MmioSize - %d\n", __FUNCTION__, Mmio= Size)); + DEBUG ((DEBUG_ERROR, "%a: Invalid MmioSize - %d\n", __func__, MmioSize= )); return EFI_INVALID_PARAMETER; } =20 @@ -283,7 +283,7 @@ TdxMmioReadWrite ( } =20 if (TdStatus !=3D 0) { - DEBUG ((DEBUG_ERROR, "%a: TdVmcall failed with %llx\n", __FUNCTION__, = TdStatus)); + DEBUG ((DEBUG_ERROR, "%a: TdVmcall failed with %llx\n", __func__, TdSt= atus)); return EFI_ABORTED; } =20 @@ -334,7 +334,7 @@ ParseMmioExitInstructions ( =20 Status =3D CcInitInstructionData (InstructionData, NULL, Regs); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Initialize InstructionData failed! (%r)\n", = __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Initialize InstructionData failed! (%r)\n", = __func__, Status)); return Status; } =20 @@ -361,7 +361,7 @@ ParseMmioExitInstructions ( 0); =20 if (InstructionData->Ext.ModRm.Mod =3D=3D 3) { - DEBUG ((DEBUG_ERROR, "%a: Parse Ext.ModRm.Mod error! (OpCode: 0x%x= )\n", __FUNCTION__, OpCode)); + DEBUG ((DEBUG_ERROR, "%a: Parse Ext.ModRm.Mod error! (OpCode: 0x%x= )\n", __func__, OpCode)); return EFI_UNSUPPORTED; } =20 @@ -440,7 +440,7 @@ ParseMmioExitInstructions ( // // NPF on two register operands??? // - DEBUG ((DEBUG_ERROR, "%a: Parse Ext.ModRm.Mod error! (OpCode: 0x%x= )\n", __FUNCTION__, OpCode)); + DEBUG ((DEBUG_ERROR, "%a: Parse Ext.ModRm.Mod error! (OpCode: 0x%x= )\n", __func__, OpCode)); return EFI_UNSUPPORTED; } =20 @@ -558,7 +558,7 @@ ParseMmioExitInstructions ( break; =20 default: - DEBUG ((DEBUG_ERROR, "%a: Invalid MMIO opcode (%x)\n", __FUNCTION__,= OpCode)); + DEBUG ((DEBUG_ERROR, "%a: Invalid MMIO opcode (%x)\n", __func__, OpC= ode)); Status =3D EFI_UNSUPPORTED; } =20 @@ -606,12 +606,12 @@ MmioExit ( Gpaw =3D (UINT8)(TdReturnData.TdInfo.Gpaw & 0x3f); TdSharedPageMask =3D 1ULL << (Gpaw - 1); } else { - DEBUG ((DEBUG_ERROR, "%a: TDCALL failed with status=3D%llx\n", __FUNCT= ION__, TdStatus)); + DEBUG ((DEBUG_ERROR, "%a: TDCALL failed with status=3D%llx\n", __func_= _, TdStatus)); goto FatalError; } =20 if ((Veinfo->GuestPA & TdSharedPageMask) =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a: EPT-violation #VE on private memory is not a= llowed!", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: EPT-violation #VE on private memory is not a= llowed!", __func__)); goto FatalError; } =20 @@ -624,7 +624,7 @@ MmioExit ( DEBUG (( DEBUG_ERROR, "%a: Address is not correct! (%d: 0x%llx !=3D 0x%llx)\n", - __FUNCTION__, + __func__, ParsedInstruction.OpCode, Veinfo->GuestPA, ParsedInstruction.Address diff --git a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLi= b.c b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c index c751b106792f..b99fb350aa8f 100644 --- a/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c +++ b/OvmfPkg/Library/GenericQemuLoadImageLib/GenericQemuLoadImageLib.c @@ -201,7 +201,7 @@ QemuLoadKernelImage ( DEBUG (( Status =3D=3D EFI_NOT_FOUND ? DEBUG_INFO : DEBUG_ERROR, "%a: LoadImage(): %r\n", - __FUNCTION__, + __func__, Status )); return Status; @@ -279,7 +279,7 @@ QemuLoadKernelImage ( DEBUG (( DEBUG_ERROR, "%a: kernel command line is not NUL-terminated\n", - __FUNCTION__ + __func__ )); Status =3D EFI_PROTOCOL_ERROR; goto FreeCommandLine; @@ -330,7 +330,7 @@ QemuLoadKernelImage ( DEBUG (( DEBUG_INFO, "%a: command line: \"%s\"\n", - __FUNCTION__, + __func__, (CHAR16 *)KernelLoadedImage->LoadOptions )); } diff --git a/OvmfPkg/Library/HardwareInfoLib/HardwareInfoDxe.c b/OvmfPkg/Li= brary/HardwareInfoLib/HardwareInfoDxe.c index a74de5287153..5a1a69dcc370 100644 --- a/OvmfPkg/Library/HardwareInfoLib/HardwareInfoDxe.c +++ b/OvmfPkg/Library/HardwareInfoLib/HardwareInfoDxe.c @@ -91,7 +91,7 @@ CreateHardwareInfoList ( DEBUG (( EFI_D_ERROR, "%a: Failed to allocate memory for hardware info\n", - __FUNCTION__ + __func__ )); =20 return EFI_OUT_OF_RESOURCES; diff --git a/OvmfPkg/Library/LockBoxLib/LockBoxLib.c b/OvmfPkg/Library/Lock= BoxLib/LockBoxLib.c index 2000afeeb85e..a8af4ea8d009 100644 --- a/OvmfPkg/Library/LockBoxLib/LockBoxLib.c +++ b/OvmfPkg/Library/LockBoxLib/LockBoxLib.c @@ -125,7 +125,7 @@ SaveLockBox ( DEBUG (( DEBUG_VERBOSE, "%a: Guid=3D%g Buffer=3D%p Length=3D0x%x\n", - __FUNCTION__, + __func__, Guid, Buffer, (UINT32)Length @@ -196,7 +196,7 @@ SetLockBoxAttributes ( DEBUG (( DEBUG_VERBOSE, "%a: Guid=3D%g Attributes=3D0x%Lx\n", - __FUNCTION__, + __func__, Guid, Attributes )); @@ -253,7 +253,7 @@ UpdateLockBox ( DEBUG (( DEBUG_VERBOSE, "%a: Guid=3D%g Offset=3D0x%x Length=3D0x%x\n", - __FUNCTION__, + __func__, Guid, (UINT32)Offset, (UINT32)Length @@ -315,7 +315,7 @@ RestoreLockBox ( DEBUG (( DEBUG_VERBOSE, "%a: Guid=3D%g Buffer=3D%p\n", - __FUNCTION__, + __func__, Guid, Buffer )); @@ -397,7 +397,7 @@ RestoreAllLockBoxInPlace ( DEBUG (( DEBUG_VERBOSE, "%a: Guid=3D%g Buffer=3D%p\n", - __FUNCTION__, + __func__, &Header->Guid, Buffer )); diff --git a/OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLi= b.c b/OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.c index cad2bd6c9687..0424aa5df124 100644 --- a/OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.c +++ b/OvmfPkg/Library/PciHostBridgeUtilityLib/PciHostBridgeUtilityLib.c @@ -156,7 +156,7 @@ PciHostBridgeUtilityInitRootBridge ( &mRootBridgeDevicePathTemplate ); if (DevicePath =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, EFI_OUT_OF_RESOURCES)); return EFI_OUT_OF_RESOURCES; } =20 @@ -166,7 +166,7 @@ PciHostBridgeUtilityInitRootBridge ( DEBUG (( DEBUG_INFO, "%a: populated root bus %d, with room for %d subordinate bus(es)\n", - __FUNCTION__, + __func__, RootBusNumber, MaxSubBusNumber - RootBusNumber )); @@ -253,7 +253,7 @@ PciHostBridgeUtilityGetRootBridgesBusScan ( DEBUG_ERROR, "%a: invalid bus range with BusMin %Lu and BusMax " "%Lu\n", - __FUNCTION__, + __func__, (UINT64)BusMin, (UINT64)BusMax )); @@ -283,7 +283,7 @@ PciHostBridgeUtilityGetRootBridgesBusScan ( DEBUG_ERROR, "%a: invalid count of extra root buses (%Lu) " "reported by QEMU\n", - __FUNCTION__, + __func__, ExtraRootBridges )); return NULL; @@ -292,7 +292,7 @@ PciHostBridgeUtilityGetRootBridgesBusScan ( DEBUG (( DEBUG_INFO, "%a: %Lu extra root buses reported by QEMU\n", - __FUNCTION__, + __func__, ExtraRootBridges )); } @@ -302,7 +302,7 @@ PciHostBridgeUtilityGetRootBridgesBusScan ( // Bridges =3D AllocatePool ((1 + (UINTN)ExtraRootBridges) * sizeof *Bridge= s); if (Bridges =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, EFI_OUT_OF_RESOURCES)); return NULL; } =20 @@ -471,7 +471,7 @@ PciHostBridgeUtilityGetRootBridgesHostProvided ( DEBUG (( DEBUG_ERROR, "%a: Failed to allocate memory for hardware resources info\n", - __FUNCTION__ + __func__ )); return NULL; } @@ -495,7 +495,7 @@ PciHostBridgeUtilityGetRootBridgesHostProvided ( DEBUG_ERROR, "%a: Failed to create hardware info list to retrieve host " "bridges information from fw-cfg\n", - __FUNCTION__ + __func__ )); =20 goto FreeBridges; @@ -514,7 +514,7 @@ PciHostBridgeUtilityGetRootBridgesHostProvided ( DEBUG (( DEBUG_INFO, "%a: Host provided description for %Lu root bridges\n", - __FUNCTION__, + __func__, PciHostBridgeCount )); =20 @@ -523,7 +523,7 @@ PciHostBridgeUtilityGetRootBridgesHostProvided ( // Bridges =3D AllocatePool (((UINTN)PciHostBridgeCount) * sizeof *Bridges); if (Bridges =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, EFI_OUT_OF_RESOURCES)); goto FreeBridges; } =20 @@ -567,7 +567,7 @@ PciHostBridgeUtilityGetRootBridgesHostProvided ( DEBUG_ERROR, "%a: invalid bus range with BusMin %Lu and BusMax " "%Lu\n", - __FUNCTION__, + __func__, (UINT64)RootBridgeNumber, (UINT64)LastRootBridgeNumber )); diff --git a/OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c b/OvmfPk= g/Library/PeilessStartupLib/X64/VirtualMemory.c index b444c052d1bf..e2c1bac5e059 100644 --- a/OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c +++ b/OvmfPkg/Library/PeilessStartupLib/X64/VirtualMemory.c @@ -371,7 +371,7 @@ AllocatePageTableMemory ( DEBUG_INFO, "%a:%a: Buffer=3D0x%Lx Pages=3D%ld, PageTablePool=3D%p\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Buffer, Pages, *PageTablePool diff --git a/OvmfPkg/Library/PlatformBmPrintScLib/StatusCodeHandler.c b/Ovm= fPkg/Library/PlatformBmPrintScLib/StatusCodeHandler.c index 065673d90494..18091640d12d 100644 --- a/OvmfPkg/Library/PlatformBmPrintScLib/StatusCodeHandler.c +++ b/OvmfPkg/Library/PlatformBmPrintScLib/StatusCodeHandler.c @@ -122,7 +122,7 @@ HandleStatusCode ( DEBUG_ERROR, "%a:%a: malformed Data\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); return EFI_INVALID_PARAMETER; } @@ -143,7 +143,7 @@ HandleStatusCode ( DEBUG_ERROR, "%a:%a: failed to get %g:\"%s\": %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, &gEfiGlobalVariableGuid, EFI_BOOT_CURRENT_VARIABLE_NAME, Status @@ -156,7 +156,7 @@ HandleStatusCode ( DEBUG_ERROR, "%a:%a: got %Lu bytes for %g:\"%s\", expected %Lu\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (UINT64)VariableSize, &gEfiGlobalVariableGuid, EFI_BOOT_CURRENT_VARIABLE_NAME, @@ -180,7 +180,7 @@ HandleStatusCode ( DEBUG_ERROR, "%a:%a: EfiBootManagerVariableToLoadOption(\"%s\"): %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, BootOptionName, Status )); @@ -309,7 +309,7 @@ PlatformBmPrintScRegisterHandler ( DEBUG_ERROR, "%a:%a: failed to register status code handler: %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return Status; @@ -337,7 +337,7 @@ PlatformBmPrintScRegisterHandler ( "%a:%a: failed to create ExitBootServices() event: " "%r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); StatusCodeRouter->Unregister (HandleStatusCode); diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg= /Library/PlatformBootManagerLib/BdsPlatform.c index 98f6f07341ec..a90076c9e672 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -275,7 +275,7 @@ RemoveStaleFvFileOptions ( DEBUG (( EFI_ERROR (Status) ? DEBUG_WARN : DEBUG_VERBOSE, "%a: removing stale Boot#%04x %s: %r\n", - __FUNCTION__, + __func__, (UINT32)BootOptions[Index].OptionNumber, DevicePathString =3D=3D NULL ? L"" : DevicePathString, Status @@ -479,7 +479,7 @@ PlatformBootManagerBeforeConsole ( DEBUG (( EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: SetVariable(%s, %u): %r\n", - __FUNCTION__, + __func__, EFI_TIME_OUT_VARIABLE_NAME, FrontPageTimeout, Status @@ -632,7 +632,7 @@ ConnectVirtioPciRng ( return EFI_SUCCESS; =20 Error: - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, Status)); return Status; } =20 @@ -1283,7 +1283,7 @@ SetPciIntLine ( DEBUG (( DEBUG_ERROR, "%a: PCI host bridge (00:00.0) should have no interrupts!\n", - __FUNCTION__ + __func__ )); ASSERT (FALSE); } @@ -1338,7 +1338,7 @@ SetPciIntLine ( DEBUG (( DEBUG_VERBOSE, "%a: [%02x:%02x.%x] %s -> 0x%02x\n", - __FUNCTION__, + __func__, (UINT32)Bus, (UINT32)Device, (UINT32)Function, @@ -1416,7 +1416,7 @@ PciAcpiInitialization ( DEBUG (( DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", - __FUNCTION__, + __func__, mHostBridgeDevId )); ASSERT (FALSE); diff --git a/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c b/OvmfPkg/= Library/PlatformBootManagerLib/QemuKernel.c index 1e66e3c45258..84b25db52159 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/QemuKernel.c @@ -44,7 +44,7 @@ TryRunningQemuKernel ( DEBUG (( DEBUG_ERROR, "%a: QemuStartKernelImage(): %r\n", - __FUNCTION__, + __func__, Status )); } diff --git a/OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c b/Ov= mfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c index bf2701965ff2..ac9c02cb1c59 100644 --- a/OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLibBhyve/BdsPlatform.c @@ -273,7 +273,7 @@ RemoveStaleFvFileOptions ( DEBUG (( EFI_ERROR (Status) ? DEBUG_WARN : DEBUG_VERBOSE, "%a: removing stale Boot#%04x %s: %r\n", - __FUNCTION__, + __func__, (UINT32)BootOptions[Index].OptionNumber, DevicePathString =3D=3D NULL ? L"" : DevicePathString, Status @@ -586,7 +586,7 @@ ConnectVirtioPciRng ( return EFI_SUCCESS; =20 Error: - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, Status)); return Status; } =20 @@ -1156,7 +1156,7 @@ SetPciIntLine ( DEBUG (( DEBUG_ERROR, "%a: PCI host bridge (00:00.0) should have no interrupts!\n", - __FUNCTION__ + __func__ )); ASSERT (FALSE); } @@ -1213,7 +1213,7 @@ SetPciIntLine ( DEBUG (( DEBUG_VERBOSE, "%a: [%02x:%02x.%x] %s -> 0x%02x\n", - __FUNCTION__, + __func__, (UINT32)Bus, (UINT32)Device, (UINT32)Function, @@ -1283,7 +1283,7 @@ PciAcpiInitialization ( DEBUG (( DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", - __FUNCTION__, + __func__, mHostBridgeDevId )); ASSERT (FALSE); diff --git a/OvmfPkg/Library/PlatformBootManagerLibGrub/BdsPlatform.c b/Ovm= fPkg/Library/PlatformBootManagerLibGrub/BdsPlatform.c index a402589206bb..df8e2fe15786 100644 --- a/OvmfPkg/Library/PlatformBootManagerLibGrub/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLibGrub/BdsPlatform.c @@ -280,7 +280,7 @@ RemoveStaleFvFileOptions ( DEBUG (( EFI_ERROR (Status) ? DEBUG_WARN : DEBUG_VERBOSE, "%a: removing stale Boot#%04x %s: %r\n", - __FUNCTION__, + __func__, (UINT32)BootOptions[Index].OptionNumber, DevicePathString =3D=3D NULL ? L"" : DevicePathString, Status @@ -551,7 +551,7 @@ ConnectVirtioPciRng ( return EFI_SUCCESS; =20 Error: - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, Status)); return Status; } =20 @@ -1157,7 +1157,7 @@ SetPciIntLine ( DEBUG (( DEBUG_ERROR, "%a: PCI host bridge (00:00.0) should have no interrupts!\n", - __FUNCTION__ + __func__ )); ASSERT (FALSE); } @@ -1212,7 +1212,7 @@ SetPciIntLine ( DEBUG (( DEBUG_VERBOSE, "%a: [%02x:%02x.%x] %s -> 0x%02x\n", - __FUNCTION__, + __func__, (UINT32)Bus, (UINT32)Device, (UINT32)Function, @@ -1280,7 +1280,7 @@ PciAcpiInitialization ( DEBUG (( DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", - __FUNCTION__, + __func__, mHostBridgeDevId )); ASSERT (FALSE); diff --git a/OvmfPkg/Library/PlatformBootManagerLibGrub/QemuKernel.c b/Ovmf= Pkg/Library/PlatformBootManagerLibGrub/QemuKernel.c index 1e66e3c45258..84b25db52159 100644 --- a/OvmfPkg/Library/PlatformBootManagerLibGrub/QemuKernel.c +++ b/OvmfPkg/Library/PlatformBootManagerLibGrub/QemuKernel.c @@ -44,7 +44,7 @@ TryRunningQemuKernel ( DEBUG (( DEBUG_ERROR, "%a: QemuStartKernelImage(): %r\n", - __FUNCTION__, + __func__, Status )); } diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/= PlatformInitLib/MemDetect.c index aced8535e6d1..acf90b4e93fd 100644 --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c @@ -91,7 +91,7 @@ PlatformQemuUc32BaseInitialization ( DEBUG_VERBOSE, "%a: rounded UC32 base from 0x%x up to 0x%x, for " "an UC32 size of 0x%x\n", - __FUNCTION__, + __func__, PlatformInfoHob->LowMemory, PlatformInfoHob->Uc32Base, PlatformInfoHob->Uc32Size @@ -123,7 +123,7 @@ PlatformGetFirstNonAddressCB ( =20 Candidate =3D E820Entry->BaseAddr + E820Entry->Length; if (PlatformInfoHob->FirstNonAddress < Candidate) { - DEBUG ((DEBUG_INFO, "%a: FirstNonAddress=3D0x%Lx\n", __FUNCTION__, Can= didate)); + DEBUG ((DEBUG_INFO, "%a: FirstNonAddress=3D0x%Lx\n", __func__, Candida= te)); PlatformInfoHob->FirstNonAddress =3D Candidate; } } @@ -151,7 +151,7 @@ PlatformGetLowMemoryCB ( } =20 if (PlatformInfoHob->LowMemory < Candidate) { - DEBUG ((DEBUG_INFO, "%a: LowMemory=3D0x%Lx\n", __FUNCTION__, Candidate= )); + DEBUG ((DEBUG_INFO, "%a: LowMemory=3D0x%Lx\n", __func__, Candidate)); PlatformInfoHob->LowMemory =3D (UINT32)Candidate; } } @@ -180,7 +180,7 @@ PlatformAddHobCB ( Base =3D ALIGN_VALUE (Base, (UINT64)EFI_PAGE_SIZE); End =3D End & ~(UINT64)EFI_PAGE_MASK; if (Base < End) { - DEBUG ((DEBUG_INFO, "%a: HighMemory [0x%Lx, 0x%Lx)\n", __FUNCTIO= N__, Base, End)); + DEBUG ((DEBUG_INFO, "%a: HighMemory [0x%Lx, 0x%Lx)\n", __func__,= Base, End)); PlatformAddMemoryRangeHob (Base, End); } } @@ -188,13 +188,13 @@ PlatformAddHobCB ( break; case EfiAcpiAddressRangeReserved: BuildResourceDescriptorHob (EFI_RESOURCE_MEMORY_RESERVED, 0, Base, E= nd - Base); - DEBUG ((DEBUG_INFO, "%a: Reserved [0x%Lx, 0x%Lx)\n", __FUNCTION__, B= ase, End)); + DEBUG ((DEBUG_INFO, "%a: Reserved [0x%Lx, 0x%Lx)\n", __func__, Base,= End)); break; default: DEBUG (( DEBUG_WARN, "%a: Type %u [0x%Lx, 0x%Lx) (NOT HANDLED)\n", - __FUNCTION__, + __func__, E820Entry->Type, Base, End @@ -241,7 +241,7 @@ PlatformReservationConflictCB ( DEBUG (( DEBUG_INFO, "%a: move mmio: 0x%Lx =3D> %Lx\n", - __FUNCTION__, + __func__, PlatformInfoHob->PcdPciMmio64Base, NewBase )); @@ -495,7 +495,7 @@ PlatformGetFirstNonAddress ( DEBUG (( DEBUG_WARN, "%a: ignoring malformed 64-bit PCI host aperture size from fw_cfg\= n", - __FUNCTION__ + __func__ )); break; } @@ -505,7 +505,7 @@ PlatformGetFirstNonAddress ( DEBUG (( DEBUG_INFO, "%a: disabling 64-bit PCI host aperture\n", - __FUNCTION__ + __func__ )); } =20 @@ -534,7 +534,7 @@ PlatformGetFirstNonAddress ( DEBUG (( DEBUG_VERBOSE, "%a: HotPlugMemoryEnd=3D0x%Lx\n", - __FUNCTION__, + __func__, HotPlugMemoryEnd )); =20 @@ -638,7 +638,7 @@ PlatformAddressWidthFromCpuid ( DEBUG (( DEBUG_INFO, "%a: Signature: '%a', PhysBits: %d, QemuQuirk: %a, Valid: %a\n", - __FUNCTION__, + __func__, Signature, PhysBits, QemuQuirk ? "On" : "Off", @@ -783,7 +783,7 @@ PlatformScanHostProvided64BitPciMmioEnd ( DEBUG (( DEBUG_ERROR, "%a: ignoring malformed hardware information from fw_cfg\n", - __FUNCTION__ + __func__ )); *PciMmioAddressEnd =3D 0; return Status; @@ -806,7 +806,7 @@ PlatformScanHostProvided64BitPciMmioEnd ( DEBUG (( DEBUG_INFO, "%a: Pci64End=3D0x%Lx\n", - __FUNCTION__, + __func__, *PciMmioAddressEnd )); =20 @@ -942,7 +942,7 @@ PlatformQemuInitializeRam ( MTRR_SETTINGS MtrrSettings; EFI_STATUS Status; =20 - DEBUG ((DEBUG_INFO, "%a called\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a called\n", __func__)); =20 // // Determine total memory size available diff --git a/OvmfPkg/Library/PlatformInitLib/Platform.c b/OvmfPkg/Library/P= latformInitLib/Platform.c index 5cf8af825a2f..f48bf16ae300 100644 --- a/OvmfPkg/Library/PlatformInitLib/Platform.c +++ b/OvmfPkg/Library/PlatformInitLib/Platform.c @@ -358,7 +358,7 @@ PlatformMiscInitialization ( DEBUG (( DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", - __FUNCTION__, + __func__, PlatformInfoHob->HostBridgeDevId )); ASSERT (FALSE); @@ -366,7 +366,7 @@ PlatformMiscInitialization ( } =20 if (PlatformInfoHob->HostBridgeDevId =3D=3D CLOUDHV_DEVICE_ID) { - DEBUG ((DEBUG_INFO, "%a: Cloud Hypervisor is done.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Cloud Hypervisor is done.\n", __func__)); return; } =20 @@ -489,12 +489,12 @@ PlatformCpuCountBugCheck ( DEBUG (( DEBUG_ERROR, "%a: Present=3D%u Possible=3D%u\n", - __FUNCTION__, + __func__, *Present, *Possible )); for (Idx =3D 0; Idx < ARRAY_SIZE (Message); ++Idx) { - DEBUG ((DEBUG_ERROR, "%a: %a\n", __FUNCTION__, Message[Idx])); + DEBUG ((DEBUG_ERROR, "%a: %a\n", __func__, Message[Idx])); } =20 ParseStatus =3D QemuFwCfgParseBool ( @@ -505,7 +505,7 @@ PlatformCpuCountBugCheck ( DEBUG (( DEBUG_WARN, "%a: \"%a\" active. You've been warned.\n", - __FUNCTION__, + __func__, CPUHP_BUGCHECK_OVERRIDE_FWCFG_FILE )); // @@ -531,7 +531,7 @@ PlatformCpuCountBugCheck ( DEBUG (( DEBUG_WARN, "%a: QEMU v2.7 reset bug: BootCpuCount=3D%d Present=3D%u\n", - __FUNCTION__, + __func__, *BootCpuCount, *Present )); @@ -573,7 +573,7 @@ PlatformMaxCpuCountInitialization ( // until PcdCpuApInitTimeOutInMicroSeconds elapses (whichever is reach= ed // first). // - DEBUG ((DEBUG_WARN, "%a: boot CPU count unavailable\n", __FUNCTION__)); + DEBUG ((DEBUG_WARN, "%a: boot CPU count unavailable\n", __func__)); MaxCpuCount =3D PlatformInfoHob->DefaultMaxCpuNumber; } else { // @@ -626,7 +626,7 @@ PlatformMaxCpuCountInitialization ( // steps. Both cases confirm modern mode. // CmdData2 =3D IoRead32 (CpuHpBase + QEMU_CPUHP_R_CMD_DATA2); - DEBUG ((DEBUG_VERBOSE, "%a: CmdData2=3D0x%x\n", __FUNCTION__, CmdData2= )); + DEBUG ((DEBUG_VERBOSE, "%a: CmdData2=3D0x%x\n", __func__, CmdData2)); if (CmdData2 !=3D 0) { // // QEMU doesn't support the modern CPU hotplug interface. Assume tha= t the @@ -635,7 +635,7 @@ PlatformMaxCpuCountInitialization ( DEBUG (( DEBUG_WARN, "%a: modern CPU hotplug interface unavailable\n", - __FUNCTION__ + __func__ )); MaxCpuCount =3D BootCpuCount; } else { @@ -693,7 +693,7 @@ PlatformMaxCpuCountInitialization ( DEBUG (( DEBUG_INFO, "%a: BootCpuCount=3D%d MaxCpuCount=3D%u\n", - __FUNCTION__, + __func__, BootCpuCount, MaxCpuCount )); diff --git a/OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c b/OvmfPkg/L= ibrary/QemuBootOrderLib/ExtraRootBusMap.c index 37d488e01c2a..c32c3eddd532 100644 --- a/OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c +++ b/OvmfPkg/Library/QemuBootOrderLib/ExtraRootBusMap.c @@ -227,7 +227,7 @@ CreateExtraRootBusMap ( DEBUG (( DEBUG_VERBOSE, "%a: extra bus position 0x%Lx maps to bus number (UID) 0x%x\n", - __FUNCTION__, + __func__, (UINT64)(Idx + 1), Acpi->UID )); diff --git a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c b/OvmfPkg/= Library/QemuBootOrderLib/QemuBootOrderLib.c index cea4b7a099e3..2fe6ab30c032 100644 --- a/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c +++ b/OvmfPkg/Library/QemuBootOrderLib/QemuBootOrderLib.c @@ -543,7 +543,7 @@ ParseOfwNode ( DEBUG (( DEBUG_VERBOSE, "%a: DriverName=3D\"%.*a\" UnitAddress=3D\"%.*a\" DeviceArguments=3D\"= %.*a\"\n", - __FUNCTION__, + __func__, OfwNode->DriverName.Len, OfwNode->DriverName.Ptr, OfwNode->UnitAddress.Len, @@ -1477,7 +1477,7 @@ TranslateOfwPath ( } =20 if (Status =3D=3D RETURN_NOT_FOUND) { - DEBUG ((DEBUG_VERBOSE, "%a: no more nodes\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: no more nodes\n", __func__)); return RETURN_NOT_FOUND; } =20 @@ -1496,7 +1496,7 @@ TranslateOfwPath ( break; =20 case RETURN_INVALID_PARAMETER: - DEBUG ((DEBUG_VERBOSE, "%a: parse error\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: parse error\n", __func__)); return RETURN_INVALID_PARAMETER; =20 default: @@ -1512,22 +1512,22 @@ TranslateOfwPath ( ); switch (Status) { case RETURN_SUCCESS: - DEBUG ((DEBUG_VERBOSE, "%a: success: \"%s\"\n", __FUNCTION__, Transl= ated)); + DEBUG ((DEBUG_VERBOSE, "%a: success: \"%s\"\n", __func__, Translated= )); break; =20 case RETURN_BUFFER_TOO_SMALL: - DEBUG ((DEBUG_VERBOSE, "%a: buffer too small\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: buffer too small\n", __func__)); break; =20 case RETURN_UNSUPPORTED: - DEBUG ((DEBUG_VERBOSE, "%a: unsupported\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: unsupported\n", __func__)); break; =20 case RETURN_PROTOCOL_ERROR: DEBUG (( DEBUG_VERBOSE, "%a: logic error / system state mismatch\n", - __FUNCTION__ + __func__ )); break; =20 @@ -1604,9 +1604,9 @@ ConnectDevicesFromQemu ( goto FreeFwCfg; } =20 - DEBUG ((DEBUG_VERBOSE, "%a: FwCfg:\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: FwCfg:\n", __func__)); DEBUG ((DEBUG_VERBOSE, "%a\n", FwCfg)); - DEBUG ((DEBUG_VERBOSE, "%a: FwCfg: \n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: FwCfg: \n", __func__)); =20 if (FeaturePcdGet (PcdQemuBootOrderPciTranslation)) { EfiStatus =3D CreateExtraRootBusMap (&ExtraPciRoots); @@ -1686,7 +1686,7 @@ ConnectDevicesFromQemu ( DEBUG (( DEBUG_INFO, "%a: %Lu OpenFirmware device path(s) connected\n", - __FUNCTION__, + __func__, (UINT64)NumConnected )); Status =3D RETURN_SUCCESS; @@ -1750,9 +1750,9 @@ StoreQemuBootOrder ( goto FreeFwCfg; } =20 - DEBUG ((DEBUG_VERBOSE, "%a: FwCfg:\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: FwCfg:\n", __func__)); DEBUG ((DEBUG_VERBOSE, "%a\n", FwCfg)); - DEBUG ((DEBUG_VERBOSE, "%a: FwCfg: \n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: FwCfg: \n", __func__)); =20 if (FeaturePcdGet (PcdQemuBootOrderPciTranslation)) { EfiStatus =3D CreateExtraRootBusMap (&ExtraPciRoots); @@ -1797,7 +1797,7 @@ StoreQemuBootOrder ( L"VMMBootOrder%04x", VariableIndex++ ); - DEBUG ((DEBUG_INFO, "%a: %s =3D %s\n", __FUNCTION__, VariableName, T= ranslated)); + DEBUG ((DEBUG_INFO, "%a: %s =3D %s\n", __func__, VariableName, Trans= lated)); gRT->SetVariable ( VariableName, &gVMMBootOrderGuid, @@ -1944,7 +1944,7 @@ Match ( DEBUG (( DEBUG_VERBOSE, "%a: expanded relative device path \"%s\" for prefix matching\n", - __FUNCTION__, + __func__, Converted )); FreePool (Converted); @@ -1958,7 +1958,7 @@ Match ( DEBUG (( DEBUG_VERBOSE, "%a: against \"%s\": %a\n", - __FUNCTION__, + __func__, Converted, Result ? "match" : "no match" )); @@ -2068,7 +2068,7 @@ BootOrderComplete ( DEBUG (( DEBUG_VERBOSE, "%a: keeping \"%s\"\n", - __FUNCTION__, + __func__, Converted )); } @@ -2076,7 +2076,7 @@ BootOrderComplete ( DEBUG (( DEBUG_VERBOSE, "%a: dropping \"%s\"\n", - __FUNCTION__, + __func__, Converted )); } @@ -2211,9 +2211,9 @@ SetBootOrderFromQemu ( goto ErrorFreeFwCfg; } =20 - DEBUG ((DEBUG_VERBOSE, "%a: FwCfg:\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: FwCfg:\n", __func__)); DEBUG ((DEBUG_VERBOSE, "%a\n", FwCfg)); - DEBUG ((DEBUG_VERBOSE, "%a: FwCfg: \n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: FwCfg: \n", __func__)); FwCfgPtr =3D FwCfg; =20 BootOrder.Produced =3D 0; @@ -2332,13 +2332,13 @@ SetBootOrderFromQemu ( DEBUG (( DEBUG_ERROR, "%a: setting BootOrder: %r\n", - __FUNCTION__, + __func__, Status )); goto ErrorFreeExtraPciRoots; } =20 - DEBUG ((DEBUG_INFO, "%a: setting BootOrder: success\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: setting BootOrder: success\n", __func__)); PruneBootVariables (ActiveOption, ActiveCount); } =20 diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c b/OvmfPkg/Library/= QemuFwCfgLib/QemuFwCfgDxe.c index 6a810928a060..4250e633b57f 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgDxe.c @@ -103,7 +103,7 @@ QemuFwCfgInitialize ( DEBUG_ERROR, "QemuFwCfgDma %a:%a Failed to locate IOMMU protocol.\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); ASSERT (FALSE); CpuDeadLoop (); @@ -186,7 +186,7 @@ AllocFwCfgDmaAccessBuffer ( DEBUG_ERROR, "%a:%a failed to allocate FW_CFG_DMA_ACCESS\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); ASSERT (FALSE); CpuDeadLoop (); @@ -215,7 +215,7 @@ AllocFwCfgDmaAccessBuffer ( DEBUG_ERROR, "%a:%a failed to Map() FW_CFG_DMA_ACCESS\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); ASSERT (FALSE); CpuDeadLoop (); @@ -228,7 +228,7 @@ AllocFwCfgDmaAccessBuffer ( DEBUG_ERROR, "%a:%a failed to Map() - requested 0x%Lx got 0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (UINT64)sizeof (FW_CFG_DMA_ACCESS), (UINT64)Size )); @@ -263,7 +263,7 @@ FreeFwCfgDmaAccessBuffer ( DEBUG_ERROR, "%a:%a failed to UnMap() Mapping 0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (UINT64)(UINTN)Mapping )); ASSERT (FALSE); @@ -276,7 +276,7 @@ FreeFwCfgDmaAccessBuffer ( DEBUG_ERROR, "%a:%a failed to Free() 0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (UINT64)(UINTN)Access )); ASSERT (FALSE); @@ -320,7 +320,7 @@ MapFwCfgDmaDataBuffer ( DEBUG_ERROR, "%a:%a failed to Map() Address 0x%Lx Size 0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (UINT64)(UINTN)HostAddress, (UINT64)Size )); @@ -334,7 +334,7 @@ MapFwCfgDmaDataBuffer ( DEBUG_ERROR, "%a:%a failed to Map() - requested 0x%x got 0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Size, (UINT64)NumberOfBytes )); @@ -360,7 +360,7 @@ UnmapFwCfgDmaDataBuffer ( DEBUG_ERROR, "%a:%a failed to UnMap() Mapping 0x%Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (UINT64)(UINTN)Mapping )); ASSERT (FALSE); diff --git a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c b/OvmfPkg/Libr= ary/QemuFwCfgLib/QemuFwCfgLibMmio.c index 583d8a8e9f41..115a21075912 100644 --- a/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c +++ b/OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLibMmio.c @@ -134,7 +134,7 @@ QemuFwCfgInitialize ( DEBUG (( DEBUG_WARN, "%a: No 'qemu,fw-cfg-mmio' compatible DT node found (Status =3D=3D %= r)\n", - __FUNCTION__, + __func__, Status )); return EFI_SUCCESS; diff --git a/OvmfPkg/Library/QemuFwCfgS3Lib/QemuFwCfgS3Dxe.c b/OvmfPkg/Libr= ary/QemuFwCfgS3Lib/QemuFwCfgS3Dxe.c index 5706fa9be46a..f5237564388f 100644 --- a/OvmfPkg/Library/QemuFwCfgS3Lib/QemuFwCfgS3Dxe.c +++ b/OvmfPkg/Library/QemuFwCfgS3Lib/QemuFwCfgS3Dxe.c @@ -71,7 +71,7 @@ S3SaveStateInstalledNotify ( DEBUG_INFO, "%a: %a: DmaAccess@0x%Lx ScratchBuffer@[0x%Lx+0x%Lx]\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (UINT64)(UINTN)mDmaAccess, (UINT64)(UINTN)mScratchBuffer, (UINT64)mScratchBufferSize @@ -161,7 +161,7 @@ QemuFwCfgS3CallWhenBootScriptReady ( DEBUG_ERROR, "%a: %a: fw_cfg DMA unavailable\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); return RETURN_NOT_FOUND; } @@ -177,7 +177,7 @@ QemuFwCfgS3CallWhenBootScriptReady ( DEBUG_ERROR, "%a: %a: ScratchBufferSize too big: %Lu\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (UINT64)ScratchBufferSize )); return RETURN_BAD_BUFFER_SIZE; @@ -192,7 +192,7 @@ QemuFwCfgS3CallWhenBootScriptReady ( DEBUG_ERROR, "%a: %a: AllocateReservedPool(): out of resources\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); return RETURN_OUT_OF_RESOURCES; } @@ -215,7 +215,7 @@ QemuFwCfgS3CallWhenBootScriptReady ( DEBUG_ERROR, "%a: %a: CreateEvent(): %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); goto FreeDmaAccess; @@ -231,7 +231,7 @@ QemuFwCfgS3CallWhenBootScriptReady ( DEBUG_ERROR, "%a: %a: RegisterProtocolNotify(): %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); goto CloseEvent; @@ -256,7 +256,7 @@ QemuFwCfgS3CallWhenBootScriptReady ( DEBUG_ERROR, "%a: %a: SignalEvent(): %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); goto NullGlobals; @@ -383,7 +383,7 @@ QemuFwCfgS3ScriptWriteBytes ( DEBUG_ERROR, "%a: %a: EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE: %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return (RETURN_STATUS)Status; @@ -409,7 +409,7 @@ QemuFwCfgS3ScriptWriteBytes ( DEBUG_ERROR, "%a: %a: EFI_BOOT_SCRIPT_IO_WRITE_OPCODE: %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return (RETURN_STATUS)Status; @@ -436,7 +436,7 @@ QemuFwCfgS3ScriptWriteBytes ( DEBUG_ERROR, "%a: %a: EFI_BOOT_SCRIPT_MEM_POLL_OPCODE: %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return (RETURN_STATUS)Status; @@ -544,7 +544,7 @@ QemuFwCfgS3ScriptReadBytes ( DEBUG_ERROR, "%a: %a: EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE: %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return (RETURN_STATUS)Status; @@ -570,7 +570,7 @@ QemuFwCfgS3ScriptReadBytes ( DEBUG_ERROR, "%a: %a: EFI_BOOT_SCRIPT_IO_WRITE_OPCODE: %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return (RETURN_STATUS)Status; @@ -597,7 +597,7 @@ QemuFwCfgS3ScriptReadBytes ( DEBUG_ERROR, "%a: %a: EFI_BOOT_SCRIPT_MEM_POLL_OPCODE: %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return (RETURN_STATUS)Status; @@ -692,7 +692,7 @@ QemuFwCfgS3ScriptSkipBytes ( DEBUG_ERROR, "%a: %a: EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE: %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return (RETURN_STATUS)Status; @@ -718,7 +718,7 @@ QemuFwCfgS3ScriptSkipBytes ( DEBUG_ERROR, "%a: %a: EFI_BOOT_SCRIPT_IO_WRITE_OPCODE: %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return (RETURN_STATUS)Status; @@ -745,7 +745,7 @@ QemuFwCfgS3ScriptSkipBytes ( DEBUG_ERROR, "%a: %a: EFI_BOOT_SCRIPT_MEM_POLL_OPCODE: %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return (RETURN_STATUS)Status; @@ -877,7 +877,7 @@ QemuFwCfgS3ScriptCheckValue ( DEBUG_ERROR, "%a: %a: EFI_BOOT_SCRIPT_MEM_POLL_OPCODE: %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return (RETURN_STATUS)Status; diff --git a/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c b/Ov= mfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c index a31fd0e7bbbe..ae9d2260d585 100644 --- a/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c +++ b/OvmfPkg/Library/ResetSystemLib/DxeResetSystemLibMicrovm.c @@ -29,11 +29,11 @@ DxeResetSystemLibMicrovmConstructor ( EFI_STATUS Status; EFI_GCD_MEMORY_SPACE_DESCRIPTOR Descriptor; =20 - DEBUG ((DEBUG_INFO, "%a: start\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: start\n", __func__)); =20 Status =3D gDS->GetMemorySpaceDescriptor (Address, &Descriptor); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a: GetMemorySpaceDescriptor failed\n", __FUNCTIO= N__)); + DEBUG ((DEBUG_INFO, "%a: GetMemorySpaceDescriptor failed\n", __func__)= ); return RETURN_UNSUPPORTED; } =20 @@ -43,10 +43,10 @@ DxeResetSystemLibMicrovmConstructor ( Descriptor.Attributes | EFI_MEMORY_RUNTIME ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a: SetMemorySpaceAttributes failed\n", __FUNCTIO= N__)); + DEBUG ((DEBUG_INFO, "%a: SetMemorySpaceAttributes failed\n", __func__)= ); return RETURN_UNSUPPORTED; } =20 - DEBUG ((DEBUG_INFO, "%a: done\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: done\n", __func__)); return EFI_SUCCESS; } diff --git a/OvmfPkg/Library/ResetSystemLib/ResetSystemLibMicrovm.c b/OvmfP= kg/Library/ResetSystemLib/ResetSystemLibMicrovm.c index 44fe929e937d..4a4e78cca40a 100644 --- a/OvmfPkg/Library/ResetSystemLib/ResetSystemLibMicrovm.c +++ b/OvmfPkg/Library/ResetSystemLib/ResetSystemLibMicrovm.c @@ -25,9 +25,9 @@ MicrovmGedBase ( =20 if (EfiGoneVirtual ()) { EfiConvertPointer (0, &Address); - DEBUG ((DEBUG_INFO, "%a: virtual -> 0x%x\n", __FUNCTION__, Address)); + DEBUG ((DEBUG_INFO, "%a: virtual -> 0x%x\n", __func__, Address)); } else { - DEBUG ((DEBUG_INFO, "%a: physical -> 0x%x\n", __FUNCTION__, Address)); + DEBUG ((DEBUG_INFO, "%a: physical -> 0x%x\n", __func__, Address)); } =20 return (UINTN)Address; @@ -40,7 +40,7 @@ MicrovmReset ( { UINTN Address =3D MicrovmGedBase (); =20 - DEBUG ((DEBUG_INFO, "%a: microvm reset via ged\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: microvm reset via ged\n", __func__)); MmioWrite8 ( Address + MICROVM_ACPI_GED_REG_RESET, MICROVM_ACPI_GED_RESET_VALUE @@ -55,7 +55,7 @@ MicrovmShutdown ( { UINTN Address =3D MicrovmGedBase (); =20 - DEBUG ((DEBUG_INFO, "%a: microvm poweroff via ged\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: microvm poweroff via ged\n", __func__)); MmioWrite8 ( Address + MICROVM_ACPI_GED_REG_SLEEP_CTL, (1 << 5) /* enable bit */ | diff --git a/OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.c = b/OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.c index c70b4556b7f2..8df82e161a90 100644 --- a/OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.c +++ b/OvmfPkg/Library/SerializeVariablesLib/SerializeVariablesLib.c @@ -294,7 +294,7 @@ IterateVariablesCallbackSetSystemVariable ( DEBUG_WARN, "%a: setting authenticated variable \"%s\" " "failed with EFI_SECURITY_VIOLATION, ignoring\n", - __FUNCTION__, + __func__, VariableName )); Status =3D EFI_SUCCESS; @@ -303,7 +303,7 @@ IterateVariablesCallbackSetSystemVariable ( DEBUG_WARN, "%a: setting ReadOnly variable \"%s\" " "failed with EFI_WRITE_PROTECTED, ignoring\n", - __FUNCTION__, + __func__, VariableName )); Status =3D EFI_SUCCESS; diff --git a/OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.c b/Ov= mfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.c index 69c2d3640037..5de3022086b7 100644 --- a/OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.c +++ b/OvmfPkg/Library/SmbiosVersionLib/DetectSmbiosVersionLib.c @@ -98,7 +98,7 @@ DetectSmbiosVersion ( DEBUG (( DEBUG_INFO, "%a: SMBIOS 3.x DocRev from QEMU: 0x%02x\n", - __FUNCTION__, + __func__, QemuAnchor.V3.DocRev )); PcdStatus =3D PcdSet8S (PcdSmbiosDocRev, QemuAnchor.V3.DocRev); @@ -112,7 +112,7 @@ DetectSmbiosVersion ( DEBUG (( DEBUG_INFO, "%a: SMBIOS version from QEMU: 0x%04x\n", - __FUNCTION__, + __func__, SmbiosVersion )); PcdStatus =3D PcdSet16S (PcdSmbiosVersion, SmbiosVersion); diff --git a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c b/OvmfPk= g/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c index a1dd10c9f23b..a009123dae88 100644 --- a/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c +++ b/OvmfPkg/Library/SmmCpuFeaturesLib/SmmCpuFeaturesLib.c @@ -220,7 +220,7 @@ InitCpuHotEjectData ( RETURN_ERROR (SafeUintnAdd (Size, sizeof (*mCpuHotEjectData), &Size)= ) || RETURN_ERROR (SafeUintnAdd (Size, sizeof (UINT64) - 1, &Size))) { - DEBUG ((DEBUG_ERROR, "%a: invalid CPU_HOT_EJECT_DATA\n", __FUNCTION__)= ); + DEBUG ((DEBUG_ERROR, "%a: invalid CPU_HOT_EJECT_DATA\n", __func__)); goto Fatal; } =20 @@ -303,7 +303,7 @@ SmmCpuFeaturesSmmRelocationComplete ( DEBUG (( DEBUG_ERROR, "%a: MemEncryptSevSetPageEncMask(): %r\n", - __FUNCTION__, + __func__, Status )); ASSERT (FALSE); diff --git a/OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.c b/OvmfPkg/= Library/TlsAuthConfigLib/TlsAuthConfigLib.c index e22de4f5d48e..e4bec93fed1f 100644 --- a/OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.c +++ b/OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.c @@ -51,7 +51,7 @@ SetCaCerts ( DEBUG_VERBOSE, "%a:%a: not touching CA cert list\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); return; } @@ -83,7 +83,7 @@ SetCaCerts ( DEBUG_ERROR, "%a:%a: failed to delete %g:\"%s\"\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, &gEfiTlsCaCertificateGuid, EFI_TLS_CA_CERTIFICATE_VARIABLE )); @@ -96,7 +96,7 @@ SetCaCerts ( DEBUG_VERBOSE, "%a:%a: applied empty CA cert list\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); return; } @@ -107,7 +107,7 @@ SetCaCerts ( DEBUG_ERROR, "%a:%a: failed to allocate HttpsCaCerts\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); return; } @@ -127,7 +127,7 @@ SetCaCerts ( DEBUG_ERROR, "%a:%a: failed to set %g:\"%s\": %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, &gEfiTlsCaCertificateGuid, EFI_TLS_CA_CERTIFICATE_VARIABLE, Status @@ -139,7 +139,7 @@ SetCaCerts ( DEBUG_VERBOSE, "%a:%a: stored CA cert list (%Lu byte(s))\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (UINT64)HttpsCaCertsSize )); =20 @@ -176,7 +176,7 @@ SetCipherSuites ( DEBUG_VERBOSE, "%a:%a: not touching cipher suites\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); return; } @@ -204,7 +204,7 @@ SetCipherSuites ( DEBUG_ERROR, "%a:%a: failed to delete %g:\"%s\"\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, &gEdkiiHttpTlsCipherListGuid, EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE )); @@ -216,7 +216,7 @@ SetCipherSuites ( DEBUG_ERROR, "%a:%a: list of cipher suites must not be empty\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); Status =3D EFI_INVALID_PARAMETER; goto Done; @@ -228,7 +228,7 @@ SetCipherSuites ( DEBUG_ERROR, "%a:%a: failed to allocate HttpsCiphers\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); Status =3D EFI_OUT_OF_RESOURCES; goto Done; @@ -249,7 +249,7 @@ SetCipherSuites ( DEBUG_ERROR, "%a:%a: failed to set %g:\"%s\"\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, &gEdkiiHttpTlsCipherListGuid, EDKII_HTTP_TLS_CIPHER_LIST_VARIABLE )); @@ -260,7 +260,7 @@ SetCipherSuites ( DEBUG_VERBOSE, "%a:%a: stored list of cipher suites (%Lu byte(s))\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (UINT64)HttpsCiphersSize )); =20 diff --git a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c b/OvmfP= kg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c index 831dc1736d28..fac3242257a2 100644 --- a/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c +++ b/OvmfPkg/Library/VirtioMmioDeviceLib/VirtioMmioDevice.c @@ -85,7 +85,7 @@ VirtioMmioInit ( DEBUG (( DEBUG_INFO, "%a virtio 0.9.5, id %d\n", - __FUNCTION__, + __func__, Device->VirtioDevice.SubSystemDeviceId )); Device->VirtioDevice.Revision =3D VIRTIO_SPEC_REVISION (0, 9, 5); @@ -94,7 +94,7 @@ VirtioMmioInit ( DEBUG (( DEBUG_INFO, "%a virtio 1.0, id %d\n", - __FUNCTION__, + __func__, Device->VirtioDevice.SubSystemDeviceId )); Device->VirtioDevice.Revision =3D VIRTIO_SPEC_REVISION (1, 0, 0); diff --git a/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c b/Ov= mfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c index 248a03e8db0b..a7ab43ca7415 100644 --- a/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c +++ b/OvmfPkg/Library/X86QemuLoadImageLib/X86QemuLoadImageLib.c @@ -394,7 +394,7 @@ QemuLoadKernelImage ( DEBUG (( DEBUG_ERROR, "%a: QemuLoadLegacyImage(): %r\n", - __FUNCTION__, + __func__, Status )); return Status; @@ -404,7 +404,7 @@ QemuLoadKernelImage ( return EFI_SUCCESS; =20 default: - DEBUG ((DEBUG_ERROR, "%a: LoadImage(): %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: LoadImage(): %r\n", __func__, Status)); return Status; } =20 @@ -443,7 +443,7 @@ QemuLoadKernelImage ( DEBUG (( DEBUG_ERROR, "%a: kernel command line is not NUL-terminated\n", - __FUNCTION__ + __func__ )); Status =3D EFI_PROTOCOL_ERROR; goto FreeCommandLine; @@ -492,7 +492,7 @@ QemuLoadKernelImage ( DEBUG (( DEBUG_INFO, "%a: command line: \"%s\"\n", - __FUNCTION__, + __func__, (CHAR16 *)KernelLoadedImage->LoadOptions )); } diff --git a/OvmfPkg/Library/XenIoMmioLib/XenIoMmioLib.c b/OvmfPkg/Library/= XenIoMmioLib/XenIoMmioLib.c index caf4a28e1f29..db4973406ad1 100644 --- a/OvmfPkg/Library/XenIoMmioLib/XenIoMmioLib.c +++ b/OvmfPkg/Library/XenIoMmioLib/XenIoMmioLib.c @@ -91,7 +91,7 @@ XenIoMmioInstall ( &mXenBusRootDevicePathTemplate ); if (!XenBusDevicePath) { - DEBUG ((DEBUG_ERROR, "%a: Out of memory\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Out of memory\n", __func__)); Status =3D EFI_OUT_OF_RESOURCES; goto FreeXenIo; } @@ -115,7 +115,7 @@ XenIoMmioInstall ( DEBUG_ERROR, "%a: Failed to install the EFI_DEVICE_PATH and " "XENIO_PROTOCOL protocols on handle %p (Status =3D=3D %r)\n", - __FUNCTION__, + __func__, OutHandle, Status )); diff --git a/OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShell= Command.c b/OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellC= ommand.c index 40c464ce16b6..2edd92c7545c 100644 --- a/OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand= .c +++ b/OvmfPkg/LinuxInitrdDynamicShellCommand/LinuxInitrdDynamicShellCommand= .c @@ -204,7 +204,7 @@ CacheInitrdFile ( DEBUG (( DEBUG_WARN, "%a: failed to read initrd file - %r 0x%lx 0x%lx\n", - __FUNCTION__, + __func__, Status, (UINT64)ReadSize, FileSize diff --git a/OvmfPkg/LsiScsiDxe/LsiScsi.c b/OvmfPkg/LsiScsiDxe/LsiScsi.c index 1f52b85ed24e..86c8c6612df6 100644 --- a/OvmfPkg/LsiScsiDxe/LsiScsi.c +++ b/OvmfPkg/LsiScsiDxe/LsiScsi.c @@ -512,7 +512,7 @@ LsiScsiProcessRequest ( DEBUG (( DEBUG_VERBOSE, "%a: dstat: %02X, sist0: %02X, sist1: %02X\n", - __FUNCTION__, + __func__, DStat, SIst0, SIst1 @@ -800,7 +800,7 @@ LsiScsiExitBoot ( LSI_SCSI_DEV *Dev; =20 Dev =3D Context; - DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __FUNCTION__, Context)); + DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __func__, Context)); LsiScsiReset (Dev); } =20 diff --git a/OvmfPkg/MptScsiDxe/MptScsi.c b/OvmfPkg/MptScsiDxe/MptScsi.c index f64ccec24da8..348acafcf0dc 100644 --- a/OvmfPkg/MptScsiDxe/MptScsi.c +++ b/OvmfPkg/MptScsiDxe/MptScsi.c @@ -278,7 +278,7 @@ ReportHostAdapterError ( OUT EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *Packet ) { - DEBUG ((DEBUG_ERROR, "%a: fatal error in scsi request\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: fatal error in scsi request\n", __func__)); Packet->InTransferLength =3D 0; Packet->OutTransferLength =3D 0; Packet->SenseDataLength =3D 0; @@ -509,7 +509,7 @@ MptScsiHandleReply ( Packet->HostAdapterStatus =3D EFI_EXT_SCSI_STATUS_HOST_ADAPTER_OK; Packet->TargetStatus =3D EFI_EXT_SCSI_STATUS_TARGET_GOOD; } else if ((Reply & BIT31) !=3D 0) { - DEBUG ((DEBUG_INFO, "%a: Full reply returned\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Full reply returned\n", __func__)); // // When reply MSB is set, we got a full reply. Since we submitted only= one // reply frame, we know it's IoReply. @@ -549,7 +549,7 @@ MptScsiHandleReply ( return EFI_DEVICE_ERROR; } } else { - DEBUG ((DEBUG_ERROR, "%a: unexpected reply (%x)\n", __FUNCTION__, Repl= y)); + DEBUG ((DEBUG_ERROR, "%a: unexpected reply (%x)\n", __func__, Reply)); return ReportHostAdapterError (Packet); } =20 @@ -785,7 +785,7 @@ MptScsiExitBoot ( MPT_SCSI_DEV *Dev; =20 Dev =3D Context; - DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __FUNCTION__, Context)); + DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __func__, Context)); MptScsiReset (Dev); } =20 @@ -940,7 +940,7 @@ MptScsiControllerStart ( DEBUG (( DEBUG_WARN, "%a: failed to enable 64-bit DMA addresses\n", - __FUNCTION__ + __func__ )); } =20 diff --git a/OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c b/OvmfPkg/PciHotPlu= gInitDxe/PciHotPlugInit.c index 3f9c84cf2b54..6b2b6797b3b6 100644 --- a/OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c +++ b/OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.c @@ -572,7 +572,7 @@ GetResourcePadding ( DEBUG (( DEBUG_VERBOSE, "%a: Address=3D%02x:%02x.%x DevicePath=3D%s\n", - __FUNCTION__, + __func__, Address->Bus, Address->Device, Address->Function, @@ -613,11 +613,11 @@ GetResourcePadding ( DEBUG_VERBOSE, "%a: BusNumbers=3D0x%x Io=3D0x%Lx NonPrefetchable32BitMmio=3D0x%x\n" "%a: Prefetchable32BitMmio=3D0x%x Prefetchable64BitMmio=3D0x%Lx\n", - __FUNCTION__, + __func__, ReservationHint.BusNumbers, ReservationHint.Io, ReservationHint.NonPrefetchable32BitMmio, - __FUNCTION__, + __func__, ReservationHint.Prefetchable32BitMmio, ReservationHint.Prefetchable64BitMmio )); diff --git a/OvmfPkg/PlatformDxe/Platform.c b/OvmfPkg/PlatformDxe/Platform.c index e58e75eb2203..cd3bfd554c98 100644 --- a/OvmfPkg/PlatformDxe/Platform.c +++ b/OvmfPkg/PlatformDxe/Platform.c @@ -239,7 +239,7 @@ ExtractConfig ( UINTN Size; BOOLEAN AllocatedRequest; =20 - DEBUG ((DEBUG_VERBOSE, "%a: Request=3D\"%s\"\n", __FUNCTION__, Request)); + DEBUG ((DEBUG_VERBOSE, "%a: Request=3D\"%s\"\n", __func__, Request)); =20 if ((Progress =3D=3D NULL) || (Results =3D=3D NULL)) { return EFI_INVALID_PARAMETER; @@ -321,12 +321,12 @@ ExtractConfig ( DEBUG (( DEBUG_ERROR, "%a: BlockToConfig(): %r, Progress=3D\"%s\"\n", - __FUNCTION__, + __func__, Status, (Status =3D=3D EFI_DEVICE_ERROR) ? NULL : *Progress )); } else { - DEBUG ((DEBUG_VERBOSE, "%a: Results=3D\"%s\"\n", __FUNCTION__, *Result= s)); + DEBUG ((DEBUG_VERBOSE, "%a: Results=3D\"%s\"\n", __func__, *Results)); } =20 // @@ -431,7 +431,7 @@ RouteConfig ( DEBUG (( DEBUG_VERBOSE, "%a: Configuration=3D\"%s\"\n", - __FUNCTION__, + __func__, Configuration )); =20 @@ -481,7 +481,7 @@ RouteConfig ( DEBUG (( DEBUG_ERROR, "%a: ConfigToBlock(): %r, Progress=3D\"%s\"\n", - __FUNCTION__, + __func__, Status, (Status =3D=3D EFI_BUFFER_TOO_SMALL) ? NULL : *Progress )); @@ -514,7 +514,7 @@ Callback ( DEBUG (( DEBUG_VERBOSE, "%a: Action=3D0x%Lx QuestionId=3D%d Type=3D%d\n", - __FUNCTION__, + __func__, (UINT64)Action, QuestionId, Type @@ -835,7 +835,7 @@ ExecutePlatformConfig ( DEBUG (( (Status =3D=3D EFI_NOT_FOUND) ? DEBUG_VERBOSE : DEBUG_ERROR, "%a: failed to load platform config: %r\n", - __FUNCTION__, + __func__, Status )); return Status; diff --git a/OvmfPkg/PlatformPei/ClearCache.c b/OvmfPkg/PlatformPei/ClearCa= che.c index 9f23f9a42847..9e59f31df7fd 100644 --- a/OvmfPkg/PlatformPei/ClearCache.c +++ b/OvmfPkg/PlatformPei/ClearCache.c @@ -59,7 +59,7 @@ ClearCacheOnMpServicesAvailable ( EFI_PEI_MP_SERVICES_PPI *MpServices; EFI_STATUS Status; =20 - DEBUG ((DEBUG_INFO, "%a: %a\n", gEfiCallerBaseName, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: %a\n", gEfiCallerBaseName, __func__)); =20 // // Clear cache on all the APs in parallel. @@ -74,7 +74,7 @@ ClearCacheOnMpServicesAvailable ( NULL // ProcedureArgument ); if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_STARTED)) { - DEBUG ((DEBUG_ERROR, "%a: StartupAllAps(): %r\n", __FUNCTION__, Status= )); + DEBUG ((DEBUG_ERROR, "%a: StartupAllAps(): %r\n", __func__, Status)); return Status; } =20 @@ -108,7 +108,7 @@ InstallClearCacheCallback ( DEBUG (( DEBUG_ERROR, "%a: failed to set up MP Services callback: %r\n", - __FUNCTION__, + __func__, Status )); } diff --git a/OvmfPkg/PlatformPei/FeatureControl.c b/OvmfPkg/PlatformPei/Fea= tureControl.c index d8a398cd5565..d2ec496b74a8 100644 --- a/OvmfPkg/PlatformPei/FeatureControl.c +++ b/OvmfPkg/PlatformPei/FeatureControl.c @@ -85,7 +85,7 @@ OnMpServicesAvailable ( =20 PlatformInfoHob =3D (EFI_HOB_PLATFORM_INFO *)GET_GUID_HOB_DATA (GuidHob); =20 - DEBUG ((DEBUG_VERBOSE, "%a: %a\n", gEfiCallerBaseName, __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: %a\n", gEfiCallerBaseName, __func__)); =20 // // Write the MSR on all the APs in parallel. @@ -100,7 +100,7 @@ OnMpServicesAvailable ( PlatformInfoHob // ProcedureArgument ); if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_STARTED)) { - DEBUG ((DEBUG_ERROR, "%a: StartupAllAps(): %r\n", __FUNCTION__, Status= )); + DEBUG ((DEBUG_ERROR, "%a: StartupAllAps(): %r\n", __func__, Status)); return Status; } =20 @@ -154,7 +154,7 @@ InstallFeatureControlCallback ( DEBUG (( DEBUG_ERROR, "%a: failed to set up MP Services callback: %r\n", - __FUNCTION__, + __func__, Status )); } diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetec= t.c index 41d186986ba8..0c755c4940bb 100644 --- a/OvmfPkg/PlatformPei/MemDetect.c +++ b/OvmfPkg/PlatformPei/MemDetect.c @@ -75,7 +75,7 @@ Q35TsegMbytesInitialization ( DEBUG (( DEBUG_INFO, "%a: QEMU offers an extended TSEG (%d MB)\n", - __FUNCTION__, + __func__, ExtendedTsegMbytes )); PcdStatus =3D PcdSet16S (PcdQ35TsegMbytes, ExtendedTsegMbytes); @@ -97,7 +97,7 @@ Q35SmramAtDefaultSmbaseInitialization ( DEBUG (( DEBUG_INFO, "%a: SMRAM at default SMBASE not checked due to CSM\n", - __FUNCTION__ + __func__ )); } else { UINTN CtlReg; @@ -111,7 +111,7 @@ Q35SmramAtDefaultSmbaseInitialization ( DEBUG (( DEBUG_INFO, "%a: SMRAM at default SMBASE %a\n", - __FUNCTION__, + __func__, PlatformInfoHob->Q35SmramAtDefaultSmbase ? "found" : "not found" )); } @@ -152,7 +152,7 @@ AddressWidthInitialization ( DEBUG (( DEBUG_INFO, "%a: disabling 64-bit PCI host aperture\n", - __FUNCTION__ + __func__ )); PcdStatus =3D PcdSet64S (PcdPciMmio64Size, 0); ASSERT_RETURN_ERROR (PcdStatus); @@ -175,7 +175,7 @@ AddressWidthInitialization ( DEBUG (( DEBUG_INFO, "%a: Pci64Base=3D0x%Lx Pci64Size=3D0x%Lx\n", - __FUNCTION__, + __func__, PlatformInfoHob->PcdPciMmio64Base, PlatformInfoHob->PcdPciMmio64Size )); @@ -307,7 +307,7 @@ PublishPeiMemory ( DEBUG (( DEBUG_INFO, "%a: PhysMemAddressWidth=3D%d PeiMemoryCap=3D%u KB\n", - __FUNCTION__, + __func__, PlatformInfoHob->PhysMemAddressWidth, PeiMemoryCap >> 10 )); diff --git a/OvmfPkg/PlatformPei/MemTypeInfo.c b/OvmfPkg/PlatformPei/MemTyp= eInfo.c index eb37febb31ae..ea049b21cfc0 100644 --- a/OvmfPkg/PlatformPei/MemTypeInfo.c +++ b/OvmfPkg/PlatformPei/MemTypeInfo.c @@ -100,7 +100,7 @@ RefreshMemTypeInfo ( // If the UEFI variable couldn't be read for some other reason, we // similarly can't use it for udpating mMemoryTypeInformation. // - DEBUG ((DEBUG_ERROR, "%a: GetVariable(): %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: GetVariable(): %r\n", __func__, Status)); return; } =20 @@ -111,7 +111,7 @@ RefreshMemTypeInfo ( DEBUG (( DEBUG_ERROR, "%a: invalid UEFI variable size %Lu\n", - __FUNCTION__, + __func__, (UINT64)DataSize )); return; @@ -151,7 +151,7 @@ RefreshMemTypeInfo ( DEBUG (( DEBUG_VERBOSE, "%a: Type 0x%x: NumberOfPages 0x%x -> 0x%x\n", - __FUNCTION__, + __func__, HobRecord->Type, HobRecord->NumberOfPages, VariableRecord->NumberOfPages @@ -183,7 +183,7 @@ OnReadOnlyVariable2Available ( IN VOID *Ppi ) { - DEBUG ((DEBUG_VERBOSE, "%a\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a\n", __func__)); =20 RefreshMemTypeInfo (Ppi); BuildMemTypeInfoHob (); @@ -222,7 +222,7 @@ MemTypeInfoInitialization ( DEBUG (( DEBUG_ERROR, "%a: failed to set up R/O Variable 2 callback: %r\n", - __FUNCTION__, + __func__, Status )); ASSERT (FALSE); diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index 148240342b4b..cc9384ba5c4e 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -114,7 +114,7 @@ MicrovmInitialization ( =20 Status =3D QemuFwCfgFindFile ("etc/fdt", &FdtItem, &FdtSize); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a: no etc/fdt found in fw_cfg, using dummy\n", _= _FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: no etc/fdt found in fw_cfg, using dummy\n", _= _func__)); FdtItem =3D 0; FdtSize =3D sizeof (EmptyFdt); } @@ -122,7 +122,7 @@ MicrovmInitialization ( FdtPages =3D EFI_SIZE_TO_PAGES (FdtSize); NewBase =3D AllocatePages (FdtPages); if (NewBase =3D=3D NULL) { - DEBUG ((DEBUG_INFO, "%a: AllocatePages failed\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: AllocatePages failed\n", __func__)); return; } =20 @@ -135,14 +135,14 @@ MicrovmInitialization ( =20 FdtHobData =3D BuildGuidHob (&gFdtHobGuid, sizeof (*FdtHobData)); if (FdtHobData =3D=3D NULL) { - DEBUG ((DEBUG_INFO, "%a: BuildGuidHob failed\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: BuildGuidHob failed\n", __func__)); return; } =20 DEBUG (( DEBUG_INFO, "%a: fdt at 0x%x (size %d)\n", - __FUNCTION__, + __func__, NewBase, FdtSize )); @@ -158,7 +158,7 @@ MiscInitializationForMicrovm ( =20 ASSERT (PlatformInfoHob->HostBridgeDevId =3D=3D 0xffff); =20 - DEBUG ((DEBUG_INFO, "%a: microvm\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: microvm\n", __func__)); // // Disable A20 Mask // @@ -240,17 +240,17 @@ S3Verification ( DEBUG (( DEBUG_ERROR, "%a: S3Resume2Pei doesn't support X64 PEI + SMM yet.\n", - __FUNCTION__ + __func__ )); DEBUG (( DEBUG_ERROR, "%a: Please disable S3 on the QEMU command line (see the README),\n", - __FUNCTION__ + __func__ )); DEBUG (( DEBUG_ERROR, "%a: or build OVMF with \"OvmfPkgIa32X64.dsc\".\n", - __FUNCTION__ + __func__ )); ASSERT (FALSE); CpuDeadLoop (); @@ -273,7 +273,7 @@ Q35BoardVerification ( DEBUG_ERROR, "%a: no TSEG (SMRAM) on host bridge DID=3D0x%04x; " "only DID=3D0x%04x (Q35) is supported\n", - __FUNCTION__, + __func__, PlatformInfoHob->HostBridgeDevId, INTEL_Q35_MCH_DEVICE_ID )); diff --git a/OvmfPkg/PvScsiDxe/PvScsi.c b/OvmfPkg/PvScsiDxe/PvScsi.c index 47cc0ae59bf8..6ec5040f7ef2 100644 --- a/OvmfPkg/PvScsiDxe/PvScsi.c +++ b/OvmfPkg/PvScsiDxe/PvScsi.c @@ -904,7 +904,7 @@ PvScsiSetPciAttributes ( DEBUG (( DEBUG_WARN, "%a: failed to enable 64-bit DMA addresses\n", - __FUNCTION__ + __func__ )); } =20 @@ -1279,7 +1279,7 @@ PvScsiExitBoot ( PVSCSI_DEV *Dev; =20 Dev =3D Context; - DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __FUNCTION__, Context)); + DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __func__, Context)); =20 // // Reset the device to stop device usage of the rings. diff --git a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c b/OvmfPk= g/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c index d4f3cd92255f..3c12085f6c1e 100644 --- a/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c +++ b/OvmfPkg/QemuKernelLoaderFsDxe/QemuKernelLoaderFsDxe.c @@ -968,7 +968,7 @@ FetchBlob ( DEBUG (( DEBUG_ERROR, "%a: failed to allocate %Ld bytes for \"%s\"\n", - __FUNCTION__, + __func__, (INT64)Blob->Size, Blob->Name )); @@ -978,7 +978,7 @@ FetchBlob ( DEBUG (( DEBUG_INFO, "%a: loading %Ld bytes for \"%s\"\n", - __FUNCTION__, + __func__, (INT64)Blob->Size, Blob->Name )); @@ -1001,7 +1001,7 @@ FetchBlob ( DEBUG (( DEBUG_VERBOSE, "%a: %Ld bytes remaining for \"%s\" (%d)\n", - __FUNCTION__, + __func__, (INT64)Left, Blob->Name, (INT32)Idx @@ -1051,7 +1051,7 @@ QemuKernelLoaderFsDxeEntrypoint ( =20 Status =3D gRT->GetTime (&mInitTime, NULL /* Capabilities */); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: GetTime(): %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: GetTime(): %r\n", __func__, Status)); return Status; } =20 @@ -1101,7 +1101,7 @@ QemuKernelLoaderFsDxeEntrypoint ( DEBUG (( DEBUG_ERROR, "%a: InstallMultipleProtocolInterfaces(): %r\n", - __FUNCTION__, + __func__, Status )); goto FreeBlobs; @@ -1121,7 +1121,7 @@ QemuKernelLoaderFsDxeEntrypoint ( DEBUG (( DEBUG_ERROR, "%a: InstallMultipleProtocolInterfaces(): %r\n", - __FUNCTION__, + __func__, Status )); goto UninstallFileSystemHandle; diff --git a/OvmfPkg/QemuRamfbDxe/QemuRamfb.c b/OvmfPkg/QemuRamfbDxe/QemuRa= mfb.c index f5113fbc78a6..5a1044f0dc7b 100644 --- a/OvmfPkg/QemuRamfbDxe/QemuRamfb.c +++ b/OvmfPkg/QemuRamfbDxe/QemuRamfb.c @@ -189,7 +189,7 @@ QemuRamfbGraphicsOutputSetMode ( DEBUG (( DEBUG_WARN, "%a: clearing the screen failed: %r\n", - __FUNCTION__, + __func__, Status )); } diff --git a/OvmfPkg/QemuVideoDxe/Gop.c b/OvmfPkg/QemuVideoDxe/Gop.c index 7a9fe208c99c..b11eed7558bf 100644 --- a/OvmfPkg/QemuVideoDxe/Gop.c +++ b/OvmfPkg/QemuVideoDxe/Gop.c @@ -37,7 +37,7 @@ QemuVideoCompleteModeInfo ( Info->PixelInformation.BlueMask =3D 0; Info->PixelInformation.ReservedMask =3D 0; } else { - DEBUG ((DEBUG_ERROR, "%a: Invalid ColorDepth %u", __FUNCTION__, ModeDa= ta->ColorDepth)); + DEBUG ((DEBUG_ERROR, "%a: Invalid ColorDepth %u", __func__, ModeData->= ColorDepth)); ASSERT (FALSE); } =20 diff --git a/OvmfPkg/QemuVideoDxe/Initialize.c b/OvmfPkg/QemuVideoDxe/Initi= alize.c index 2a3cbc65c32a..050ae878ecde 100644 --- a/OvmfPkg/QemuVideoDxe/Initialize.c +++ b/OvmfPkg/QemuVideoDxe/Initialize.c @@ -310,7 +310,7 @@ QemuVideoBochsEdid ( DEBUG (( DEBUG_INFO, "%a: mmio read failed\n", - __FUNCTION__ + __func__ )); return; } @@ -321,7 +321,7 @@ QemuVideoBochsEdid ( DEBUG (( DEBUG_INFO, "%a: magic check failed\n", - __FUNCTION__ + __func__ )); return; } @@ -329,7 +329,7 @@ QemuVideoBochsEdid ( DEBUG (( DEBUG_INFO, "%a: blob found (extensions: %d)\n", - __FUNCTION__, + __func__, Private->Edid[126] )); =20 @@ -339,7 +339,7 @@ QemuVideoBochsEdid ( DEBUG (( DEBUG_INFO, "%a: no detailed timing descriptor\n", - __FUNCTION__ + __func__ )); return; } @@ -349,7 +349,7 @@ QemuVideoBochsEdid ( DEBUG (( DEBUG_INFO, "%a: default resolution: %dx%d\n", - __FUNCTION__, + __func__, *XRes, *YRes )); @@ -436,7 +436,7 @@ QemuVideoBochsModeSetup ( DEBUG_ERROR, "%a: can't read size of drawable buffer from QXL " "ROM\n", - __FUNCTION__ + __func__ )); return EFI_NOT_FOUND; } @@ -448,7 +448,7 @@ QemuVideoBochsModeSetup ( DEBUG (( DEBUG_INFO, "%a: AvailableFbSize=3D0x%x\n", - __FUNCTION__, + __func__, AvailableFbSize )); =20 diff --git a/OvmfPkg/QemuVideoDxe/VbeShim.c b/OvmfPkg/QemuVideoDxe/VbeShim.c index 2a048211a823..8f151b96f9a5 100644 --- a/OvmfPkg/QemuVideoDxe/VbeShim.c +++ b/OvmfPkg/QemuVideoDxe/VbeShim.c @@ -73,12 +73,12 @@ InstallVbeShim ( DEBUG (( DEBUG_WARN, "%a: page 0 protected, not installing VBE shim\n", - __FUNCTION__ + __func__ )); DEBUG (( DEBUG_WARN, "%a: page 0 protection prevents Windows 7 from booting anyway\n", - __FUNCTION__ + __func__ )); return; } @@ -117,7 +117,7 @@ InstallVbeShim ( DEBUG (( DEBUG_INFO, "%a: Video BIOS handler found at %04x:%04x\n", - __FUNCTION__, + __func__, Int0x10->Segment, Int0x10->Offset )); @@ -131,7 +131,7 @@ InstallVbeShim ( DEBUG (( DEBUG_INFO, "%a: failed to allocate page at zero: %r\n", - __FUNCTION__, + __func__, Segment0AllocationStatus )); } else { @@ -162,7 +162,7 @@ InstallVbeShim ( DEBUG (( DEBUG_ERROR, "%a: unknown host bridge device ID: 0x%04x\n", - __FUNCTION__, + __func__, HostBridgeDevId )); ASSERT (FALSE); @@ -324,5 +324,5 @@ InstallVbeShim ( Int0x10->Segment =3D (UINT16)((UINT32)SegmentC >> 4); Int0x10->Offset =3D (UINT16)((UINTN)(VbeModeInfo + 1) - SegmentC); =20 - DEBUG ((DEBUG_INFO, "%a: VBE shim installed\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: VBE shim installed\n", __func__)); } diff --git a/OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/PlatformBm.c = b/OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/PlatformBm.c index 2559889638ad..be4316f320f9 100644 --- a/OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/PlatformBm.c +++ b/OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/PlatformBm.c @@ -193,7 +193,7 @@ FilterAndProcess ( DEBUG (( DEBUG_VERBOSE, "%a: %g: %r\n", - __FUNCTION__, + __func__, ProtocolGuid, Status )); @@ -264,7 +264,7 @@ IsPciDisplay ( &Pci ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __FUNCTION__, ReportText, Status)= ); + DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __func__, ReportText, Status)); return FALSE; } =20 @@ -413,7 +413,7 @@ IsVirtioPciRng ( return FALSE; =20 PciError: - DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __FUNCTION__, ReportText, Status)); + DEBUG ((DEBUG_ERROR, "%a: %s: %r\n", __func__, ReportText, Status)); return FALSE; } =20 @@ -440,7 +440,7 @@ Connect ( DEBUG (( EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: %s: %r\n", - __FUNCTION__, + __func__, ReportText, Status )); @@ -466,7 +466,7 @@ AddOutput ( DEBUG (( DEBUG_ERROR, "%a: %s: handle %p: device path not found\n", - __FUNCTION__, + __func__, ReportText, Handle )); @@ -478,7 +478,7 @@ AddOutput ( DEBUG (( DEBUG_ERROR, "%a: %s: adding to ConOut: %r\n", - __FUNCTION__, + __func__, ReportText, Status )); @@ -490,7 +490,7 @@ AddOutput ( DEBUG (( DEBUG_ERROR, "%a: %s: adding to ErrOut: %r\n", - __FUNCTION__, + __func__, ReportText, Status )); @@ -500,7 +500,7 @@ AddOutput ( DEBUG (( DEBUG_VERBOSE, "%a: %s: added to ConOut and ErrOut\n", - __FUNCTION__, + __func__, ReportText )); } @@ -701,7 +701,7 @@ RemoveStaleFvFileOptions ( DEBUG (( EFI_ERROR (Status) ? DEBUG_WARN : DEBUG_VERBOSE, "%a: removing stale Boot#%04x %s: %r\n", - __FUNCTION__, + __func__, (UINT32)BootOptions[Index].OptionNumber, DevicePathString =3D=3D NULL ? L"" : DevicePathString, Status @@ -879,7 +879,7 @@ PlatformBootManagerBeforeConsole ( DEBUG (( EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: SetVariable(%s, %u): %r\n", - __FUNCTION__, + __func__, EFI_TIME_OUT_VARIABLE_NAME, FrontPageTimeout, Status diff --git a/OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/QemuKernel.c = b/OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/QemuKernel.c index 736628174f4e..c1ed425da00b 100644 --- a/OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/QemuKernel.c +++ b/OvmfPkg/RiscVVirt/Library/PlatformBootManagerLib/QemuKernel.c @@ -66,7 +66,7 @@ TryRunningQemuKernel ( DEBUG (( DEBUG_ERROR, "%a: QemuStartKernelImage(): %r\n", - __FUNCTION__, + __func__, Status )); } diff --git a/OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListP= ointer.c b/OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPoi= nter.c index a58b7aae6bee..4035ba8d850a 100644 --- a/OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPointer.c +++ b/OvmfPkg/RiscVVirt/Library/PrePiHobListPointerLib/PrePiHobListPointer.c @@ -31,7 +31,7 @@ PrePeiGetHobList ( GetFirmwareContextPointer (&FirmwareContext); =20 if (FirmwareContext =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Firmware Context is NULL\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Firmware Context is NULL\n", __func__)); return NULL; } =20 @@ -56,7 +56,7 @@ PrePeiSetHobList ( GetFirmwareContextPointer (&FirmwareContext); =20 if (FirmwareContext =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Firmware Context is NULL\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Firmware Context is NULL\n", __func__)); return EFI_NOT_READY; } =20 diff --git a/OvmfPkg/RiscVVirt/Sec/Memory.c b/OvmfPkg/RiscVVirt/Sec/Memory.c index f7a72c7bb4fb..0e2690c73687 100644 --- a/OvmfPkg/RiscVVirt/Sec/Memory.c +++ b/OvmfPkg/RiscVVirt/Sec/Memory.c @@ -97,7 +97,7 @@ InitMmu ( // Set supervisor translation mode to Bare mode // RiscVSetSupervisorAddressTranslationRegister ((UINT64)SATP_MODE_OFF << 6= 0); - DEBUG ((DEBUG_INFO, "%a: Set Supervisor address mode to bare-metal mode.= \n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Set Supervisor address mode to bare-metal mode.= \n", __func__)); } =20 /** @@ -276,13 +276,13 @@ MemoryPeimInitialization ( GetFirmwareContextPointer (&FirmwareContext); =20 if (FirmwareContext =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Firmware Context is NULL\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Firmware Context is NULL\n", __func__)); return EFI_UNSUPPORTED; } =20 FdtPointer =3D (VOID *)FirmwareContext->FlattenedDeviceTree; if (FdtPointer =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Invalid FDT pointer\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Invalid FDT pointer\n", __func__)); return EFI_UNSUPPORTED; } =20 @@ -306,7 +306,7 @@ MemoryPeimInitialization ( DEBUG (( DEBUG_INFO, "%a: System RAM @ 0x%lx - 0x%lx\n", - __FUNCTION__, + __func__, CurBase, CurBase + CurSize - 1 )); @@ -319,7 +319,7 @@ MemoryPeimInitialization ( DEBUG (( DEBUG_ERROR, "%a: Failed to parse FDT memory node\n", - __FUNCTION__ + __func__ )); } } diff --git a/OvmfPkg/RiscVVirt/Sec/Platform.c b/OvmfPkg/RiscVVirt/Sec/Platf= orm.c index e8fd126cf800..3645c27b0b12 100644 --- a/OvmfPkg/RiscVVirt/Sec/Platform.c +++ b/OvmfPkg/RiscVVirt/Sec/Platform.c @@ -43,20 +43,20 @@ PlatformPeimInitialization ( GetFirmwareContextPointer (&FirmwareContext); =20 if (FirmwareContext =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Firmware Context is NULL\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Firmware Context is NULL\n", __func__)); return EFI_UNSUPPORTED; } =20 FdtPointer =3D (VOID *)FirmwareContext->FlattenedDeviceTree; if (FdtPointer =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Invalid FDT pointer\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Invalid FDT pointer\n", __func__)); return EFI_UNSUPPORTED; } =20 - DEBUG ((DEBUG_INFO, "%a: Build FDT HOB - FDT at address: 0x%x \n", __FUN= CTION__, FdtPointer)); + DEBUG ((DEBUG_INFO, "%a: Build FDT HOB - FDT at address: 0x%x \n", __fun= c__, FdtPointer)); Base =3D FdtPointer; if (fdt_check_header (Base) !=3D 0) { - DEBUG ((DEBUG_ERROR, "%a: Corrupted DTB\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Corrupted DTB\n", __func__)); return EFI_UNSUPPORTED; } =20 @@ -64,7 +64,7 @@ PlatformPeimInitialization ( FdtPages =3D EFI_SIZE_TO_PAGES (FdtSize); NewBase =3D AllocatePages (FdtPages); if (NewBase =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Could not allocate memory for DTB\n", __FUNC= TION__)); + DEBUG ((DEBUG_ERROR, "%a: Could not allocate memory for DTB\n", __func= __)); return EFI_UNSUPPORTED; } =20 @@ -72,7 +72,7 @@ PlatformPeimInitialization ( =20 FdtHobData =3D BuildGuidHob (&gFdtHobGuid, sizeof *FdtHobData); if (FdtHobData =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Could not build FDT Hob\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Could not build FDT Hob\n", __func__)); return EFI_UNSUPPORTED; } =20 diff --git a/OvmfPkg/RiscVVirt/Sec/SecMain.c b/OvmfPkg/RiscVVirt/Sec/SecMai= n.c index adf73f2eb66c..b0520481782e 100644 --- a/OvmfPkg/RiscVVirt/Sec/SecMain.c +++ b/OvmfPkg/RiscVVirt/Sec/SecMain.c @@ -63,7 +63,7 @@ SecStartup ( DEBUG (( DEBUG_INFO, "%a() BootHartId: 0x%x, DeviceTreeAddress=3D0x%x\n", - __FUNCTION__, + __func__, BootHartId, DeviceTreeAddress )); diff --git a/OvmfPkg/Sec/SecMain.c b/OvmfPkg/Sec/SecMain.c index e96726d6eca8..31da5d0ace51 100644 --- a/OvmfPkg/Sec/SecMain.c +++ b/OvmfPkg/Sec/SecMain.c @@ -386,7 +386,7 @@ DecompressMemFvs ( DEBUG_VERBOSE, "%a: OutputBuffer@%p+0x%x ScratchBuffer@%p+0x%x " "PcdOvmfDecompressionScratchEnd=3D0x%x\n", - __FUNCTION__, + __func__, OutputBuffer, OutputBufferSize, ScratchBuffer, diff --git a/OvmfPkg/SmmAccess/SmmAccessPei.c b/OvmfPkg/SmmAccess/SmmAccess= Pei.c index 4be5f2423e17..0e57b7804cb2 100644 --- a/OvmfPkg/SmmAccess/SmmAccessPei.c +++ b/OvmfPkg/SmmAccess/SmmAccessPei.c @@ -263,7 +263,7 @@ SmmAccessPeiEntryPoint ( DEBUG_ERROR, "%a: no SMRAM with host bridge DID=3D0x%04x; only " "DID=3D0x%04x (Q35) is supported\n", - __FUNCTION__, + __func__, HostBridgeDevId, INTEL_Q35_MCH_DEVICE_ID )); @@ -283,7 +283,7 @@ SmmAccessPeiEntryPoint ( DEBUG (( DEBUG_ERROR, "%a: this Q35 implementation lacks SMRAM\n", - __FUNCTION__ + __func__ )); goto WrongConfig; } @@ -378,7 +378,7 @@ SmmAccessPeiEntryPoint ( DEBUG (( DEBUG_VERBOSE, "%a: SMRAM map follows, %d entries\n", - __FUNCTION__, + __func__, (INT32)Count )); DEBUG (( diff --git a/OvmfPkg/SmmControl2Dxe/SmiFeatures.c b/OvmfPkg/SmmControl2Dxe/= SmiFeatures.c index daeb7195aee7..4bd24bf11903 100644 --- a/OvmfPkg/SmmControl2Dxe/SmiFeatures.c +++ b/OvmfPkg/SmmControl2Dxe/SmiFeatures.c @@ -113,7 +113,7 @@ NegotiateSmiFeatures ( DEBUG (( DEBUG_INFO, "%a: SMI feature negotiation unavailable\n", - __FUNCTION__ + __func__ )); return FALSE; } @@ -129,7 +129,7 @@ NegotiateSmiFeatures ( DEBUG (( DEBUG_ERROR, "%a: size mismatch in feature negotiation\n", - __FUNCTION__ + __func__ )); goto FatalError; } @@ -168,7 +168,7 @@ NegotiateSmiFeatures ( DEBUG (( DEBUG_ERROR, "%a: negotiation failed for feature bitmap 0x%Lx\n", - __FUNCTION__, + __func__, mSmiFeatures )); goto FatalError; @@ -179,7 +179,7 @@ NegotiateSmiFeatures ( // If we can't get broadcast SMIs from QEMU, that's acceptable too, // although not optimal. // - DEBUG ((DEBUG_INFO, "%a: SMI broadcast unavailable\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: SMI broadcast unavailable\n", __func__)); } else { // // Configure the traditional AP sync / SMI delivery mode for @@ -192,31 +192,31 @@ NegotiateSmiFeatures ( DEBUG (( DEBUG_ERROR, "%a: PiSmmCpuDxeSmm PCD configuration failed\n", - __FUNCTION__ + __func__ )); goto FatalError; } =20 - DEBUG ((DEBUG_INFO, "%a: using SMI broadcast\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: using SMI broadcast\n", __func__)); } =20 if ((mSmiFeatures & ICH9_LPC_SMI_F_CPU_HOTPLUG) =3D=3D 0) { - DEBUG ((DEBUG_INFO, "%a: CPU hotplug not negotiated\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: CPU hotplug not negotiated\n", __func__)); } else { DEBUG (( DEBUG_INFO, "%a: CPU hotplug with SMI negotiated\n", - __FUNCTION__ + __func__ )); } =20 if ((mSmiFeatures & ICH9_LPC_SMI_F_CPU_HOT_UNPLUG) =3D=3D 0) { - DEBUG ((DEBUG_INFO, "%a: CPU hot-unplug not negotiated\n", __FUNCTION_= _)); + DEBUG ((DEBUG_INFO, "%a: CPU hot-unplug not negotiated\n", __func__)); } else { DEBUG (( DEBUG_INFO, "%a: CPU hot-unplug with SMI negotiated\n", - __FUNCTION__ + __func__ )); } =20 @@ -292,7 +292,7 @@ AppendFwCfgBootScript ( DEBUG (( DEBUG_VERBOSE, "%a: SMI feature negotiation boot script saved\n", - __FUNCTION__ + __func__ )); return; =20 diff --git a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c b/OvmfPkg/SmmControl2D= xe/SmmControl2Dxe.c index edbf8ac431e4..e7438b18ddcb 100644 --- a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c +++ b/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c @@ -205,7 +205,7 @@ SmmControl2DxeEntryPoint ( DEBUG (( DEBUG_ERROR, "%a: this Q35 implementation lacks SMI\n", - __FUNCTION__ + __func__ )); goto FatalError; } @@ -234,7 +234,7 @@ SmmControl2DxeEntryPoint ( DEBUG (( DEBUG_ERROR, "%a: failed to lock down GBL_SMI_EN\n", - __FUNCTION__ + __func__ )); goto FatalError; } @@ -260,7 +260,7 @@ SmmControl2DxeEntryPoint ( &mS3SaveStateInstalled ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: CreateEvent: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: CreateEvent: %r\n", __func__, Status)); goto FatalError; } =20 @@ -273,7 +273,7 @@ SmmControl2DxeEntryPoint ( DEBUG (( DEBUG_ERROR, "%a: RegisterProtocolNotify: %r\n", - __FUNCTION__, + __func__, Status )); goto ReleaseEvent; @@ -284,7 +284,7 @@ SmmControl2DxeEntryPoint ( // Status =3D gBS->SignalEvent (mS3SaveStateInstalled); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: SignalEvent: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: SignalEvent: %r\n", __func__, Status)); goto ReleaseEvent; } } @@ -303,7 +303,7 @@ SmmControl2DxeEntryPoint ( DEBUG (( DEBUG_ERROR, "%a: InstallMultipleProtocolInterfaces: %r\n", - __FUNCTION__, + __func__, Status )); goto ReleaseEvent; @@ -376,7 +376,7 @@ OnS3SaveStateInstalled ( DEBUG (( DEBUG_ERROR, "%a: EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE: %r\n", - __FUNCTION__, + __func__, Status )); ASSERT (FALSE); @@ -400,14 +400,14 @@ OnS3SaveStateInstalled ( DEBUG (( DEBUG_ERROR, "%a: EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE: %r\n", - __FUNCTION__, + __func__, Status )); ASSERT (FALSE); CpuDeadLoop (); } =20 - DEBUG ((DEBUG_VERBOSE, "%a: chipset boot script saved\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: chipset boot script saved\n", __func__)); =20 // // Append a boot script fragment that re-selects the negotiated SMI feat= ures. diff --git a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c b/OvmfPkg/Tcg/Tcg2Conf= ig/Tcg2ConfigPeim.c index 96771b193595..65bb1a92684e 100644 --- a/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c +++ b/OvmfPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c @@ -49,11 +49,11 @@ Tcg2ConfigPeimEntryPoint ( UINTN Size; EFI_STATUS Status; =20 - DEBUG ((DEBUG_INFO, "%a\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a\n", __func__)); =20 Status =3D InternalTpm12Detect (); if (!EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a: TPM1.2 detected\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: TPM1.2 detected\n", __func__)); Size =3D sizeof (gEfiTpmDeviceInstanceTpm12Guid); Status =3D PcdSetPtrS ( PcdTpmInstanceGuid, @@ -64,7 +64,7 @@ Tcg2ConfigPeimEntryPoint ( } else { Status =3D Tpm2RequestUseTpm (); if (!EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a: TPM2 detected\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: TPM2 detected\n", __func__)); Size =3D sizeof (gEfiTpmDeviceInstanceTpm20DtpmGuid); Status =3D PcdSetPtrS ( PcdTpmInstanceGuid, @@ -73,7 +73,7 @@ Tcg2ConfigPeimEntryPoint ( ); ASSERT_EFI_ERROR (Status); } else { - DEBUG ((DEBUG_INFO, "%a: no TPM detected\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: no TPM detected\n", __func__)); // // If no TPM2 was detected, we still need to install // TpmInitializationDonePpi. Namely, Tcg2Pei will exit early upon se= eing diff --git a/OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPeim.c b/Ovm= fPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPeim.c index 88bb9e8e042b..c671aa21ea6c 100644 --- a/OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPeim.c +++ b/OvmfPkg/Tcg/TpmMmioSevDecryptPei/TpmMmioSevDecryptPeim.c @@ -38,7 +38,7 @@ TpmMmioSevDecryptPeimEntryPoint ( RETURN_STATUS DecryptStatus; EFI_STATUS Status; =20 - DEBUG ((DEBUG_INFO, "%a\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a\n", __func__)); =20 // // If SEV is active, MMIO succeeds against an encrypted physical address @@ -60,7 +60,7 @@ TpmMmioSevDecryptPeimEntryPoint ( DEBUG (( DEBUG_INFO, "%a: mapping TPM MMIO address range unencrypted\n", - __FUNCTION__ + __func__ )); =20 DecryptStatus =3D MemEncryptSevClearMmioPageEncMask ( @@ -73,7 +73,7 @@ TpmMmioSevDecryptPeimEntryPoint ( DEBUG (( DEBUG_ERROR, "%a: failed to map TPM MMIO address range unencrypted\n", - __FUNCTION__ + __func__ )); ASSERT_RETURN_ERROR (DecryptStatus); } diff --git a/OvmfPkg/TdxDxe/TdxAcpiTable.c b/OvmfPkg/TdxDxe/TdxAcpiTable.c index 8a1abe8b1d89..5dc27e23ad71 100644 --- a/OvmfPkg/TdxDxe/TdxAcpiTable.c +++ b/OvmfPkg/TdxDxe/TdxAcpiTable.c @@ -175,7 +175,7 @@ AlterAcpiTable ( NewMadtTableLength =3D Table->Length + sizeof (EFI_ACPI_6_4_MULTIPRO= CESSOR_WAKEUP_STRUCTURE); NewMadtTable =3D AllocatePool (NewMadtTableLength); if (NewMadtTable =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: OUT_OF_SOURCES error.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: OUT_OF_SOURCES error.\n", __func__)); break; } =20 diff --git a/OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c b/OvmfPkg/VirtNorFla= shDxe/VirtNorFlashDxe.c index f9a41f6aab0f..6b9ef261335e 100644 --- a/OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c +++ b/OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.c @@ -422,11 +422,11 @@ NorFlashFvbInitialize ( // Install the Default FVB header if required if (EFI_ERROR (Status)) { // There is no valid header, so time to install one. - DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __FUNCTION__= )); + DEBUG ((DEBUG_INFO, "%a: The FVB Header is not valid.\n", __func__)); DEBUG (( DEBUG_INFO, "%a: Installing a correct one for this volume.\n", - __FUNCTION__ + __func__ )); =20 // Erase all the NorFlash that is reserved for variable storage diff --git a/OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c b/OvmfPkg/VirtNorFla= shDxe/VirtNorFlashFvb.c index cc5eefaaf352..5ee98e9b595a 100644 --- a/OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c +++ b/OvmfPkg/VirtNorFlashDxe/VirtNorFlashFvb.c @@ -74,7 +74,7 @@ InitializeFvAndVariableStoreHeaders ( DEBUG (( DEBUG_ERROR, "%a: NvStorageFtwWorkingBase is not contiguous with NvStorageVariabl= eBase region\n", - __FUNCTION__ + __func__ )); return EFI_INVALID_PARAMETER; } @@ -83,7 +83,7 @@ InitializeFvAndVariableStoreHeaders ( DEBUG (( DEBUG_ERROR, "%a: NvStorageFtwSpareBase is not contiguous with NvStorageFtwWorkin= gBase region\n", - __FUNCTION__ + __func__ )); return EFI_INVALID_PARAMETER; } @@ -93,7 +93,7 @@ InitializeFvAndVariableStoreHeaders ( DEBUG (( DEBUG_ERROR, "%a: NvStorageVariableSize is 0x%x, should be atleast one block size= \n", - __FUNCTION__, + __func__, NvStorageVariableSize )); return EFI_INVALID_PARAMETER; @@ -103,7 +103,7 @@ InitializeFvAndVariableStoreHeaders ( DEBUG (( DEBUG_ERROR, "%a: NvStorageFtwWorkingSize is 0x%x, should be atleast one block si= ze\n", - __FUNCTION__, + __func__, NvStorageFtwWorkingSize )); return EFI_INVALID_PARAMETER; @@ -113,7 +113,7 @@ InitializeFvAndVariableStoreHeaders ( DEBUG (( DEBUG_ERROR, "%a: NvStorageFtwSpareSize is 0x%x, should be atleast one block size= \n", - __FUNCTION__, + __func__, NvStorageFtwSpareSize )); return EFI_INVALID_PARAMETER; @@ -124,7 +124,7 @@ InitializeFvAndVariableStoreHeaders ( (NvStorageFtwWorkingBase % Instance->BlockSize !=3D 0) || (NvStorageFtwSpareBase % Instance->BlockSize !=3D 0)) { - DEBUG ((DEBUG_ERROR, "%a: NvStorage Base addresses must be aligned to = block size boundaries", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: NvStorage Base addresses must be aligned to = block size boundaries", __func__)); return EFI_INVALID_PARAMETER; } =20 @@ -209,7 +209,7 @@ ValidateFvHeader ( DEBUG (( DEBUG_INFO, "%a: No Firmware Volume header present\n", - __FUNCTION__ + __func__ )); return EFI_NOT_FOUND; } @@ -219,7 +219,7 @@ ValidateFvHeader ( DEBUG (( DEBUG_INFO, "%a: Firmware Volume Guid non-compatible\n", - __FUNCTION__ + __func__ )); return EFI_NOT_FOUND; } @@ -230,7 +230,7 @@ ValidateFvHeader ( DEBUG (( DEBUG_INFO, "%a: FV checksum is invalid (Checksum:0x%X)\n", - __FUNCTION__, + __func__, Checksum )); return EFI_NOT_FOUND; @@ -245,7 +245,7 @@ ValidateFvHeader ( DEBUG (( DEBUG_INFO, "%a: Variable Store Guid non-compatible\n", - __FUNCTION__ + __func__ )); return EFI_NOT_FOUND; } @@ -255,7 +255,7 @@ ValidateFvHeader ( DEBUG (( DEBUG_INFO, "%a: Variable Store Length does not match\n", - __FUNCTION__ + __func__ )); return EFI_NOT_FOUND; } diff --git a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c b/OvmfPkg/VirtioBlkDxe/Virtio= Blk.c index cc094cc4ddb8..74ed52f9da69 100644 --- a/OvmfPkg/VirtioBlkDxe/VirtioBlk.c +++ b/OvmfPkg/VirtioBlkDxe/VirtioBlk.c @@ -943,7 +943,7 @@ VirtioBlkInit ( DEBUG (( DEBUG_INFO, "%a: LbaSize=3D0x%x[B] NumBlocks=3D0x%Lx[Lba]\n", - __FUNCTION__, + __func__, Dev->BlockIoMedia.BlockSize, Dev->BlockIoMedia.LastBlock + 1 )); @@ -958,14 +958,14 @@ VirtioBlkInit ( DEBUG (( DEBUG_INFO, "%a: FirstAligned=3D0x%Lx[Lba] PhysBlkSize=3D0x%x[Lba]\n", - __FUNCTION__, + __func__, Dev->BlockIoMedia.LowestAlignedLba, Dev->BlockIoMedia.LogicalBlocksPerPhysicalBlock )); DEBUG (( DEBUG_INFO, "%a: OptimalTransferLengthGranularity=3D0x%x[Lba]\n", - __FUNCTION__, + __func__, Dev->BlockIoMedia.OptimalTransferLengthGranularity )); } @@ -1037,7 +1037,7 @@ VirtioBlkExitBoot ( { VBLK_DEV *Dev; =20 - DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __FUNCTION__, Context)); + DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __func__, Context)); // // Reset the device. This causes the hypervisor to forget about the virt= io // ring. diff --git a/OvmfPkg/VirtioFsDxe/FuseFlush.c b/OvmfPkg/VirtioFsDxe/FuseFlus= h.c index ff5d6f3f5a88..26cc12087bd6 100644 --- a/OvmfPkg/VirtioFsDxe/FuseFlush.c +++ b/OvmfPkg/VirtioFsDxe/FuseFlush.c @@ -111,7 +111,7 @@ VirtioFsFuseFlush ( DEBUG_ERROR, "%a: Label=3D\"%s\" NodeId=3D%Lu FuseHandle=3D%Lu " "Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, NodeId, FuseHandle, diff --git a/OvmfPkg/VirtioFsDxe/FuseFsync.c b/OvmfPkg/VirtioFsDxe/FuseFsyn= c.c index c537b064e60e..11a4ab4e7786 100644 --- a/OvmfPkg/VirtioFsDxe/FuseFsync.c +++ b/OvmfPkg/VirtioFsDxe/FuseFsync.c @@ -116,7 +116,7 @@ VirtioFsFuseFsyncFileOrDir ( DEBUG_ERROR, "%a: Label=3D\"%s\" NodeId=3D%Lu FuseHandle=3D%Lu " "IsDir=3D%d Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, NodeId, FuseHandle, diff --git a/OvmfPkg/VirtioFsDxe/FuseGetAttr.c b/OvmfPkg/VirtioFsDxe/FuseGe= tAttr.c index 1dc0349a55be..6f6e89c4fdc8 100644 --- a/OvmfPkg/VirtioFsDxe/FuseGetAttr.c +++ b/OvmfPkg/VirtioFsDxe/FuseGetAttr.c @@ -116,7 +116,7 @@ VirtioFsFuseGetAttr ( DEBUG (( DEBUG_ERROR, "%a: Label=3D\"%s\" NodeId=3D%Lu Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, NodeId, CommonResp.Error diff --git a/OvmfPkg/VirtioFsDxe/FuseInit.c b/OvmfPkg/VirtioFsDxe/FuseInit.c index d34fc05a50dd..590ef441ef3f 100644 --- a/OvmfPkg/VirtioFsDxe/FuseInit.c +++ b/OvmfPkg/VirtioFsDxe/FuseInit.c @@ -125,7 +125,7 @@ VirtioFsFuseInitSession ( DEBUG (( DEBUG_ERROR, "%a: Label=3D\"%s\" Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, CommonResp.Error )); diff --git a/OvmfPkg/VirtioFsDxe/FuseLookup.c b/OvmfPkg/VirtioFsDxe/FuseLoo= kup.c index f2bda8a547ff..277a19fb1fda 100644 --- a/OvmfPkg/VirtioFsDxe/FuseLookup.c +++ b/OvmfPkg/VirtioFsDxe/FuseLookup.c @@ -128,7 +128,7 @@ VirtioFsFuseLookup ( DEBUG_VERBOSE : DEBUG_ERROR), "%a: Label=3D\"%s\" DirNodeId=3D%Lu Name=3D\"%a\" Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, DirNodeId, Name, diff --git a/OvmfPkg/VirtioFsDxe/FuseMkDir.c b/OvmfPkg/VirtioFsDxe/FuseMkDi= r.c index 409e09a41895..847d0c079870 100644 --- a/OvmfPkg/VirtioFsDxe/FuseMkDir.c +++ b/OvmfPkg/VirtioFsDxe/FuseMkDir.c @@ -127,7 +127,7 @@ VirtioFsFuseMkDir ( DEBUG_ERROR, "%a: Label=3D\"%s\" ParentNodeId=3D%Lu Name=3D\"%a\" " "Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, ParentNodeId, Name, diff --git a/OvmfPkg/VirtioFsDxe/FuseOpen.c b/OvmfPkg/VirtioFsDxe/FuseOpen.c index 64015bb6cc7f..99ea5f3b71b5 100644 --- a/OvmfPkg/VirtioFsDxe/FuseOpen.c +++ b/OvmfPkg/VirtioFsDxe/FuseOpen.c @@ -119,7 +119,7 @@ VirtioFsFuseOpen ( DEBUG_ERROR, "%a: Label=3D\"%s\" NodeId=3D%Lu ReadWrite=3D%d " "Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, NodeId, ReadWrite, diff --git a/OvmfPkg/VirtioFsDxe/FuseOpenDir.c b/OvmfPkg/VirtioFsDxe/FuseOp= enDir.c index e49c046b9d47..11249ef0a83e 100644 --- a/OvmfPkg/VirtioFsDxe/FuseOpenDir.c +++ b/OvmfPkg/VirtioFsDxe/FuseOpenDir.c @@ -113,7 +113,7 @@ VirtioFsFuseOpenDir ( DEBUG (( DEBUG_ERROR, "%a: Label=3D\"%s\" NodeId=3D%Lu Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, NodeId, CommonResp.Error diff --git a/OvmfPkg/VirtioFsDxe/FuseOpenOrCreate.c b/OvmfPkg/VirtioFsDxe/F= useOpenOrCreate.c index 4d9846ab3b05..db586dc76d9b 100644 --- a/OvmfPkg/VirtioFsDxe/FuseOpenOrCreate.c +++ b/OvmfPkg/VirtioFsDxe/FuseOpenOrCreate.c @@ -146,7 +146,7 @@ VirtioFsFuseOpenOrCreate ( DEBUG_ERROR, "%a: Label=3D\"%s\" ParentNodeId=3D%Lu Name=3D\"%a\" " "Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, ParentNodeId, Name, diff --git a/OvmfPkg/VirtioFsDxe/FuseRead.c b/OvmfPkg/VirtioFsDxe/FuseRead.c index 013dac7e52f3..882d43304597 100644 --- a/OvmfPkg/VirtioFsDxe/FuseRead.c +++ b/OvmfPkg/VirtioFsDxe/FuseRead.c @@ -178,7 +178,7 @@ VirtioFsFuseReadFileOrDir ( DEBUG_ERROR, "%a: Label=3D\"%s\" NodeId=3D%Lu FuseHandle=3D%Lu " "IsDir=3D%d Offset=3D0x%Lx Size=3D0x%x Data@%p Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, NodeId, FuseHandle, diff --git a/OvmfPkg/VirtioFsDxe/FuseRelease.c b/OvmfPkg/VirtioFsDxe/FuseRe= lease.c index c8363158f5e7..75bb171a139e 100644 --- a/OvmfPkg/VirtioFsDxe/FuseRelease.c +++ b/OvmfPkg/VirtioFsDxe/FuseRelease.c @@ -116,7 +116,7 @@ VirtioFsFuseReleaseFileOrDir ( DEBUG_ERROR, "%a: Label=3D\"%s\" NodeId=3D%Lu FuseHandle=3D%Lu " "IsDir=3D%d Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, NodeId, FuseHandle, diff --git a/OvmfPkg/VirtioFsDxe/FuseRename.c b/OvmfPkg/VirtioFsDxe/FuseRen= ame.c index a3a105050600..3ec536303776 100644 --- a/OvmfPkg/VirtioFsDxe/FuseRename.c +++ b/OvmfPkg/VirtioFsDxe/FuseRename.c @@ -130,7 +130,7 @@ VirtioFsFuseRename ( DEBUG_ERROR, "%a: Label=3D\"%s\" OldParentNodeId=3D%Lu OldName=3D\"%a\" " "NewParentNodeId=3D%Lu NewName=3D\"%a\" Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, OldParentNodeId, OldName, diff --git a/OvmfPkg/VirtioFsDxe/FuseSetAttr.c b/OvmfPkg/VirtioFsDxe/FuseSe= tAttr.c index 9d0ea93fd957..719584fa322a 100644 --- a/OvmfPkg/VirtioFsDxe/FuseSetAttr.c +++ b/OvmfPkg/VirtioFsDxe/FuseSetAttr.c @@ -164,7 +164,7 @@ VirtioFsFuseSetAttr ( DEBUG (( DEBUG_ERROR, "%a: Label=3D\"%s\" NodeId=3D%Lu", - __FUNCTION__, + __func__, VirtioFs->Label, NodeId )); diff --git a/OvmfPkg/VirtioFsDxe/FuseStatFs.c b/OvmfPkg/VirtioFsDxe/FuseSta= tFs.c index d93a62080e47..55b4edc5b938 100644 --- a/OvmfPkg/VirtioFsDxe/FuseStatFs.c +++ b/OvmfPkg/VirtioFsDxe/FuseStatFs.c @@ -102,7 +102,7 @@ VirtioFsFuseStatFs ( DEBUG (( DEBUG_ERROR, "%a: Label=3D\"%s\" NodeId=3D%Lu Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, NodeId, CommonResp.Error diff --git a/OvmfPkg/VirtioFsDxe/FuseUnlink.c b/OvmfPkg/VirtioFsDxe/FuseUnl= ink.c index 14cbdec5f5b2..d83a175dc674 100644 --- a/OvmfPkg/VirtioFsDxe/FuseUnlink.c +++ b/OvmfPkg/VirtioFsDxe/FuseUnlink.c @@ -109,7 +109,7 @@ VirtioFsFuseRemoveFileOrDir ( DEBUG_ERROR, "%a: Label=3D\"%s\" ParentNodeId=3D%Lu Name=3D\"%a\" " "IsDir=3D%d Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, ParentNodeId, Name, diff --git a/OvmfPkg/VirtioFsDxe/FuseWrite.c b/OvmfPkg/VirtioFsDxe/FuseWrit= e.c index fe65c0bdbe41..98dbd6deccc3 100644 --- a/OvmfPkg/VirtioFsDxe/FuseWrite.c +++ b/OvmfPkg/VirtioFsDxe/FuseWrite.c @@ -147,7 +147,7 @@ VirtioFsFuseWrite ( DEBUG_ERROR, "%a: Label=3D\"%s\" NodeId=3D%Lu FuseHandle=3D%Lu " "Offset=3D0x%Lx Size=3D0x%x Data@%p Errno=3D%d\n", - __FUNCTION__, + __func__, VirtioFs->Label, NodeId, FuseHandle, diff --git a/OvmfPkg/VirtioFsDxe/Helpers.c b/OvmfPkg/VirtioFsDxe/Helpers.c index f32fb1d48a3e..bc3c58cf41f9 100644 --- a/OvmfPkg/VirtioFsDxe/Helpers.c +++ b/OvmfPkg/VirtioFsDxe/Helpers.c @@ -320,7 +320,7 @@ VirtioFsExitBoot ( DEBUG (( DEBUG_VERBOSE, "%a: VirtioFs=3D0x%p Label=3D\"%s\"\n", - __FUNCTION__, + __func__, VirtioFsAsVoid, VirtioFs->Label )); diff --git a/OvmfPkg/VirtioFsDxe/SimpleFsOpen.c b/OvmfPkg/VirtioFsDxe/Simpl= eFsOpen.c index d479f76f5bc3..a13d4f6a1e2d 100644 --- a/OvmfPkg/VirtioFsDxe/SimpleFsOpen.c +++ b/OvmfPkg/VirtioFsDxe/SimpleFsOpen.c @@ -378,7 +378,7 @@ VirtioFsSimpleFileOpen ( ("%a: Label=3D\"%s\" CanonicalPathname=3D\"%a\" FileName=3D\"%s\" " "OpenMode=3D0x%Lx Attributes=3D0x%Lx: nonsensical request to poss= ibly " "create a file marked read-only, for read-write access\n"), - __FUNCTION__, + __func__, VirtioFs->Label, VirtioFsFile->CanonicalPathname, FileName, @@ -403,7 +403,7 @@ VirtioFsSimpleFileOpen ( ("%a: Label=3D\"%s\" CanonicalPathname=3D\"%a\" FileName=3D\"%s\": " "nonsensical request to open a file or directory relative to a regu= lar " "file\n"), - __FUNCTION__, + __func__, VirtioFs->Label, VirtioFsFile->CanonicalPathname, FileName diff --git a/OvmfPkg/VirtioGpuDxe/Commands.c b/OvmfPkg/VirtioGpuDxe/Command= s.c index 4318d3d771c5..df79a5f8aff5 100644 --- a/OvmfPkg/VirtioGpuDxe/Commands.c +++ b/OvmfPkg/VirtioGpuDxe/Commands.c @@ -354,7 +354,7 @@ VirtioGpuExitBoot ( { VGPU_DEV *VgpuDev; =20 - DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __FUNCTION__, Context)); + DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __func__, Context)); VgpuDev =3D Context; VgpuDev->VirtIo->SetDeviceStatus (VgpuDev->VirtIo, 0); } @@ -516,7 +516,7 @@ VirtioGpuSendCommandWithReply ( DEBUG (( DEBUG_ERROR, "%a: malformed response to Request=3D0x%x\n", - __FUNCTION__, + __func__, (UINT32)RequestType )); Status =3D EFI_PROTOCOL_ERROR; @@ -548,7 +548,7 @@ VirtioGpuSendCommandWithReply ( DEBUG (( DEBUG_ERROR, "%a: Request=3D0x%x Response=3D0x%x (expected 0x%x)\n", - __FUNCTION__, + __func__, (UINT32)RequestType, Response->Type, ResponseType diff --git a/OvmfPkg/VirtioGpuDxe/DriverBinding.c b/OvmfPkg/VirtioGpuDxe/Dr= iverBinding.c index 21bf2babc8ef..80eac08f901b 100644 --- a/OvmfPkg/VirtioGpuDxe/DriverBinding.c +++ b/OvmfPkg/VirtioGpuDxe/DriverBinding.c @@ -816,7 +816,7 @@ VirtioGpuDriverBindingStart ( DEBUG (( DEBUG_INFO, "%a: bound VirtIo=3D%p without producing GOP\n", - __FUNCTION__, + __func__, (VOID *)VgpuDev->VirtIo )); return EFI_SUCCESS; @@ -848,7 +848,7 @@ VirtioGpuDriverBindingStart ( DEBUG (( DEBUG_INFO, "%a: produced GOP %a VirtIo=3D%p\n", - __FUNCTION__, + __func__, VirtIoBoundJustNow ? "while binding" : "for pre-bound", (VOID *)VgpuDev->VirtIo )); @@ -952,7 +952,7 @@ VirtioGpuDriverBindingStop ( DEBUG (( DEBUG_INFO, "%a: unbinding GOP-less VirtIo=3D%p\n", - __FUNCTION__, + __func__, (VOID *)VgpuDev->VirtIo )); =20 @@ -1010,7 +1010,7 @@ VirtioGpuDriverBindingStop ( DEBUG (( DEBUG_INFO, "%a: destroying GOP under VirtIo=3D%p\n", - __FUNCTION__, + __func__, (VOID *)VgpuDev->VirtIo )); UninitVgpuGop (VgpuDev, ControllerHandle, This->DriverBindingHandle); diff --git a/OvmfPkg/VirtioGpuDxe/Gop.c b/OvmfPkg/VirtioGpuDxe/Gop.c index 16e92830d411..f64dfce5f400 100644 --- a/OvmfPkg/VirtioGpuDxe/Gop.c +++ b/OvmfPkg/VirtioGpuDxe/Gop.c @@ -222,7 +222,7 @@ GopNativeResolution ( DEBUG (( DEBUG_INFO, "%a: #%d: %dx%d\n", - __FUNCTION__, + __func__, Index, DisplayInfo.Pmodes[Index].Rectangle.Width, DisplayInfo.Pmodes[Index].Rectangle.Height diff --git a/OvmfPkg/VirtioNetDxe/Events.c b/OvmfPkg/VirtioNetDxe/Events.c index 4c93607a38cc..75a9644f749c 100644 --- a/OvmfPkg/VirtioNetDxe/Events.c +++ b/OvmfPkg/VirtioNetDxe/Events.c @@ -77,7 +77,7 @@ VirtioNetExitBoot ( // VNET_DEV *Dev; =20 - DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __FUNCTION__, Context)); + DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __func__, Context)); Dev =3D Context; if (Dev->Snm.State =3D=3D EfiSimpleNetworkInitialized) { Dev->VirtIo->SetDeviceStatus (Dev->VirtIo, 0); diff --git a/OvmfPkg/VirtioRngDxe/VirtioRng.c b/OvmfPkg/VirtioRngDxe/Virtio= Rng.c index aabc7230ab67..069aed148af1 100644 --- a/OvmfPkg/VirtioRngDxe/VirtioRng.c +++ b/OvmfPkg/VirtioRngDxe/VirtioRng.c @@ -435,7 +435,7 @@ VirtioRngExitBoot ( { VIRTIO_RNG_DEV *Dev; =20 - DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __FUNCTION__, Context)); + DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __func__, Context)); // // Reset the device. This causes the hypervisor to forget about the virt= io // ring. diff --git a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c b/OvmfPkg/VirtioScsiDxe/Vir= tioScsi.c index d44f9ebca7db..3705f5fc14d5 100644 --- a/OvmfPkg/VirtioScsiDxe/VirtioScsi.c +++ b/OvmfPkg/VirtioScsiDxe/VirtioScsi.c @@ -1235,7 +1235,7 @@ VirtioScsiExitBoot ( { VSCSI_DEV *Dev; =20 - DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __FUNCTION__, Context)); + DEBUG ((DEBUG_VERBOSE, "%a: Context=3D0x%p\n", __func__, Context)); // // Reset the device. This causes the hypervisor to forget about the virt= io // ring. diff --git a/OvmfPkg/XenAcpiPlatformDxe/Xen.c b/OvmfPkg/XenAcpiPlatformDxe/= Xen.c index cc2fa2cdcf8c..a80a24628c08 100644 --- a/OvmfPkg/XenAcpiPlatformDxe/Xen.c +++ b/OvmfPkg/XenAcpiPlatformDxe/Xen.c @@ -299,7 +299,7 @@ InstallXenTables ( // then we're out of sync with the hypervisor, and cannot continue. // if (DsdtTable =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: no DSDT found\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: no DSDT found\n", __func__)); ASSERT (FALSE); CpuDeadLoop (); } diff --git a/OvmfPkg/XenPlatformPei/ClearCache.c b/OvmfPkg/XenPlatformPei/C= learCache.c index 71e63ab86871..a37d1d0c0a8e 100644 --- a/OvmfPkg/XenPlatformPei/ClearCache.c +++ b/OvmfPkg/XenPlatformPei/ClearCache.c @@ -60,7 +60,7 @@ ClearCacheOnMpServicesAvailable ( EFI_PEI_MP_SERVICES_PPI *MpServices; EFI_STATUS Status; =20 - DEBUG ((DEBUG_INFO, "%a: %a\n", gEfiCallerBaseName, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: %a\n", gEfiCallerBaseName, __func__)); =20 // // Clear cache on all the APs in parallel. @@ -75,7 +75,7 @@ ClearCacheOnMpServicesAvailable ( NULL // ProcedureArgument ); if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_STARTED)) { - DEBUG ((DEBUG_ERROR, "%a: StartupAllAps(): %r\n", __FUNCTION__, Status= )); + DEBUG ((DEBUG_ERROR, "%a: StartupAllAps(): %r\n", __func__, Status)); return Status; } =20 @@ -109,7 +109,7 @@ InstallClearCacheCallback ( DEBUG (( DEBUG_ERROR, "%a: failed to set up MP Services callback: %r\n", - __FUNCTION__, + __func__, Status )); } diff --git a/OvmfPkg/XenPlatformPei/MemDetect.c b/OvmfPkg/XenPlatformPei/Me= mDetect.c index d412d1f4db6f..e552e7a55e4f 100644 --- a/OvmfPkg/XenPlatformPei/MemDetect.c +++ b/OvmfPkg/XenPlatformPei/MemDetect.c @@ -54,7 +54,7 @@ Q35TsegMbytesInitialization ( DEBUG_ERROR, "%a: no TSEG (SMRAM) on host bridge DID=3D0x%04x; " "only DID=3D0x%04x (Q35) is supported\n", - __FUNCTION__, + __func__, mHostBridgeDevId, INTEL_Q35_MCH_DEVICE_ID )); @@ -88,7 +88,7 @@ Q35TsegMbytesInitialization ( DEBUG (( DEBUG_INFO, "%a: QEMU offers an extended TSEG (%d MB)\n", - __FUNCTION__, + __func__, ExtendedTsegMbytes )); PcdStatus =3D PcdSet16S (PcdQ35TsegMbytes, ExtendedTsegMbytes); @@ -291,7 +291,7 @@ PublishPeiMemory ( DEBUG (( DEBUG_INFO, "%a: mPhysMemAddressWidth=3D%d PeiMemoryCap=3D%u KB\n", - __FUNCTION__, + __func__, mPhysMemAddressWidth, PeiMemoryCap >> 10 )); diff --git a/OvmfPkg/XenPlatformPei/Platform.c b/OvmfPkg/XenPlatformPei/Pla= tform.c index 6c1886c158b5..c3fdf3d0b8a6 100644 --- a/OvmfPkg/XenPlatformPei/Platform.c +++ b/OvmfPkg/XenPlatformPei/Platform.c @@ -292,7 +292,7 @@ MiscInitialization ( DEBUG (( DEBUG_ERROR, "%a: Unknown Host Bridge Device ID: 0x%04x\n", - __FUNCTION__, + __func__, mHostBridgeDevId )); ASSERT (FALSE); diff --git a/OvmfPkg/XenPvBlkDxe/BlockFront.c b/OvmfPkg/XenPvBlkDxe/BlockFr= ont.c index 1827cc58e390..5a3ad5e4e579 100644 --- a/OvmfPkg/XenPvBlkDxe/BlockFront.c +++ b/OvmfPkg/XenPvBlkDxe/BlockFront.c @@ -187,13 +187,13 @@ XenPvBlockFrontInitialization ( if (Dev->MediaInfo.CdRom) { Status =3D XenBusIo->XsBackendRead (XenBusIo, XST_NIL, "params", (VOID= **)&Params); if (Status !=3D XENSTORE_STATUS_SUCCESS) { - DEBUG ((DEBUG_ERROR, "%a: Failed to read params (%d)\n", __FUNCTION_= _, Status)); + DEBUG ((DEBUG_ERROR, "%a: Failed to read params (%d)\n", __func__, S= tatus)); goto Error; } =20 if ((AsciiStrLen (Params) =3D=3D 0) || (AsciiStrCmp (Params, "aio:") = =3D=3D 0)) { FreePool (Params); - DEBUG ((DEBUG_INFO, "%a: Empty cdrom\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Empty cdrom\n", __func__)); goto 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 (#102634): https://edk2.groups.io/g/devel/message/102634 Mute This Topic: https://groups.io/mt/98115230/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- From nobody Wed May 15 21:28:32 2024 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+102635+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+102635+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819836; cv=none; d=zohomail.com; s=zohoarc; b=WCt5OI1GGGE3K31zcljAD/nKX74lp9KWQmc7+qo4CZS3/jD8IxrJ2cZEHSJjCdSMDn5XjsBh615dQ1n8l3EONZf9S//duC1pVaU/ToX0iTTU/jwzO1Hna8bate36DSOVTKw7Zr8JYI0ED3xx9ZNfSabTSr2dVSRmPrf0zGeSiW0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819836; 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=btWD/COyxjMCSKvjOCPlpCu75e46lbZJHaiWlHQyzPo=; b=N8ZjmzXtm6B+VJi3uFxgdaKukNl2MwVAdDvOI4rGR4poZkCmmlwz0f9nXwjLvKUy6palWb+AYTDeHpxB0cUCqYDhmUM1vukWvB8Zj0WNLb/1HXzjlOEcsAa9bQ3L2DRHqX37NTKk7+xKaG9swCv5fCB6J6x8hcLbXJTSaGV6Pvg= 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+102635+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819836847555.8064923218101; Thu, 6 Apr 2023 15:23:56 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Bt6CYY1788612xP8igmEYlgU; Thu, 06 Apr 2023 15:23:56 -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.171990.1680819835432898100 for ; Thu, 06 Apr 2023 15:23:55 -0700 X-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id BC9655C01BC; Thu, 6 Apr 2023 18:23:54 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 06 Apr 2023 18:23:54 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:23:51 -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 05/18] MdeModulePkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:06 -0600 Message-Id: <20230406222319.2281263-6-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: 1LbmALDSBbpHcDbVERnVM5kXx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819836; bh=LnfgBbYYi+u7nssKdW103vA6BDBFTXtMGF7/mvixXFw=; h=Cc:Date:From:Reply-To:Subject:To; b=j7NhzCvUpxFehH+s/mOykInNwRagMZvw4LNP3NgoIHcBDJUq6l5FHsILVf6TsapyhoP qn7oe6Gunj4k7jgEez+CUPcNsu/9Kva7jEMy71zgMeD6EVV0cgnx32Kh2TZLGSJQfjl1Y AGJsPEPYV2OG4ViPTbEQrc5+ysT536ivWIA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819837407100005 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 MdeModulePkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c = | 38 ++++++++++---------- MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c = | 18 +++++----- MdeModulePkg/Bus/Ata/AhciPei/AhciPeiBlockIo.c = | 2 +- MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c = | 2 +- MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c = | 4 +-- MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceI= o.c | 2 +- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c = | 8 ++--- MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c = | 36 +++++++++---------- MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c = | 6 ++-- MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c = | 34 +++++++++--------- MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c = | 24 ++++++------- MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c = | 2 +- MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c = | 14 ++++---- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c = | 6 ++-- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c = | 12 +++---- MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c = | 2 +- MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c = | 4 +-- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c = | 6 ++-- MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c = | 2 +- MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c = | 2 +- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c = | 6 ++-- MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c = | 2 +- MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c = | 4 +-- MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c = | 4 +-- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c = | 2 +- MdeModulePkg/Core/Pei/FwVol/FwVol.c = | 2 +- MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c = | 2 +- MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c = | 2 +- MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c = | 2 +- MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c = | 2 +- MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c = | 2 +- MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c = | 22 ++++++------ MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c = | 6 ++-- MdeModulePkg/Universal/CapsulePei/UefiCapsule.c = | 8 ++--- MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c = | 2 +- MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c = | 10 +++--- MdeModulePkg/Universal/Disk/UdfDxe/File.c = | 2 +- MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c = | 2 +- MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c = | 6 ++-- MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c = | 2 +- MdeModulePkg/Universal/PCD/Dxe/Service.c = | 2 +- MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c = | 4 +-- MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c = | 6 ++-- MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c = | 6 ++-- MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c = | 6 ++-- MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c = | 4 +-- MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c = | 20 +++++------ 47 files changed, 181 insertions(+), 181 deletions(-) diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c b/MdeModulePkg/Bus/Ata= /AhciPei/AhciMode.c index 0f0198d3085b..92fb30638ec9 100644 --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c @@ -759,7 +759,7 @@ AhciPioTransfer ( DEBUG_ERROR, "%a: Driver only support a maximum of 0x%x PRDT entries, " "current number of data byte 0x%x is too large, maximum allowed is 0= x%x.\n", - __FUNCTION__, + __func__, AHCI_MAX_PRDT_NUMBER, DataCount, AHCI_MAX_PRDT_NUMBER * AHCI_MAX_DATA_PER_PRDT @@ -778,7 +778,7 @@ AhciPioTransfer ( &MapData ); if (EFI_ERROR (Status) || (MapLength !=3D DataCount)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __func__)); return EFI_OUT_OF_RESOURCES; } =20 @@ -860,7 +860,7 @@ AhciPioTransfer ( Offset =3D FisBaseAddr + AHCI_PIO_FIS_OFFSET; Status =3D AhciCheckMemSet (Offset, AHCI_FIS_TYPE_MASK, AHCI= _FIS_PIO_SETUP); if (!EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a: PioFisReceived.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: PioFisReceived.\n", __func__)); PioFisReceived =3D TRUE; } =20 @@ -874,7 +874,7 @@ AhciPioTransfer ( Offset =3D FisBaseAddr + AHCI_D2H_FIS_OFFSET; Status =3D AhciCheckMemSet (Offset, AHCI_FIS_TYPE_MASK, AHCI_FIS_REG= ISTER_D2H); if (!EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a: D2hFisReceived.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: D2hFisReceived.\n", __func__)); D2hFisReceived =3D TRUE; } =20 @@ -918,7 +918,7 @@ AhciPioTransfer ( Timeout ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: AhciWaitMemSet (%r)\n", __FUNCTION__, Stat= us)); + DEBUG ((DEBUG_ERROR, "%a: AhciWaitMemSet (%r)\n", __func__, Status)); goto Exit; } =20 @@ -1479,7 +1479,7 @@ IdentifyAtaDevice ( DEBUG (( DEBUG_ERROR, "%a: Not a hard disk device on Port 0x%x PortMultiplierPort 0x%x\n", - __FUNCTION__, + __func__, DeviceData->Port, DeviceData->PortMultiplier )); @@ -1489,7 +1489,7 @@ IdentifyAtaDevice ( DEBUG (( DEBUG_INFO, "%a: Identify Device: Port 0x%x PortMultiplierPort 0x%x\n", - __FUNCTION__, + __func__, DeviceData->Port, DeviceData->PortMultiplier )); @@ -1518,7 +1518,7 @@ IdentifyAtaDevice ( } =20 if (Capacity =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a: Invalid Capacity (0) for ATA device.\n", __F= UNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Invalid Capacity (0) for ATA device.\n", __f= unc__)); return EFI_UNSUPPORTED; } =20 @@ -1532,7 +1532,7 @@ IdentifyAtaDevice ( DEBUG (( DEBUG_INFO, "%a: PhyLogicSectorSupport =3D 0x%x\n", - __FUNCTION__, + __func__, PhyLogicSectorSupport )); if ((PhyLogicSectorSupport & (BIT14 | BIT15)) =3D=3D BIT14) { @@ -1550,20 +1550,20 @@ IdentifyAtaDevice ( // MaxSectorCount =3D mMaxTransferBlockNumber[DeviceData->Lba48Bit]; if ((Media->BlockSize =3D=3D 0) || (Media->BlockSize > MAX_UINT32 / MaxS= ectorCount)) { - DEBUG ((DEBUG_ERROR, "%a: Invalid BlockSize (0x%x).\n", __FUNCTION__, = Media->BlockSize)); + DEBUG ((DEBUG_ERROR, "%a: Invalid BlockSize (0x%x).\n", __func__, Medi= a->BlockSize)); return EFI_UNSUPPORTED; } =20 DEBUG (( DEBUG_INFO, "%a: BlockSize =3D 0x%x, LastBlock =3D 0x%lx\n", - __FUNCTION__, + __func__, Media->BlockSize, Media->LastBlock )); =20 if ((IdentifyData->trusted_computing_support & BIT0) !=3D 0) { - DEBUG ((DEBUG_INFO, "%a: Found Trust Computing feature support.\n", __= FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Found Trust Computing feature support.\n", __= func__)); DeviceData->TrustComputing =3D TRUE; } =20 @@ -1686,7 +1686,7 @@ AhciModeInitialization ( =20 Status =3D AhciReset (AhciBar, AHCI_PEI_RESET_TIMEOUT); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: AHCI HBA reset failed with %r.\n", __FUNCTIO= N__, Status)); + DEBUG ((DEBUG_ERROR, "%a: AHCI HBA reset failed with %r.\n", __func__,= Status)); return EFI_DEVICE_ERROR; } =20 @@ -1708,7 +1708,7 @@ AhciModeInitialization ( DEBUG (( DEBUG_ERROR, "%a: Transfer-related data allocation failed with %r.\n", - __FUNCTION__, + __func__, Status )); return EFI_OUT_OF_RESOURCES; @@ -1814,7 +1814,7 @@ AhciModeInitialization ( // Offset =3D AHCI_PORT_START + Port * AHCI_PORT_REG_WIDTH + AHCI_POR= T_CMD; AhciAndReg (AhciBar, Offset, (UINT32) ~(AHCI_PORT_CMD_SUD)); - DEBUG ((DEBUG_ERROR, "%a: No device detected at Port %d.\n", __FUN= CTION__, Port)); + DEBUG ((DEBUG_ERROR, "%a: No device detected at Port %d.\n", __fun= c__, Port)); continue; } =20 @@ -1844,7 +1844,7 @@ AhciModeInitialization ( DEBUG (( DEBUG_ERROR, "%a: Port %d device presence detected but phy not ready (TFD=3D0= x%x).\n", - __FUNCTION__, + __func__, Port, Data )); @@ -1866,7 +1866,7 @@ AhciModeInitialization ( DEBUG (( DEBUG_ERROR, "%a: Error occurred when waiting for the first D2H register FIS = - %r\n", - __FUNCTION__, + __func__, Status )); continue; @@ -1876,11 +1876,11 @@ AhciModeInitialization ( if ((Data & AHCI_ATAPI_SIG_MASK) =3D=3D AHCI_ATA_DEVICE_SIG) { Status =3D AhciIdentify (Private, Port, 0, PortIndex - 1, &Identif= yData); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: AhciIdentify() failed with %r\n", __FU= NCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: AhciIdentify() failed with %r\n", __fu= nc__, Status)); continue; } =20 - DEBUG ((DEBUG_INFO, "%a: ATA hard disk found on Port %d.\n", __FUN= CTION__, Port)); + DEBUG ((DEBUG_INFO, "%a: ATA hard disk found on Port %d.\n", __fun= c__, Port)); } else { continue; } diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c b/MdeModulePkg/Bus/Ata/= AhciPei/AhciPei.c index e33d863d2acf..7ea36afa2540 100644 --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c @@ -156,7 +156,7 @@ AtaAhciInitPrivateData ( // Status =3D PeiServicesGetBootMode (&BootMode); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __FUN= CTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __fun= c__)); return Status; } =20 @@ -168,7 +168,7 @@ AtaAhciInitPrivateData ( DEBUG (( DEBUG_ERROR, "%a: The device path is invalid.\n", - __FUNCTION__ + __func__ )); return Status; } @@ -196,7 +196,7 @@ AtaAhciInitPrivateData ( DEBUG (( DEBUG_ERROR, "%a: Fail to allocate private data.\n", - __FUNCTION__ + __func__ )); return EFI_OUT_OF_RESOURCES; } @@ -260,7 +260,7 @@ AtaAhciInitPrivateData ( DEBUG (( DEBUG_INFO, "%a: Security Security Command PPI will be produced.\n", - __FUNCTION__ + __func__ )); Private->StorageSecurityPpi.Revision =3D EDKII_STORAGE_SECUR= ITY_PPI_REVISION; Private->StorageSecurityPpi.GetNumberofDevices =3D AhciStorageSecurity= GetDeviceNo; @@ -329,7 +329,7 @@ AtaAhciInitPrivateDataFromHostControllerPpi ( DEBUG (( DEBUG_ERROR, "%a: Fail to allocate get the device path for Controller %d.\n", - __FUNCTION__, + __func__, Controller )); return Status; @@ -340,7 +340,7 @@ AtaAhciInitPrivateDataFromHostControllerPpi ( DEBUG (( DEBUG_ERROR, "%a: Controller initialization fail for Controller %d with Status = - %r.\n", - __FUNCTION__, + __func__, Controller, Status )); @@ -348,7 +348,7 @@ AtaAhciInitPrivateDataFromHostControllerPpi ( DEBUG (( DEBUG_INFO, "%a: Controller %d has been successfully initialized.\n", - __FUNCTION__, + __func__, Controller )); } @@ -471,7 +471,7 @@ AtaAhciInitPrivateDataFromPciDevice ( DEBUG (( DEBUG_INFO, "%a: Failed to init controller, with Status - %r\n", - __FUNCTION__, + __func__, Status )); } @@ -522,7 +522,7 @@ AtaAhciPeimEntry ( IN CONST EFI_PEI_SERVICES **PeiServices ) { - DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__)); =20 PeiServicesNotifyPpi (&mAtaAhciHostControllerNotify); =20 diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiBlockIo.c b/MdeModulePkg/B= us/Ata/AhciPei/AhciPeiBlockIo.c index c5d1f3fffb6d..5eb2a9ce8294 100644 --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiBlockIo.c +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiBlockIo.c @@ -101,7 +101,7 @@ AccessAtaDevice ( DEBUG (( DEBUG_BLKIO, "%a: Blocking AccessAtaDevice, TransferBlockNumber =3D %x; StartLba = =3D %x\n", - __FUNCTION__, + __func__, TransferBlockNumber, StartLba )); diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/Ehc= iDxe/Ehci.c index e903593b0198..b4f1a5079914 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c @@ -1863,7 +1863,7 @@ EhcDriverBindingStart ( DEBUG (( DEBUG_WARN, "%a: failed to enable 64-bit DMA on 64-bit capable controller @ %p= (%r)\n", - __FUNCTION__, + __func__, Controller, Status )); diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c b/MdeModulePkg/Bus/Pc= i/EhciDxe/EhciSched.c index 6967aabceb78..59bbe9fc2318 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c @@ -836,7 +836,7 @@ EhciInsertAsyncIntTransfer ( Data =3D AllocatePool (DataLen); =20 if (Data =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __func__)); return NULL; } =20 @@ -858,7 +858,7 @@ EhciInsertAsyncIntTransfer ( ); =20 if (Urb =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __func__)); gBS->FreePool (Data); return NULL; } diff --git a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverab= lePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDisco= verablePciDeviceIo.c index 2fb78d8f9687..e31c38deed6c 100644 --- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDe= viceIo.c +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDe= viceIo.c @@ -1843,7 +1843,7 @@ InitializePciIoProtocol ( DEBUG (( DEBUG_ERROR, "%a: resource count exceeds number of emulated BARs\n", - __FUNCTION__ + __func__ )); ASSERT (FALSE); break; diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c b/MdeMo= dulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c index b33c90341255..b6ed7f7031b3 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c @@ -216,7 +216,7 @@ NvmeRead ( DEBUG_BLKIO, "%a: Lba =3D 0x%08Lx, Original =3D 0x%08Lx, " "Remaining =3D 0x%08Lx, BlockSize =3D 0x%x, Status =3D %r\n", - __FUNCTION__, + __func__, Lba, (UINT64)OrginalBlocks, (UINT64)Blocks, @@ -302,7 +302,7 @@ NvmeWrite ( DEBUG_BLKIO, "%a: Lba =3D 0x%08Lx, Original =3D 0x%08Lx, " "Remaining =3D 0x%08Lx, BlockSize =3D 0x%x, Status =3D %r\n", - __FUNCTION__, + __func__, Lba, (UINT64)OrginalBlocks, (UINT64)Blocks, @@ -817,7 +817,7 @@ NvmeAsyncRead ( DEBUG_BLKIO, "%a: Lba =3D 0x%08Lx, Original =3D 0x%08Lx, " "Remaining =3D 0x%08Lx, BlockSize =3D 0x%x, Status =3D %r\n", - __FUNCTION__, + __func__, Lba, (UINT64)OrginalBlocks, (UINT64)Blocks, @@ -945,7 +945,7 @@ NvmeAsyncWrite ( DEBUG_BLKIO, "%a: Lba =3D 0x%08Lx, Original =3D 0x%08Lx, " "Remaining =3D 0x%08Lx, BlockSize =3D 0x%x, Status =3D %r\n", - __FUNCTION__, + __func__, Lba, (UINT64)OrginalBlocks, (UINT64)Blocks, diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c b/MdeModule= Pkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c index 3e6f75345d98..38f86487e25a 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c @@ -91,7 +91,7 @@ EnumerateNvmeDevNamespace ( NamespaceData ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyNamespace fail, Status - %r\n", = __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyNamespace fail, Status - %r\n", = __func__, Status)); goto Exit; } =20 @@ -99,7 +99,7 @@ EnumerateNvmeDevNamespace ( // Validate Namespace // if (NamespaceData->Ncap =3D=3D 0) { - DEBUG ((DEBUG_INFO, "%a: Namespace ID %d is an inactive one.\n", __FUN= CTION__, NamespaceId)); + DEBUG ((DEBUG_INFO, "%a: Namespace ID %d is an inactive one.\n", __fun= c__, NamespaceId)); Status =3D EFI_DEVICE_ERROR; goto Exit; } @@ -142,7 +142,7 @@ EnumerateNvmeDevNamespace ( DEBUG (( DEBUG_INFO, "%a: Namespace ID %d - BlockSize =3D 0x%x, LastBlock =3D 0x%lx\n", - __FUNCTION__, + __func__, NamespaceId, NamespaceInfo->Media.BlockSize, NamespaceInfo->Media.LastBlock @@ -246,14 +246,14 @@ NvmeInitPrivateData ( PEI_NVME_CONTROLLER_PRIVATE_DATA *Private; EFI_PHYSICAL_ADDRESS DeviceAddress; =20 - DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__)); =20 // // Get the current boot mode. // Status =3D PeiServicesGetBootMode (&BootMode); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __FUN= CTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __fun= c__)); return Status; } =20 @@ -265,7 +265,7 @@ NvmeInitPrivateData ( DEBUG (( DEBUG_ERROR, "%a: The device path is invalid.\n", - __FUNCTION__ + __func__ )); return Status; } @@ -282,7 +282,7 @@ NvmeInitPrivateData ( DEBUG (( DEBUG_ERROR, "%a: skipped during S3.\n", - __FUNCTION__ + __func__ )); return EFI_SUCCESS; } @@ -295,7 +295,7 @@ NvmeInitPrivateData ( DEBUG (( DEBUG_ERROR, "%a: Fail to allocate private data.\n", - __FUNCTION__ + __func__ )); return EFI_OUT_OF_RESOURCES; } @@ -313,13 +313,13 @@ NvmeInitPrivateData ( DEBUG (( DEBUG_ERROR, "%a: Fail to allocate DMA buffers.\n", - __FUNCTION__ + __func__ )); return Status; } =20 ASSERT (DeviceAddress =3D=3D ((EFI_PHYSICAL_ADDRESS)(UINTN)Private->Buff= er)); - DEBUG ((DEBUG_INFO, "%a: DMA buffer base at 0x%x\n", __FUNCTION__, Priva= te->Buffer)); + DEBUG ((DEBUG_INFO, "%a: DMA buffer base at 0x%x\n", __func__, Private->= Buffer)); =20 // // Initialize controller private data @@ -337,7 +337,7 @@ NvmeInitPrivateData ( DEBUG (( DEBUG_ERROR, "%a: Controller initialization fail with Status - %r.\n", - __FUNCTION__, + __func__, Status )); NvmeFreeDmaResource (Private); @@ -355,7 +355,7 @@ NvmeInitPrivateData ( DEBUG (( DEBUG_ERROR, "%a: Namespaces discovery fail with Status - %r.\n", - __FUNCTION__, + __func__, Status )); NvmeFreeDmaResource (Private); @@ -414,7 +414,7 @@ NvmeInitPrivateData ( DEBUG (( DEBUG_INFO, "%a: Security Security Command PPI will be produced.\n", - __FUNCTION__ + __func__ )); Private->StorageSecurityPpi.Revision =3D EDKII_STORAGE_SECUR= ITY_PPI_REVISION; Private->StorageSecurityPpi.GetNumberofDevices =3D NvmeStorageSecurity= GetDeviceNo; @@ -557,7 +557,7 @@ NvmeInitControllerDataFromPciDevice ( DEBUG (( DEBUG_INFO, "%a: Failed to init controller, with Status - %r\n", - __FUNCTION__, + __func__, Status )); } @@ -635,7 +635,7 @@ NvmeInitControllerFromHostControllerPpi ( DEBUG (( DEBUG_ERROR, "%a: Fail to allocate get the device path for Controller %d.\n", - __FUNCTION__, + __func__, Controller )); return Status; @@ -646,7 +646,7 @@ NvmeInitControllerFromHostControllerPpi ( DEBUG (( DEBUG_ERROR, "%a: Controller initialization fail for Controller %d with Status = - %r.\n", - __FUNCTION__, + __func__, Controller, Status )); @@ -654,7 +654,7 @@ NvmeInitControllerFromHostControllerPpi ( DEBUG (( DEBUG_INFO, "%a: Controller %d has been successfully initialized.\n", - __FUNCTION__, + __func__, Controller )); } @@ -712,7 +712,7 @@ NvmExpressPeimEntry ( IN CONST EFI_PEI_SERVICES **PeiServices ) { - DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__)); =20 PeiServicesNotifyPpi (&mNvmeHostControllerNotify); =20 diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c b/Md= eModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c index 576481dcee2a..a61238086cdf 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c @@ -125,14 +125,14 @@ NvmeRead ( MaxTransferBlocks =3D MaxTransferBlocks >> 1; =20 if ((Retries > NVME_READ_MAX_RETRY) || (MaxTransferBlocks < 1)) { - DEBUG ((DEBUG_ERROR, "%a: ReadSectors fail, Status - %r\n", __FUNC= TION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: ReadSectors fail, Status - %r\n", __func= __, Status)); break; } =20 DEBUG (( DEBUG_BLKIO, "%a: ReadSectors fail, retry with smaller transfer block number - = 0x%x\n", - __FUNCTION__, + __func__, MaxTransferBlocks )); continue; @@ -151,7 +151,7 @@ NvmeRead ( DEBUG_BLKIO, "%a: Lba =3D 0x%08Lx, Original =3D 0x%08Lx, " "Remaining =3D 0x%08Lx, BlockSize =3D 0x%x, Status =3D %r\n", - __FUNCTION__, + __func__, Lba, (UINT64)OrginalBlocks, (UINT64)Blocks, diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c b/MdeMod= ulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c index bff5cfd0d5fe..fc7b684940d9 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c @@ -138,7 +138,7 @@ NvmeBaseMemPageOffset ( PageSizeList[4] =3D NVME_PRP_SIZE; /* PRPs */ =20 if (BaseMemIndex > MAX_BASEMEM_COUNT) { - DEBUG ((DEBUG_ERROR, "%a: The input BaseMem index is invalid.\n", __FU= NCTION__)); + DEBUG ((DEBUG_ERROR, "%a: The input BaseMem index is invalid.\n", __fu= nc__)); ASSERT (FALSE); return 0; } @@ -191,7 +191,7 @@ NvmeWaitController ( // Status =3D NVME_GET_CSTS (Private, &Csts); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CSTS fail, Status - %r\n", __FUNC= TION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CSTS fail, Status - %r\n", __func= __, Status)); return Status; } =20 @@ -232,7 +232,7 @@ NvmeDisableController ( // Status =3D NVME_GET_CC (Private, &Cc); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CC fail, Status - %r\n", __FUNCTION= __, Status)); + DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CC fail, Status - %r\n", __func__, = Status)); goto ErrorExit; } =20 @@ -243,21 +243,21 @@ NvmeDisableController ( // Status =3D NVME_SET_CC (Private, &Cc); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __FUNCTI= ON__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __func__= , Status)); goto ErrorExit; } } =20 Status =3D NvmeWaitController (Private, FALSE); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __F= UNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __f= unc__, Status)); goto ErrorExit; } =20 return EFI_SUCCESS; =20 ErrorExit: - DEBUG ((DEBUG_ERROR, "%a fail, Status - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a fail, Status - %r\n", __func__, Status)); return Status; } =20 @@ -289,20 +289,20 @@ NvmeEnableController ( Cc.Iocqes =3D 4; Status =3D NVME_SET_CC (Private, &Cc); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __FUNCTION= __, Status)); + DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __func__, = Status)); goto ErrorExit; } =20 Status =3D NvmeWaitController (Private, TRUE); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __F= UNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __f= unc__, Status)); goto ErrorExit; } =20 return EFI_SUCCESS; =20 ErrorExit: - DEBUG ((DEBUG_ERROR, "%a fail, Status: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a fail, Status: %r\n", __func__, Status)); return Status; } =20 @@ -572,7 +572,7 @@ NvmeControllerInit ( // NVME_GET_CAP (Private, &Private->Cap); if ((Private->Cap.Css & BIT0) =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a: The NVME controller doesn't support NVMe com= mand set.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: The NVME controller doesn't support NVMe com= mand set.\n", __func__)); return EFI_UNSUPPORTED; } =20 @@ -580,7 +580,7 @@ NvmeControllerInit ( // Currently, the driver only supports 4k page size // if ((Private->Cap.Mpsmin + 12) > EFI_PAGE_SHIFT) { - DEBUG ((DEBUG_ERROR, "%a: The driver doesn't support page size other t= han 4K.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: The driver doesn't support page size other t= han 4K.\n", __func__)); ASSERT (FALSE); return EFI_UNSUPPORTED; } @@ -599,7 +599,7 @@ NvmeControllerInit ( // Status =3D NvmeDisableController (Private); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NvmeDisableController fail, Status - %r\n", = __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NvmeDisableController fail, Status - %r\n", = __func__, Status)); return Status; } =20 @@ -647,7 +647,7 @@ NvmeControllerInit ( // Status =3D NvmeEnableController (Private); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NvmeEnableController fail, Status - %r\n", _= _FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NvmeEnableController fail, Status - %r\n", _= _func__, Status)); return Status; } =20 @@ -663,7 +663,7 @@ NvmeControllerInit ( =20 Status =3D NvmeIdentifyController (Private, Private->ControllerData); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyController fail, Status - %r\n",= __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyController fail, Status - %r\n",= __func__, Status)); return Status; } =20 @@ -676,7 +676,7 @@ NvmeControllerInit ( DEBUG (( DEBUG_ERROR, "%a: Number of Namespaces field in Identify Controller data not supp= orted by the driver.\n", - __FUNCTION__ + __func__ )); return EFI_UNSUPPORTED; } @@ -686,13 +686,13 @@ NvmeControllerInit ( // Status =3D NvmeCreateIoCompletionQueue (Private); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Create IO completion queue fail, Status - %r= \n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Create IO completion queue fail, Status - %r= \n", __func__, Status)); return Status; } =20 Status =3D NvmeCreateIoSubmissionQueue (Private); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Create IO submission queue fail, Status - %r= \n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Create IO submission queue fail, Status - %r= \n", __func__, Status)); } =20 return Status; diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c b/M= deModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c index dc280ec4e35f..5081b53cd5e8 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c @@ -57,7 +57,7 @@ NvmeCreatePrpList ( DEBUG_ERROR, "%a: The implementation only supports PrpList number up to 4." " But %d are needed here.\n", - __FUNCTION__, + __func__, PrpListNo )); return 0; @@ -365,7 +365,7 @@ NvmePassThruExecute ( DEBUG (( DEBUG_ERROR, "%a, Invalid parameter: Packet(%lx)\n", - __FUNCTION__, + __func__, (UINTN)Packet )); return EFI_INVALID_PARAMETER; @@ -375,7 +375,7 @@ NvmePassThruExecute ( DEBUG (( DEBUG_ERROR, "%a, Invalid parameter: NvmeCmd (%lx)/NvmeCompletion(%lx)\n", - __FUNCTION__, + __func__, (UINTN)Packet->NvmeCmd, (UINTN)Packet->NvmeCompletion )); @@ -386,7 +386,7 @@ NvmePassThruExecute ( DEBUG (( DEBUG_ERROR, "%a, Invalid parameter: QueueId(%lx)\n", - __FUNCTION__, + __func__, (UINTN)Packet->QueueType )); return EFI_INVALID_PARAMETER; @@ -407,7 +407,7 @@ NvmePassThruExecute ( DEBUG (( DEBUG_ERROR, "%a: Nsid mismatch (%x, %x)\n", - __FUNCTION__, + __func__, Packet->NvmeCmd->Nsid, NamespaceId )); @@ -425,7 +425,7 @@ NvmePassThruExecute ( // ASSERT (Sq->Psdt =3D=3D 0); if (Sq->Psdt !=3D 0) { - DEBUG ((DEBUG_ERROR, "%a: Does not support SGL mechanism.\n", __FUNCTI= ON__)); + DEBUG ((DEBUG_ERROR, "%a: Does not support SGL mechanism.\n", __func__= )); return EFI_UNSUPPORTED; } =20 @@ -458,7 +458,7 @@ NvmePassThruExecute ( DEBUG (( DEBUG_ERROR, "%a: Does not support external IO queues creation request.\n", - __FUNCTION__ + __func__ )); return EFI_UNSUPPORTED; } @@ -480,7 +480,7 @@ NvmePassThruExecute ( ); if (EFI_ERROR (Status) || (MapLength !=3D Packet->TransferLength))= { Status =3D EFI_OUT_OF_RESOURCES; - DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __FUNCTIO= N__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __func__)= ); goto Exit; } =20 @@ -498,7 +498,7 @@ NvmePassThruExecute ( ); if (EFI_ERROR (Status) || (MapLength !=3D Packet->MetadataLength))= { Status =3D EFI_OUT_OF_RESOURCES; - DEBUG ((DEBUG_ERROR, "%a: Fail to map meta data buffer.\n", __FU= NCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to map meta data buffer.\n", __fu= nc__)); goto Exit; } =20 @@ -526,7 +526,7 @@ NvmePassThruExecute ( ); if (Sq->Prp[1] =3D=3D 0) { Status =3D EFI_OUT_OF_RESOURCES; - DEBUG ((DEBUG_ERROR, "%a: Create PRP list fail, Status - %r\n", __FU= NCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Create PRP list fail, Status - %r\n", __fu= nc__, Status)); goto Exit; } } else if ((Offset + Bytes) > EFI_PAGE_SIZE) { @@ -568,7 +568,7 @@ NvmePassThruExecute ( Data32 =3D ReadUnaligned32 ((UINT32 *)&Private->SqTdbl[QueueId]); Status =3D NVME_SET_SQTDBL (Private, QueueId, &Data32); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NVME_SET_SQTDBL fail, Status - %r\n", __FUNC= TION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NVME_SET_SQTDBL fail, Status - %r\n", __func= __, Status)); goto Exit; } =20 @@ -591,7 +591,7 @@ NvmePassThruExecute ( // // Timeout occurs for an NVMe command, reset the controller to abort t= he outstanding command // - DEBUG ((DEBUG_ERROR, "%a: Timeout occurs for the PassThru command.\n",= __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Timeout occurs for the PassThru command.\n",= __func__)); Status =3D NvmeControllerInit (Private); if (EFI_ERROR (Status)) { Status =3D EFI_DEVICE_ERROR; diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c b/MdeModulePkg/Bus= /Pci/PciBusDxe/PciCommand.c index ba4b099bc5c1..75c9b344eed2 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c @@ -237,7 +237,7 @@ LocatePciExpressCapabilityRegBlock ( DEBUG (( DEBUG_WARN, "%a: [%02x|%02x|%02x] failed to access config space at offset 0x%x= \n", - __FUNCTION__, + __func__, PciIoDevice->BusNumber, PciIoDevice->DeviceNumber, PciIoDevice->FunctionNumber, diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c b/MdeMod= ulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c index b20bcd310ad5..d573e532bac8 100644 --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c @@ -128,7 +128,7 @@ IntersectIoDescriptor ( EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: %a: add [%Lx, %Lx): %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, IntersectionBase, IntersectionEnd, Status @@ -141,7 +141,7 @@ IntersectIoDescriptor ( "%a: %a: desc [%Lx, %Lx) type %u conflicts with " "aperture [%Lx, %Lx)\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Descriptor->BaseAddress, Descriptor->BaseAddress + Descriptor->Length, (UINT32)Descriptor->GcdIoType, @@ -178,7 +178,7 @@ AddIoSpace ( DEBUG_ERROR, "%a: %a: GetIoSpaceMap(): %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return Status; @@ -299,7 +299,7 @@ IntersectMemoryDescriptor ( EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE, "%a: %a: add [%Lx, %Lx): %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, IntersectionBase, IntersectionEnd, Status @@ -312,7 +312,7 @@ IntersectMemoryDescriptor ( "%a: %a: desc [%Lx, %Lx) type %u cap %Lx conflicts " "with aperture [%Lx, %Lx) cap %Lx\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Descriptor->BaseAddress, Descriptor->BaseAddress + Descriptor->Length, (UINT32)Descriptor->GcdMemoryType, @@ -353,7 +353,7 @@ AddMemoryMappedIoSpace ( DEBUG_ERROR, "%a: %a: GetMemorySpaceMap(): %r\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); return Status; @@ -955,7 +955,7 @@ NotifyPhase ( DEBUG (( DEBUG_ERROR, "[%a:%d] Translation %lx is not aligned to %lx!\n", - __FUNCTION__, + __func__, DEBUG_LINE_NUMBER, Translation, Alignment diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c b/MdeModule= Pkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c index ab2becdd19e7..8496ce472768 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c @@ -641,7 +641,7 @@ SdMmcPciHcDriverBindingStart ( DEBUG (( DEBUG_INFO, "%a: found SD/MMC override protocol\n", - __FUNCTION__ + __func__ )); } } @@ -676,7 +676,7 @@ SdMmcPciHcDriverBindingStart ( DEBUG (( DEBUG_WARN, "%a: Failed to override capability - %r\n", - __FUNCTION__, + __func__, Status )); continue; @@ -691,7 +691,7 @@ SdMmcPciHcDriverBindingStart ( (VOID *)&Private->Slot[Slot].OperatingParame= ters ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_WARN, "%a: Failed to get operating parameters, usi= ng defaults\n", __FUNCTION__)); + DEBUG ((DEBUG_WARN, "%a: Failed to get operating parameters, usi= ng defaults\n", __func__)); } } } diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c b/MdeModulePk= g/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c index dd45167a009e..aab68153283e 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c @@ -498,7 +498,7 @@ SdMmcHcReset ( DEBUG (( DEBUG_WARN, "%a: SD/MMC pre reset notifier callback failed - %r\n", - __FUNCTION__, + __func__, Status )); return Status; @@ -556,7 +556,7 @@ SdMmcHcReset ( DEBUG (( DEBUG_WARN, "%a: SD/MMC post reset notifier callback failed - %r\n", - __FUNCTION__, + __func__, Status )); } @@ -942,7 +942,7 @@ SdMmcHcClockSupply ( DEBUG (( DEBUG_ERROR, "%a: SD/MMC switch clock freq post notifier callback failed - %r\n= ", - __FUNCTION__, + __func__, Status )); return Status; @@ -1234,7 +1234,7 @@ SdMmcHcInitHost ( DEBUG (( DEBUG_WARN, "%a: SD/MMC pre init notifier callback failed - %r\n", - __FUNCTION__, + __func__, Status )); return Status; @@ -1286,7 +1286,7 @@ SdMmcHcInitHost ( DEBUG (( DEBUG_WARN, "%a: SD/MMC post init notifier callback failed - %r\n", - __FUNCTION__, + __func__, Status )); } @@ -1375,7 +1375,7 @@ SdMmcHcUhsSignaling ( DEBUG (( DEBUG_ERROR, "%a: SD/MMC uhs signaling notifier callback failed - %r\n", - __FUNCTION__, + __func__, Status )); return Status; diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/Xhc= iDxe/Xhci.c index d8fa41f68f55..62682dd27c47 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c @@ -2059,7 +2059,7 @@ XhcDriverBindingStart ( DEBUG (( DEBUG_WARN, "%a: failed to enable 64-bit DMA on 64-bit capable controller @ %p= (%r)\n", - __FUNCTION__, + __func__, Controller, Status )); diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pc= i/XhciDxe/XhciSched.c index 4b7462704a81..298fb88b811e 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c @@ -1495,7 +1495,7 @@ XhciInsertAsyncIntTransfer ( =20 Data =3D AllocateZeroPool (DataLen); if (Data =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __func__)); return NULL; } =20 @@ -1513,7 +1513,7 @@ XhciInsertAsyncIntTransfer ( Context ); if (Urb =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __func__)); FreePool (Data); return NULL; } diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bu= s/Scsi/ScsiDiskDxe/ScsiDisk.c index 873581d817ce..670f70caf41f 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c @@ -2593,7 +2593,7 @@ ScsiDiskInquiryDevice ( DEBUG (( DEBUG_WARN, "%a: invalid PageLength (%u) in Supported VPD Pages page\n", - __FUNCTION__, + __func__, (UINT32)PageLength )); PageLength =3D 0; @@ -2606,7 +2606,7 @@ ScsiDiskInquiryDevice ( DEBUG (( DEBUG_WARN, "%a: Supported VPD Pages page doesn't start with code 0x%02x\n= ", - __FUNCTION__, + __func__, EFI_SCSI_PAGE_CODE_SUPPORTED_VPD )); PageLength =3D 0; @@ -2626,7 +2626,7 @@ ScsiDiskInquiryDevice ( DEBUG (( DEBUG_WARN, "%a: non-ascending code in Supported VPD Pages page @ %u\n", - __FUNCTION__, + __func__, Index )); Index =3D 0; diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/C= ore/Dxe/Dispatcher/Dispatcher.c index fb9ae3ce78da..cf9d55687766 100644 --- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c @@ -1095,7 +1095,7 @@ CoreProcessFvImageFile ( DEBUG (( DEBUG_INFO, "%a() FV at 0x%x, FvAlignment required is 0x%x\n", - __FUNCTION__, + __func__, FvHeader, FvAlignment )); diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dx= e/DxeMain/DxeMain.c index 4683016ed758..0e0f9769b99d 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -315,7 +315,7 @@ DxeMain ( DEBUG (( DEBUG_INFO, "%a: MemoryBaseAddress=3D0x%Lx MemoryLength=3D0x%Lx\n", - __FUNCTION__, + __func__, MemoryBaseAddress, MemoryLength )); diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/C= ore/Dxe/Misc/MemoryProtection.c index b89ab046fa73..7cc829b17402 100644 --- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c +++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c @@ -838,7 +838,7 @@ InitializeDxeNxMemoryProtectionPolicy ( DEBUG (( DEBUG_INFO, "%a: StackBase =3D 0x%016lx StackSize =3D 0x%016lx\n", - __FUNCTION__, + __func__, MemoryHob->AllocDescriptor.MemoryBaseAddress, MemoryHob->AllocDescriptor.MemoryLength )); @@ -864,7 +864,7 @@ InitializeDxeNxMemoryProtectionPolicy ( DEBUG (( DEBUG_INFO, "%a: applying strict permissions to active memory regions\n", - __FUNCTION__ + __func__ )); =20 MergeMemoryMapForProtectionPolicy (MemoryMap, &MemoryMapSize, Descriptor= Size); @@ -926,7 +926,7 @@ InitializeDxeNxMemoryProtectionPolicy ( DEBUG (( DEBUG_INFO, "%a: applying strict permissions to inactive memory regions\n", - __FUNCTION__ + __func__ )); =20 CoreAcquireGcdMemoryLock (); diff --git a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.= c b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c index b8d4184b5064..2152833ff639 100644 --- a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c +++ b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c @@ -1304,7 +1304,7 @@ GetSection ( DEBUG (( DEBUG_ERROR, "%a: recursion aborted due to nesting depth\n", - __FUNCTION__ + __func__ )); // // Map "aborted" to "not found". diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/MdeModulePkg= /Core/DxeIplPeim/Ia32/DxeLoadFunc.c index fdeaaa39d88e..4bc7b749b0fc 100644 --- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c @@ -369,7 +369,7 @@ HandOffToDxeCore ( DEBUG (( DEBUG_INFO, "%a() Stack Base: 0x%lx, Stack Size: 0x%x\n", - __FUNCTION__, + __func__, BaseOfStack, STACK_SIZE )); @@ -457,7 +457,7 @@ HandOffToDxeCore ( DEBUG (( DEBUG_INFO, "%a() Stack Base: 0x%lx, Stack Size: 0x%x\n", - __FUNCTION__, + __func__, BaseOfStack, STACK_SIZE )); diff --git a/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c b/MdeModule= Pkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c index f7b57df1c49e..b3567d88f734 100644 --- a/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c @@ -36,7 +36,7 @@ HandOffToDxeCore ( // BaseOfStack =3D AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE)); if (BaseOfStack =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Can't allocate memory for stack.", __FUNCTIO= N__)); + DEBUG ((DEBUG_ERROR, "%a: Can't allocate memory for stack.", __func__)= ); ASSERT (FALSE); } =20 @@ -52,7 +52,7 @@ HandOffToDxeCore ( // Status =3D PeiServicesInstallPpi (&gEndOfPeiSignalPpi); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to signal End of PEI event.", __FUNCTIO= N__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to signal End of PEI event.", __func__)= ); ASSERT (FALSE); } =20 diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/C= ore/Pei/Dispatcher/Dispatcher.c index 3552feda8f1b..d8284f9f4f34 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -101,7 +101,7 @@ DiscoverPeimsAndOrderWithApriori ( DEBUG (( DEBUG_INFO, "%a(): Found 0x%x PEI FFS files in the %dth FV\n", - __FUNCTION__, + __func__, PeimCount, Private->CurrentPeimFvCount )); diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/Fw= Vol/FwVol.c index 60bbe57332b7..f7cc94c6ebd0 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c @@ -1494,7 +1494,7 @@ ProcessFvFile ( DEBUG (( DEBUG_INFO, "%a() FV at 0x%x, FvAlignment required is 0x%x\n", - __FUNCTION__, + __func__, FvHeader, FvAlignment )); diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c b/= MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c index efc6b4ce2661..a1523428cdaa 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c @@ -502,7 +502,7 @@ InitCapsuleVariable ( // Locate the VariablePolicy protocol Status =3D gBS->LocateProtocol (&gEdkiiVariablePolicyProtocolGuid, NULL,= (VOID **)&VariablePolicy); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "DxeCapsuleReportLib %a - Could not locate Variab= lePolicy protocol! %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "DxeCapsuleReportLib %a - Could not locate Variab= lePolicy protocol! %r\n", __func__, Status)); ASSERT_EFI_ERROR (Status); } =20 diff --git a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c b/M= deModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c index 8c7b58b2f960..a6af2e848562 100644 --- a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c +++ b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c @@ -579,7 +579,7 @@ S3BootScriptLibDeinitialize ( return RETURN_SUCCESS; } =20 - DEBUG ((DEBUG_INFO, "%a() in %a module\n", __FUNCTION__, gEfiCallerBaseN= ame)); + DEBUG ((DEBUG_INFO, "%a() in %a module\n", __func__, gEfiCallerBaseName)= ); =20 if (mEventDxeSmmReadyToLock !=3D NULL) { // diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c b/MdeModul= ePkg/Library/ResetUtilityLib/ResetUtility.c index 50131a431f97..4ca8425705f8 100644 --- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c +++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c @@ -132,7 +132,7 @@ GetResetPlatformSpecificGuid ( // if ((ResetDataStringSize < DataSize) && ((DataSize - ResetDataStringSize= ) >=3D sizeof (GUID))) { ResetSubtypeGuid =3D (GUID *)((UINT8 *)ResetData + ResetDataStringSize= ); - DEBUG ((DEBUG_VERBOSE, "%a - Detected reset subtype %g...\n", __FUNCTI= ON__, ResetSubtypeGuid)); + DEBUG ((DEBUG_VERBOSE, "%a - Detected reset subtype %g...\n", __func__= , ResetSubtypeGuid)); return ResetSubtypeGuid; } =20 diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePk= g/Library/UefiBootManagerLib/BmBoot.c index bde22fa6590e..c3763c4483c7 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -1448,7 +1448,7 @@ BmExpandLoadFile ( "%a:%a: failed to allocate reserved pages: " "BufferSize=3D%Lu LoadFile=3D\"%s\" FilePath=3D\"%s\"\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (UINT64)BufferSize, LoadFileText, FileText diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c b/Mde= ModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c index 46a2fa201627..46a8b780e337 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c @@ -581,7 +581,7 @@ BmRepairAllControllers ( DEBUG (( DEBUG_ERROR, "[%a:%d] Repair failed after %d retries.\n", - __FUNCTION__, + __func__, DEBUG_LINE_NUMBER, ReconnectRepairCount )); diff --git a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c b/M= deModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c index da90f4fc6ac9..5de46133bb26 100644 --- a/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c +++ b/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c @@ -95,7 +95,7 @@ VarCheckPolicyLibMmiHandler ( // // If either of the pointers are NULL, we can't proceed. if ((CommBuffer =3D=3D NULL) || (CommBufferSize =3D=3D NULL)) { - DEBUG ((DEBUG_INFO, "%a - Invalid comm buffer pointers!\n", __FUNCTION= __)); + DEBUG ((DEBUG_INFO, "%a - Invalid comm buffer pointers!\n", __func__)); return EFI_INVALID_PARAMETER; } =20 @@ -105,14 +105,14 @@ VarCheckPolicyLibMmiHandler ( if ((InternalCommBufferSize > VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE) || !VarCheckPolicyIsBufferOutsideValid ((UINTN)CommBuffer, (UINT64)Inte= rnalCommBufferSize)) { - DEBUG ((DEBUG_ERROR, "%a - Invalid CommBuffer supplied! 0x%016lX[0x%01= 6lX]\n", __FUNCTION__, CommBuffer, InternalCommBufferSize)); + DEBUG ((DEBUG_ERROR, "%a - Invalid CommBuffer supplied! 0x%016lX[0x%01= 6lX]\n", __func__, CommBuffer, InternalCommBufferSize)); return EFI_INVALID_PARAMETER; } =20 // If the size does not meet a minimum threshold, we cannot proceed. ExpectedSize =3D sizeof (VAR_CHECK_POLICY_COMM_HEADER); if (InternalCommBufferSize < ExpectedSize) { - DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION= __, InternalCommBufferSize, ExpectedSize)); + DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, = InternalCommBufferSize, ExpectedSize)); return EFI_INVALID_PARAMETER; } =20 @@ -128,7 +128,7 @@ VarCheckPolicyLibMmiHandler ( if ((InternalPolicyCommmHeader->Signature !=3D VAR_CHECK_POLICY_COMM_SIG= ) || (InternalPolicyCommmHeader->Revision !=3D VAR_CHECK_POLICY_COMM_REVI= SION)) { - DEBUG ((DEBUG_INFO, "%a - Signature or revision are incorrect!\n", __F= UNCTION__)); + DEBUG ((DEBUG_INFO, "%a - Signature or revision are incorrect!\n", __f= unc__)); // We have verified the buffer is not null and have enough size to hol= d Result field. PolicyCommmHeader->Result =3D EFI_INVALID_PARAMETER; return EFI_SUCCESS; @@ -157,7 +157,7 @@ VarCheckPolicyLibMmiHandler ( // This add should be safe because these are fixed sizes so far. ExpectedSize +=3D sizeof (VAR_CHECK_POLICY_COMM_IS_ENABLED_PARAMS); if (InternalCommBufferSize < ExpectedSize) { - DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNC= TION__, InternalCommBufferSize, ExpectedSize)); + DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func= __, InternalCommBufferSize, ExpectedSize)); PolicyCommmHeader->Result =3D EFI_INVALID_PARAMETER; break; } @@ -173,7 +173,7 @@ VarCheckPolicyLibMmiHandler ( // This add should be safe because these are fixed sizes so far. ExpectedSize +=3D sizeof (VARIABLE_POLICY_ENTRY); if (InternalCommBufferSize < ExpectedSize) { - DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNC= TION__, InternalCommBufferSize, ExpectedSize)); + DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func= __, InternalCommBufferSize, ExpectedSize)); PolicyCommmHeader->Result =3D EFI_INVALID_PARAMETER; break; } @@ -186,7 +186,7 @@ VarCheckPolicyLibMmiHandler ( EFI_ERROR (SafeUintnAdd (sizeof (VAR_CHECK_POLICY_COMM_HEADER), = PolicyEntry->Size, &ExpectedSize)) || (InternalCommBufferSize < ExpectedSize)) { - DEBUG ((DEBUG_INFO, "%a - Bad policy entry contents!\n", __FUNCTIO= N__)); + DEBUG ((DEBUG_INFO, "%a - Bad policy entry contents!\n", __func__)= ); PolicyCommmHeader->Result =3D EFI_INVALID_PARAMETER; break; } @@ -199,7 +199,7 @@ VarCheckPolicyLibMmiHandler ( // This add should be safe because these are fixed sizes so far. ExpectedSize +=3D sizeof (VAR_CHECK_POLICY_COMM_DUMP_PARAMS) + VAR_C= HECK_POLICY_MM_DUMP_BUFFER_SIZE; if (InternalCommBufferSize < ExpectedSize) { - DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNC= TION__, InternalCommBufferSize, ExpectedSize)); + DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func= __, InternalCommBufferSize, ExpectedSize)); PolicyCommmHeader->Result =3D EFI_INVALID_PARAMETER; break; } @@ -298,7 +298,7 @@ VarCheckPolicyLibMmiHandler ( =20 default: // Mark unknown requested command as EFI_UNSUPPORTED. - DEBUG ((DEBUG_INFO, "%a - Invalid command requested! %d\n", __FUNCTI= ON__, PolicyCommmHeader->Command)); + DEBUG ((DEBUG_INFO, "%a - Invalid command requested! %d\n", __func__= , PolicyCommmHeader->Command)); PolicyCommmHeader->Result =3D EFI_UNSUPPORTED; break; } @@ -306,7 +306,7 @@ VarCheckPolicyLibMmiHandler ( DEBUG (( DEBUG_VERBOSE, "%a - Command %d returning %r.\n", - __FUNCTION__, + __func__, PolicyCommmHeader->Command, PolicyCommmHeader->Result )); @@ -349,7 +349,7 @@ VarCheckPolicyLibCommonConstructor ( } // Otherwise, there's not much we can do. else { - DEBUG ((DEBUG_ERROR, "%a - Cannot Initialize VariablePolicyLib! %r\n",= __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Cannot Initialize VariablePolicyLib! %r\n",= __func__, Status)); ASSERT_EFI_ERROR (Status); } =20 diff --git a/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c b/M= deModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c index 82dae67ef50f..214f76ab9626 100644 --- a/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c +++ b/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c @@ -521,7 +521,7 @@ ValidateSetVariable ( DEBUG (( DEBUG_VERBOSE, "%a - Bad Size. 0x%X <> 0x%X-0x%X\n", - __FUNCTION__, + __func__, DataSize, ActivePolicy->MinSize, ActivePolicy->MaxSize @@ -537,7 +537,7 @@ ValidateSetVariable ( DEBUG (( DEBUG_VERBOSE, "%a - Bad Attributes. 0x%X <> 0x%X:0x%X\n", - __FUNCTION__, + __func__, Attributes, ActivePolicy->AttributesMustHave, ActivePolicy->AttributesCantHave @@ -598,7 +598,7 @@ ValidateSetVariable ( } =20 Exit: - DEBUG ((DEBUG_VERBOSE, "%a - Variable (%g:%s) returning %r.\n", __FUNCTI= ON__, VendorGuid, VariableName, ReturnStatus)); + DEBUG ((DEBUG_VERBOSE, "%a - Variable (%g:%s) returning %r.\n", __func__= , VendorGuid, VariableName, ReturnStatus)); return ReturnStatus; } =20 diff --git a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c b/MdeModulePkg= /Universal/CapsulePei/UefiCapsule.c index cdeffa911311..8e26a7d7959e 100644 --- a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c +++ b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c @@ -344,7 +344,7 @@ Thunk32To64 ( DEBUG (( DEBUG_INFO, "%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n", - __FUNCTION__, + __func__, Context->StackBufferBase, Context->StackBufferLength )); @@ -917,7 +917,7 @@ GetScatterGatherHeadEntries ( CapsuleDataPtr64 =3D 0; =20 if ((ListLength =3D=3D NULL) || (HeadList =3D=3D NULL)) { - DEBUG ((DEBUG_ERROR, "%a Invalid parameters. Inputs can't be NULL\n",= __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a Invalid parameters. Inputs can't be NULL\n",= __func__)); ASSERT (ListLength !=3D NULL); ASSERT (HeadList !=3D NULL); return EFI_INVALID_PARAMETER; @@ -1022,7 +1022,7 @@ GetScatterGatherHeadEntries ( } =20 if (ValidIndex =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a didn't find any SG lists in variables\n", __F= UNCTION__)); + DEBUG ((DEBUG_ERROR, "%a didn't find any SG lists in variables\n", __f= unc__)); return EFI_NOT_FOUND; } =20 @@ -1101,7 +1101,7 @@ CapsuleCoalesce ( // Status =3D GetScatterGatherHeadEntries (&ListLength, &VariableArrayAddre= ss); if (EFI_ERROR (Status) || (VariableArrayAddress =3D=3D NULL)) { - DEBUG ((DEBUG_ERROR, "%a failed to get Scatter Gather List Head Entrie= s. Status =3D %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a failed to get Scatter Gather List Head Entrie= s. Status =3D %r\n", __func__, Status)); goto Done; } =20 diff --git a/MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c b/MdeModulePk= g/Universal/CapsulePei/X64/X64Entry.c index 05941f9f8d56..4085f371abad 100644 --- a/MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c +++ b/MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c @@ -277,7 +277,7 @@ _ModuleEntryPoint ( DEBUG (( DEBUG_INFO, "%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n", - __FUNCTION__, + __func__, EntrypointContext->StackBufferBase, EntrypointContext->StackBufferLength )); diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c b/MdeModulePkg/= Universal/Disk/PartitionDxe/Udf.c index 098e4fec663b..6e10defe59c0 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c @@ -114,7 +114,7 @@ FindAnchorVolumeDescriptorPointer ( DEBUG (( DEBUG_ERROR, "%a: Media block size 0x%x unable to hold an AVDP.\n", - __FUNCTION__, + __func__, BlockSize )); return EFI_UNSUPPORTED; @@ -140,7 +140,7 @@ FindAnchorVolumeDescriptorPointer ( // Check if read block is a valid AVDP descriptor // if (DescriptorTag->TagIdentifier =3D=3D UdfAnchorVolumeDescriptorPointer= ) { - DEBUG ((DEBUG_INFO, "%a: found AVDP at block %d\n", __FUNCTION__, 256)= ); + DEBUG ((DEBUG_INFO, "%a: found AVDP at block %d\n", __func__, 256)); AvdpsCount++; } =20 @@ -167,7 +167,7 @@ FindAnchorVolumeDescriptorPointer ( DEBUG (( DEBUG_INFO, "%a: found AVDP at block %Ld\n", - __FUNCTION__, + __func__, EndLBA - 256 )); return EFI_SUCCESS; @@ -251,13 +251,13 @@ FindAnchorVolumeDescriptorPointer ( DEBUG (( DEBUG_WARN, "%a: found AVDP at block %Ld\n", - __FUNCTION__, + __func__, LastAvdpBlockNum )); DEBUG (( DEBUG_WARN, "%a: correcting last block from %Ld to %Ld\n", - __FUNCTION__, + __func__, EndLBA, LastAvdpBlockNum )); diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/File.c b/MdeModulePkg/Unive= rsal/Disk/UdfDxe/File.c index 6cd197046f40..ca2f3e076610 100644 --- a/MdeModulePkg/Universal/Disk/UdfDxe/File.c +++ b/MdeModulePkg/Universal/Disk/UdfDxe/File.c @@ -262,7 +262,7 @@ UdfOpen ( DEBUG (( DEBUG_ERROR, "%a: GetFileSize() fails with status - %r.\n", - __FUNCTION__, + __func__, Status )); goto Error_Get_File_Size; diff --git a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c b/Md= eModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c index 2998c3369cc9..86020de6e092 100644 --- a/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c +++ b/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c @@ -298,7 +298,7 @@ GetLongAdLsn ( DEBUG (( DEBUG_ERROR, "%a: Fail to get the Partition Descriptor from the given Long Alloca= tion Descriptor.\n", - __FUNCTION__ + __func__ )); return EFI_UNSUPPORTED; } diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrit= e.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c index 53f9aefb2dbb..10a67767ebc5 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c @@ -731,7 +731,7 @@ FtwRestart ( return EFI_ABORTED; } =20 - DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a(): success\n", __func__)); return EFI_SUCCESS; } =20 @@ -787,7 +787,7 @@ FtwAbort ( =20 FtwDevice->FtwLastWriteHeader->Complete =3D FTW_VALID_STATE; =20 - DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a(): success\n", __func__)); return EFI_SUCCESS; } =20 @@ -901,7 +901,7 @@ FtwGetLastWrite ( Status =3D EFI_SUCCESS; } =20 - DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a(): success\n", __func__)); =20 return Status; } diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c b/MdeMo= dulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c index f1335870e797..508184f7a048 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c @@ -1320,7 +1320,7 @@ InitFtwProtocol ( DEBUG (( DEBUG_INFO, "Ftw: Restart working block update in %a() - %r\n", - __FUNCTION__, + __func__, Status )); FtwAbort (&FtwDevice->FtwInstance); diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Univer= sal/PCD/Dxe/Service.c index 5ade8d988bac..1ae06a639c43 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c @@ -1632,7 +1632,7 @@ GetExPcdTokenNumber ( } } =20 - DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token num= ber: %d\n", __FUNCTION__, Guid, ExTokenNumber)); + DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token num= ber: %d\n", __func__, Guid, ExTokenNumber)); ASSERT (FALSE); =20 return 0; diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c b/MdeModulePkg/Un= iversal/SmbiosDxe/SmbiosDxe.c index dd077bb0cf19..1a86e69d3c21 100644 --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c @@ -1157,7 +1157,7 @@ SmbiosCreateTable ( DEBUG (( DEBUG_INFO, "%a() re-allocate SMBIOS 32-bit table\n", - __FUNCTION__ + __func__ )); if (EntryPointStructure->TableAddress !=3D 0) { // @@ -1329,7 +1329,7 @@ SmbiosCreate64BitTable ( DEBUG (( DEBUG_INFO, "%a() re-allocate SMBIOS 64-bit table\n", - __FUNCTION__ + __func__ )); if (Smbios30EntryPointStructure->TableAddress !=3D 0) { // diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c b/M= deModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c index 88984c31ab4f..114d0693fe77 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c @@ -116,7 +116,7 @@ MorLockInitAtEndOfDxe ( // First, we obviously need to locate the VariablePolicy protocol. Status =3D gBS->LocateProtocol (&gEdkiiVariablePolicyProtocolGuid, NULL,= (VOID **)&VariablePolicy); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Could not locate VariablePolicy protocol! %= r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Could not locate VariablePolicy protocol! %= r\n", __func__, Status)); return; } =20 @@ -132,7 +132,7 @@ MorLockInitAtEndOfDxe ( VARIABLE_POLICY_TYPE_LOCK_NOW ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __FUNCTI= ON__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status)); + DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __func__= , MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status)); } =20 Status =3D RegisterBasicVariablePolicy ( @@ -146,7 +146,7 @@ MorLockInitAtEndOfDxe ( VARIABLE_POLICY_TYPE_LOCK_NOW ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __FUNCTI= ON__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status)); + DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __func__= , MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status)); } =20 return; diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c b/M= deModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c index 296afd2ec414..da1105ff073e 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c @@ -485,7 +485,7 @@ MorLockInitAtEndOfDxe ( DEBUG (( DEBUG_WARN, "%a: deleting unexpected / unsupported variable %g:%s\n", - __FUNCTION__, + __func__, &gEfiMemoryOverwriteControlDataGuid, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME )); @@ -521,7 +521,7 @@ MorLockInitAtEndOfDxe ( } =20 if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTI= ON__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__= , MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status)); ASSERT_EFI_ERROR (Status); } =20 @@ -559,7 +559,7 @@ MorLockInitAtEndOfDxe ( } =20 if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTI= ON__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__= , MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status)); ASSERT_EFI_ERROR (Status); } =20 diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeMod= ulePkg/Universal/Variable/RuntimeDxe/Variable.c index 3eb7d935b4d2..7a1331255b81 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c @@ -2770,7 +2770,7 @@ VariableServiceSetVariable ( DEBUG (( DEBUG_ERROR, "%a: Failed to set variable '%s' with Guid %g\n", - __FUNCTION__, + __func__, VariableName, VendorGuid )); @@ -2792,7 +2792,7 @@ VariableServiceSetVariable ( DEBUG (( DEBUG_ERROR, "%a: Failed to set variable '%s' with Guid %g\n", - __FUNCTION__, + __func__, VariableName, VendorGuid )); @@ -2814,7 +2814,7 @@ VariableServiceSetVariable ( DEBUG (( DEBUG_ERROR, "%a: Failed to set variable '%s' with Guid %g\n", - __FUNCTION__, + __func__, VariableName, VendorGuid )); diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequest= ToLock.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestTo= Lock.c index d849ee9ce292..f6bb7284f060 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c @@ -48,7 +48,7 @@ VariableLockRequestToLock ( EFI_STATUS Status; VARIABLE_POLICY_ENTRY *NewPolicy; =20 - DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! %a() will go away soon= !\n", __FUNCTION__)); + DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! %a() will go away soon= !\n", __func__)); DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Please move to use Var= iable Policy!\n")); DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", Ve= ndorGuid, VariableName)); =20 @@ -85,7 +85,7 @@ VariableLockRequestToLock ( } =20 if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTI= ON__, VariableName, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__= , VariableName, Status)); } =20 if (NewPolicy !=3D NULL) { diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDx= e.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c index b2094fbcd6ea..6151a2ba0b18 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c @@ -95,7 +95,7 @@ ProtocolDisableVariablePolicy ( PolicyHeader->Command =3D VAR_CHECK_POLICY_COMMAND_DISABLE; =20 Status =3D InternalMmCommunicate (CommHeader, &BufferSize); - DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION= __, Status)); + DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, = Status)); =20 ReleaseLockOnlyAtBootTime (&mMmCommunicationLock); =20 @@ -144,7 +144,7 @@ ProtocolIsVariablePolicyEnabled ( PolicyHeader->Command =3D VAR_CHECK_POLICY_COMMAND_IS_ENABLED; =20 Status =3D InternalMmCommunicate (CommHeader, &BufferSize); - DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION= __, Status)); + DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, = Status)); =20 if (!EFI_ERROR (Status)) { Status =3D PolicyHeader->Result; @@ -197,7 +197,7 @@ ProtocolRegisterVariablePolicy ( DEBUG (( DEBUG_ERROR, "%a - Policy too large for buffer! %r, %d > %d \n", - __FUNCTION__, + __func__, Status, RequiredSize, mMmCommunicationBufferSize @@ -222,7 +222,7 @@ ProtocolRegisterVariablePolicy ( CopyMem (PolicyBuffer, NewPolicy, NewPolicy->Size); =20 Status =3D InternalMmCommunicate (CommHeader, &BufferSize); - DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION= __, Status)); + DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, = Status)); =20 ReleaseLockOnlyAtBootTime (&mMmCommunicationLock); =20 @@ -278,7 +278,7 @@ DumpVariablePolicyHelper ( CommandParams->PageRequested =3D PageRequested; =20 Status =3D InternalMmCommunicate (CommHeader, &BufferSize); - DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION= __, Status)); + DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, = Status)); =20 if (!EFI_ERROR (Status)) { Status =3D PolicyHeader->Result; @@ -403,7 +403,7 @@ ProtocolLockVariablePolicy ( PolicyHeader->Command =3D VAR_CHECK_POLICY_COMMAND_LOCK; =20 Status =3D InternalMmCommunicate (CommHeader, &BufferSize); - DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION= __, Status)); + DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, = Status)); =20 ReleaseLockOnlyAtBootTime (&mMmCommunicationLock); =20 @@ -500,7 +500,7 @@ VariablePolicySmmDxeMain ( // Locate the shared comm buffer to use for sending MM commands. Status =3D InitMmCommonCommBuffer (&mMmCommunicationBufferSize, &mMmComm= unicationBuffer); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to locate a viable MM comm buffer! %= r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to locate a viable MM comm buffer! %= r\n", __func__, Status)); ASSERT_EFI_ERROR (Status); return Status; } @@ -508,7 +508,7 @@ VariablePolicySmmDxeMain ( // Locate the MmCommunication protocol. Status =3D gBS->LocateProtocol (&gEfiMmCommunication2ProtocolGuid, NULL,= (VOID **)&mMmCommunication); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to locate MmCommunication protocol! = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to locate MmCommunication protocol! = %r\n", __func__, Status)); ASSERT_EFI_ERROR (Status); return Status; } @@ -529,7 +529,7 @@ VariablePolicySmmDxeMain ( NULL ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to install protocol! %r\n", __FUNCTI= ON__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to install protocol! %r\n", __func__= , Status)); goto Exit; } else { ProtocolInstalled =3D TRUE; @@ -551,7 +551,7 @@ VariablePolicySmmDxeMain ( &VirtualAddressChangeEvent ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to create VirtualAddressChange event= ! %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to create VirtualAddressChange event= ! %r\n", __func__, Status)); goto Exit; } else { VirtualAddressChangeRegistered =3D TRUE; --=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 (#102635): https://edk2.groups.io/g/devel/message/102635 Mute This Topic: https://groups.io/mt/98115231/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- From nobody Wed May 15 21:28:32 2024 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+102636+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+102636+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819840; cv=none; d=zohomail.com; s=zohoarc; b=DjDJ7omAnrgJC7l0ASf8Tt6zZG/Rl3hiN4a0JH1Z9Zue6hSULo4HLD0g/MBWGHKv+AYtcmKALvJtVlPFtNfAmnHKAw7OYRtbsYR+06hDYEVSQFUfBfVQ5Mxa9dPCk9OvK+60KLXZpNJBAH39GU8kGaQB+2U6oLTaecv5VP7/Jc8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819840; 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=8wpFMsYuHNw5uX0CHjHyfE2y+8HQiIFphVAugdx+xzk=; b=GaB1FCl2VCThME4CVdBVeRdKN/+/Wg+slCbPP0wrOGLXBtERnu+Eymx1xrSFFBo+QMTb6u30u5VgORle5egk/rpID0d43/cjCp8QmBRB+pyvJrPaFmZDKbwxbZjRa9uAZ+O0YrwzJGBAsbbbiq8rxYCiWumasGCFwcoLnGnyMlA= 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+102636+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819840057210.63873775812579; Thu, 6 Apr 2023 15:24:00 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 6b45YY1788612xPuZUHoIfto; Thu, 06 Apr 2023 15:23:59 -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.171992.1680819838785628340 for ; Thu, 06 Apr 2023 15:23:59 -0700 X-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 1F7685C01E5; Thu, 6 Apr 2023 18:23:58 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 06 Apr 2023 18:23:58 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:23:54 -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 06/18] SecurityPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:07 -0600 Message-Id: <20230406222319.2281263-7-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: qyI3lIu6xwmetTykthCUQ67Px1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819839; bh=aPUcx6dl5/giUcz120kSADP7hIlrZiBjZJfwuj+/wvo=; h=Cc:Date:From:Reply-To:Subject:To; b=NMU7j3vhD7Vvuw7R8VhTCFygZ/Nq+vI8RcisabrWW/kPqJzMTftjwghURMiMguEitxO Di4tikSfYDzOLaf5X9awoXvc1hSMwUn2WpDdzX5r63WUg7/Z9J4YDhB73neWaYcu7JL8s hG43WEiYu2FFTb+Y7p+ryvhWmuvf2+7W550= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819841234100001 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 SecurityPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- SecurityPkg/HddPassword/HddPasswordDxe.c = | 44 ++++++++++---------- SecurityPkg/HddPassword/HddPasswordPei.c = | 10 ++--- SecurityPkg/Library/AuthVariableLib/AuthService.c = | 4 +- SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHierarc= hyLib.c | 6 +-- SecurityPkg/Library/PlatformPKProtectionLibVarPolicy/PlatformPKProtectionL= ibVarPolicy.c | 2 +- SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.c = | 38 ++++++++--------- SecurityPkg/Library/SecureBootVariableLib/UnitTest/SecureBootVariableLibUn= itTest.c | 4 +- SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariableProvi= sionLib.c | 2 +- SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c = | 24 +++++------ SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c = | 8 ++-- SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.c = | 10 ++--- SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.c = | 12 +++--- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c = | 10 ++--- SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c = | 22 +++++----- SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c = | 6 +-- SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigImpl= .c | 2 +- SecurityPkg/VariableAuthenticated/SecureBootDefaultKeysDxe/SecureBootDefau= ltKeysDxe.c | 14 +++---- 17 files changed, 109 insertions(+), 109 deletions(-) diff --git a/SecurityPkg/HddPassword/HddPasswordDxe.c b/SecurityPkg/HddPass= word/HddPasswordDxe.c index a1a63b67a494..55dfb25886fc 100644 --- a/SecurityPkg/HddPassword/HddPasswordDxe.c +++ b/SecurityPkg/HddPassword/HddPasswordDxe.c @@ -314,7 +314,7 @@ FreezeLockDevice ( =20 FreeAlignedPages (Asb, EFI_SIZE_TO_PAGES (sizeof (EFI_ATA_STATUS_BLOCK))= ); =20 - DEBUG ((DEBUG_INFO, "%a() - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a() - %r\n", __func__, Status)); return Status; } =20 @@ -449,7 +449,7 @@ HddPasswordEndOfDxeEventNotify ( EFI_STATUS Status; ATA_IDENTIFY_DATA IdentifyData; =20 - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); =20 mHddPasswordEndOfDxe =3D TRUE; =20 @@ -503,7 +503,7 @@ HddPasswordEndOfDxeEventNotify ( } } =20 - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); =20 gBS->CloseEvent (Event); } @@ -620,7 +620,7 @@ SaveHddPasswordVariable ( UINT8 HashData[SHA256_DIGEST_SIZE]; UINT8 SaltData[PASSWORD_SALT_SIZE]; =20 - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); =20 Delete =3D FALSE; if (!PasswordIsFullZero (Password)) { @@ -765,7 +765,7 @@ SaveHddPasswordVariable ( FreePool (Variable); } =20 - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); } =20 /** @@ -791,7 +791,7 @@ GetSavedHddPasswordVariable ( UINTN VariableSize; BOOLEAN Found; =20 - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); =20 Variable =3D NULL; VariableSize =3D 0; @@ -835,7 +835,7 @@ GetSavedHddPasswordVariable ( DEBUG ((DEBUG_INFO, "The variable node for the HDD password device is = not found\n")); } =20 - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); =20 return Found; } @@ -864,7 +864,7 @@ ValidateHddPassword ( BOOLEAN HashOk; UINT8 HashData[SHA256_DIGEST_SIZE]; =20 - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); =20 if (!GetSavedHddPasswordVariable (ConfigFormEntry, &HddPasswordVariable)= ) { DEBUG ((DEBUG_INFO, "GetSavedHddPasswordVariable failed\n")); @@ -884,7 +884,7 @@ ValidateHddPassword ( Status =3D EFI_SUCCESS; } =20 - DEBUG ((DEBUG_INFO, "%a() - exit (%r)\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a() - exit (%r)\n", __func__, Status)); return Status; } =20 @@ -982,7 +982,7 @@ UnlockHddPassword ( =20 ZeroMem (Buffer, sizeof (Buffer)); =20 - DEBUG ((DEBUG_INFO, "%a() - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a() - %r\n", __func__, Status)); return Status; } =20 @@ -1080,7 +1080,7 @@ DisableHddPassword ( =20 ZeroMem (Buffer, sizeof (Buffer)); =20 - DEBUG ((DEBUG_INFO, "%a() - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a() - %r\n", __func__, Status)); return Status; } =20 @@ -1185,7 +1185,7 @@ SetHddPassword ( =20 ZeroMem (Buffer, sizeof (Buffer)); =20 - DEBUG ((DEBUG_INFO, "%a() - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a() - %r\n", __func__, Status)); return Status; } =20 @@ -1357,7 +1357,7 @@ HddPasswordRequestPassword ( =20 RetryCount =3D 0; =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 UnicodeSPrint (PopUpString, sizeof (PopUpString), L"Unlock: %s", ConfigF= ormEntry->HddString); =20 @@ -1541,7 +1541,7 @@ ProcessHddPasswordRequestSetUserPwd ( =20 RetryCount =3D 0; =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 if (ConfigFormEntry->IfrData.SecurityStatus.Frozen) { DEBUG ((DEBUG_INFO, "%s is frozen, do nothing\n", ConfigFormEntry->Hdd= String)); @@ -1685,7 +1685,7 @@ ProcessHddPasswordRequestSetMasterPwd ( =20 RetryCount =3D 0; =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 if (ConfigFormEntry->IfrData.SecurityStatus.Frozen) { DEBUG ((DEBUG_INFO, "%s is frozen, do nothing\n", ConfigFormEntry->Hdd= String)); @@ -1812,7 +1812,7 @@ ProcessHddPasswordRequest ( HDD_PASSWORD_REQUEST_VARIABLE *Variable; UINTN VariableSize; =20 - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); =20 if (mHddPasswordRequestVariable =3D=3D NULL) { Status =3D GetVariable2 ( @@ -1873,7 +1873,7 @@ ProcessHddPasswordRequest ( TempVariable +=3D 1; } =20 - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); } =20 /** @@ -1892,7 +1892,7 @@ GetSavedHddPasswordRequest ( HDD_PASSWORD_REQUEST_VARIABLE *Variable; UINTN VariableSize; =20 - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); =20 Variable =3D NULL; VariableSize =3D 0; @@ -1934,7 +1934,7 @@ GetSavedHddPasswordRequest ( =20 FreePool (Variable); =20 - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); } =20 /** @@ -1956,7 +1956,7 @@ SaveHddPasswordRequest ( HDD_PASSWORD_REQUEST_VARIABLE *NewVariable; UINTN NewVariableSize; =20 - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); =20 DEBUG (( DEBUG_INFO, @@ -2047,7 +2047,7 @@ SaveHddPasswordRequest ( FreePool (Variable); } =20 - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); } =20 /** @@ -2865,7 +2865,7 @@ HddPasswordDxeInit ( HDD_PASSWORD_VARIABLE_NAME, &mHddPasswordVendorGuid ); - DEBUG ((DEBUG_INFO, "%a(): Lock %s variable (%r)\n", __FUNCTION__, HDD= _PASSWORD_VARIABLE_NAME, Status)); + DEBUG ((DEBUG_INFO, "%a(): Lock %s variable (%r)\n", __func__, HDD_PAS= SWORD_VARIABLE_NAME, Status)); ASSERT_EFI_ERROR (Status); } =20 diff --git a/SecurityPkg/HddPassword/HddPasswordPei.c b/SecurityPkg/HddPass= word/HddPasswordPei.c index a1c881599fa0..c56c00c685ac 100644 --- a/SecurityPkg/HddPassword/HddPasswordPei.c +++ b/SecurityPkg/HddPassword/HddPasswordPei.c @@ -103,7 +103,7 @@ UnlockDevice ( =20 ZeroMem (Buffer, sizeof (Buffer)); =20 - DEBUG ((DEBUG_INFO, "%a() - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a() - %r\n", __func__, Status)); return Status; } =20 @@ -186,7 +186,7 @@ FreezeLockDevice ( =20 FreeAlignedPages (Asb, EFI_SIZE_TO_PAGES (sizeof (EFI_ATA_STATUS_BLOCK))= ); =20 - DEBUG ((DEBUG_INFO, "%a() - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a() - %r\n", __func__, Status)); return Status; } =20 @@ -321,11 +321,11 @@ HddPasswordAtaPassThruNotify ( IN VOID *Ppi ) { - DEBUG ((DEBUG_INFO, "%a() - enter at S3 resume\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter at S3 resume\n", __func__)); =20 UnlockHddPassword ((EDKII_PEI_ATA_PASS_THRU_PPI *)Ppi); =20 - DEBUG ((DEBUG_INFO, "%a() - exit at S3 resume\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit at S3 resume\n", __func__)); =20 return EFI_SUCCESS; } @@ -360,7 +360,7 @@ HddPasswordPeiInit ( return EFI_UNSUPPORTED; } =20 - DEBUG ((DEBUG_INFO, "%a: Enters in S3 path.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Enters in S3 path.\n", __func__)); =20 Status =3D PeiServicesNotifyPpi (&mHddPasswordAtaPassThruPpiNotifyDesc); ASSERT_EFI_ERROR (Status); diff --git a/SecurityPkg/Library/AuthVariableLib/AuthService.c b/SecurityPk= g/Library/AuthVariableLib/AuthService.c index 452ed491eaac..d81c581d7885 100644 --- a/SecurityPkg/Library/AuthVariableLib/AuthService.c +++ b/SecurityPkg/Library/AuthVariableLib/AuthService.c @@ -1126,7 +1126,7 @@ CalculatePrivAuthVarSignChainSHA256Digest ( // Status =3D X509GetCommonName (SignerCert, SignerCertSize, CertCommonName= , &CertCommonNameSize); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a Get SignerCert CommonName failed with status %= x\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a Get SignerCert CommonName failed with status %= x\n", __func__, Status)); return EFI_ABORTED; } =20 @@ -1134,7 +1134,7 @@ CalculatePrivAuthVarSignChainSHA256Digest ( // Get TopLevelCert tbsCertificate // if (!X509GetTBSCert (TopLevelCert, TopLevelCertSize, &TbsCert, &TbsCertS= ize)) { - DEBUG ((DEBUG_INFO, "%a Get Top-level Cert tbsCertificate failed!\n", = __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a Get Top-level Cert tbsCertificate failed!\n", = __func__)); return EFI_ABORTED; } =20 diff --git a/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPla= tformHierarchyLib.c b/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/Pei= DxeTpmPlatformHierarchyLib.c index b8838766bc45..cdb5248aff74 100644 --- a/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHi= erarchyLib.c +++ b/SecurityPkg/Library/PeiDxeTpmPlatformHierarchyLib/PeiDxeTpmPlatformHi= erarchyLib.c @@ -205,7 +205,7 @@ DisableTpmPlatformHierarchy ( // Make sure that we have use of the TPM. Status =3D Tpm2RequestUseTpm (); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a:%a() - Tpm2RequestUseTpm Failed! %r\n", gEfiC= allerBaseName, __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a:%a() - Tpm2RequestUseTpm Failed! %r\n", gEfiC= allerBaseName, __func__, Status)); ASSERT_EFI_ERROR (Status); return Status; } @@ -224,9 +224,9 @@ DisableTpmPlatformHierarchy ( TPM_RH_PLATFORM, // Hierarchy NO // State ); - DEBUG ((DEBUG_VERBOSE, "%a:%a() - Disable PH =3D %r\n", gEfiCallerBaseN= ame, __FUNCTION__, Status)); + DEBUG ((DEBUG_VERBOSE, "%a:%a() - Disable PH =3D %r\n", gEfiCallerBaseN= ame, __func__, Status)); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a:%a() - Disable PH Failed! %r\n", gEfiCallerB= aseName, __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a:%a() - Disable PH Failed! %r\n", gEfiCallerB= aseName, __func__, Status)); ASSERT_EFI_ERROR (Status); } =20 diff --git a/SecurityPkg/Library/PlatformPKProtectionLibVarPolicy/PlatformP= KProtectionLibVarPolicy.c b/SecurityPkg/Library/PlatformPKProtectionLibVarP= olicy/PlatformPKProtectionLibVarPolicy.c index a2649242246f..ac18fcd7026f 100644 --- a/SecurityPkg/Library/PlatformPKProtectionLibVarPolicy/PlatformPKProtec= tionLibVarPolicy.c +++ b/SecurityPkg/Library/PlatformPKProtectionLibVarPolicy/PlatformPKProtec= tionLibVarPolicy.c @@ -33,7 +33,7 @@ DisablePKProtection ( EFI_STATUS Status; EDKII_VARIABLE_POLICY_PROTOCOL *VariablePolicy; =20 - DEBUG ((DEBUG_INFO, "%a() Entry...\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() Entry...\n", __func__)); =20 // IMPORTANT NOTE: This operation is sticky and leaves variable protecti= ons disabled. // The system *MUST* be reset after performing this ope= ration. diff --git a/SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLi= b.c b/SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.c index abca249c6504..24599c7a0ba3 100644 --- a/SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.c +++ b/SecurityPkg/Library/SecureBootVariableLib/SecureBootVariableLib.c @@ -276,7 +276,7 @@ CreateTimeBasedPayload ( UINTN DescriptorSize; =20 if ((Data =3D=3D NULL) || (DataSize =3D=3D NULL) || (Time =3D=3D NULL)) { - DEBUG ((DEBUG_ERROR, "%a(), invalid arg\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a(), invalid arg\n", __func__)); return EFI_INVALID_PARAMETER; } =20 @@ -292,7 +292,7 @@ CreateTimeBasedPayload ( DescriptorSize =3D OFFSET_OF (EFI_VARIABLE_AUTHENTICATION_2, AuthInfo) += OFFSET_OF (WIN_CERTIFICATE_UEFI_GUID, CertData); NewData =3D (UINT8 *)AllocateZeroPool (DescriptorSize + PayloadSi= ze); if (NewData =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a() Out of resources.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a() Out of resources.\n", __func__)); return EFI_OUT_OF_RESOURCES; } =20 @@ -603,13 +603,13 @@ DeleteSecureBootVariables ( { EFI_STATUS Status, TempStatus; =20 - DEBUG ((DEBUG_INFO, "%a - Attempting to delete the Secure Boot variables= .\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a - Attempting to delete the Secure Boot variables= .\n", __func__)); =20 // // Step 1: Notify that a PK update is coming shortly... Status =3D DisablePKProtection (); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to signal PK update start! %r\n", __= FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to signal PK update start! %r\n", __= func__, Status)); // Classify this as a PK deletion error. Status =3D EFI_ABORTED; } @@ -619,7 +619,7 @@ DeleteSecureBootVariables ( // Let's try to nuke the PK, why not... if (!EFI_ERROR (Status)) { Status =3D DeletePlatformKey (); - DEBUG ((DEBUG_INFO, "%a - PK Delete =3D %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_INFO, "%a - PK Delete =3D %r\n", __func__, Status)); // If the PK is not found, then our work here is done. if (Status =3D=3D EFI_NOT_FOUND) { Status =3D EFI_SUCCESS; @@ -646,25 +646,25 @@ DeleteSecureBootVariables ( // the variables anyway. // TempStatus =3D DeleteKEK (); - DEBUG ((DEBUG_INFO, "%a - KEK Delete =3D %r\n", __FUNCTION__, TempStat= us)); + DEBUG ((DEBUG_INFO, "%a - KEK Delete =3D %r\n", __func__, TempStatus)); if (EFI_ERROR (TempStatus) && (TempStatus !=3D EFI_NOT_FOUND)) { Status =3D EFI_ACCESS_DENIED; } =20 TempStatus =3D DeleteDb (); - DEBUG ((DEBUG_INFO, "%a - db Delete =3D %r\n", __FUNCTION__, TempStatu= s)); + DEBUG ((DEBUG_INFO, "%a - db Delete =3D %r\n", __func__, TempStatus)); if (EFI_ERROR (TempStatus) && (TempStatus !=3D EFI_NOT_FOUND)) { Status =3D EFI_ACCESS_DENIED; } =20 TempStatus =3D DeleteDbx (); - DEBUG ((DEBUG_INFO, "%a - dbx Delete =3D %r\n", __FUNCTION__, TempStat= us)); + DEBUG ((DEBUG_INFO, "%a - dbx Delete =3D %r\n", __func__, TempStatus)); if (EFI_ERROR (TempStatus) && (TempStatus !=3D EFI_NOT_FOUND)) { Status =3D EFI_ACCESS_DENIED; } =20 TempStatus =3D DeleteDbt (); - DEBUG ((DEBUG_INFO, "%a - dbt Delete =3D %r\n", __FUNCTION__, TempStat= us)); + DEBUG ((DEBUG_INFO, "%a - dbt Delete =3D %r\n", __func__, TempStatus)); if (EFI_ERROR (TempStatus) && (TempStatus !=3D EFI_NOT_FOUND)) { Status =3D EFI_ACCESS_DENIED; } @@ -752,7 +752,7 @@ EnrollFromInput ( DEBUG (( DEBUG_ERROR, "error: %a (\"%s\", %g): %r\n", - __FUNCTION__, + __func__, VariableName, VendorGuid, Status @@ -795,21 +795,21 @@ SetSecureBootVariablesToDefault ( UINT8 *Data; UINTN DataSize; =20 - DEBUG ((DEBUG_INFO, "%a() Entry\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() Entry\n", __func__)); =20 if (SecureBootPayload =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a - Invalid SecureBoot payload is supplied!\n",= __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a - Invalid SecureBoot payload is supplied!\n",= __func__)); return EFI_INVALID_PARAMETER; } =20 // // Right off the bat, if SecureBoot is currently enabled, bail. if (IsSecureBootEnabled ()) { - DEBUG ((DEBUG_ERROR, "%a - Cannot set default keys while SecureBoot is= enabled!\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a - Cannot set default keys while SecureBoot is= enabled!\n", __func__)); return EFI_ABORTED; } =20 - DEBUG ((DEBUG_INFO, "%a - Setting up key %s!\n", __FUNCTION__, SecureBoo= tPayload->SecureBootKeyName)); + DEBUG ((DEBUG_INFO, "%a - Setting up key %s!\n", __func__, SecureBootPay= load->SecureBootKeyName)); =20 // // Start running down the list, creating variables in our wake. @@ -834,10 +834,10 @@ SetSecureBootVariablesToDefault ( Data ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to enroll DB %r!\n", __FUNCTION__,= Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to enroll DB %r!\n", __func__, Sta= tus)); } } else { - DEBUG ((DEBUG_ERROR, "%a - Failed to enroll DBX %r!\n", __FUNCTION__, = Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to enroll DBX %r!\n", __func__, Stat= us)); } =20 // Keep it going. Keep it going. dbt if supplied... @@ -851,7 +851,7 @@ SetSecureBootVariablesToDefault ( Data ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to enroll DBT %r!\n", __FUNCTION__= , Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to enroll DBT %r!\n", __func__, St= atus)); } } =20 @@ -866,7 +866,7 @@ SetSecureBootVariablesToDefault ( Data ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to enroll KEK %r!\n", __FUNCTION__= , Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to enroll KEK %r!\n", __func__, St= atus)); } } =20 @@ -889,7 +889,7 @@ SetSecureBootVariablesToDefault ( // // Report PK creation errors. if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to update the PK! - %r\n", __FUNCT= ION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to update the PK! - %r\n", __func_= _, Status)); Status =3D EFI_SECURITY_VIOLATION; } } diff --git a/SecurityPkg/Library/SecureBootVariableLib/UnitTest/SecureBootV= ariableLibUnitTest.c b/SecurityPkg/Library/SecureBootVariableLib/UnitTest/S= ecureBootVariableLibUnitTest.c index a23135dfb016..bff288295b00 100644 --- a/SecurityPkg/Library/SecureBootVariableLib/UnitTest/SecureBootVariable= LibUnitTest.c +++ b/SecurityPkg/Library/SecureBootVariableLib/UnitTest/SecureBootVariable= LibUnitTest.c @@ -82,7 +82,7 @@ MockSetVariable ( DEBUG (( DEBUG_INFO, "%a %s %g %x %x %p\n", - __FUNCTION__, + __func__, VariableName, VendorGuid, Attributes, @@ -139,7 +139,7 @@ MockGetVariable ( DEBUG (( DEBUG_INFO, "%a %s %g %p %x %p\n", - __FUNCTION__, + __func__, VariableName, VendorGuid, Attributes, diff --git a/SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootV= ariableProvisionLib.c b/SecurityPkg/Library/SecureBootVariableProvisionLib/= SecureBootVariableProvisionLib.c index bed1fe86205d..d6046c85d247 100644 --- a/SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariable= ProvisionLib.c +++ b/SecurityPkg/Library/SecureBootVariableProvisionLib/SecureBootVariable= ProvisionLib.c @@ -81,7 +81,7 @@ SecureBootFetchData ( if (Status =3D=3D EFI_SUCCESS) { RsaPubKey =3D NULL; if (RsaGetPublicKeyFromX509 (Buffer, Size, &RsaPubKey) =3D=3D FALSE)= { - DEBUG ((DEBUG_ERROR, "%a: Invalid key format: %d\n", __FUNCTION__,= KeyIndex)); + DEBUG ((DEBUG_ERROR, "%a: Invalid key format: %d\n", __func__, Key= Index)); if (EfiSig !=3D NULL) { FreePool (EfiSig); } diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c b/SecurityPkg/T= cg/Opal/OpalPassword/OpalDriver.c index f127757ad9f0..e2e77cbc247a 100644 --- a/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c +++ b/SecurityPkg/Tcg/Opal/OpalPassword/OpalDriver.c @@ -491,7 +491,7 @@ OpalEndOfDxeEventNotify ( { OPAL_DRIVER_DEVICE *TmpDev; =20 - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); =20 mOpalEndOfDxe =3D TRUE; =20 @@ -529,7 +529,7 @@ OpalEndOfDxeEventNotify ( // SendBlockSidCommand (); =20 - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); =20 gBS->CloseEvent (Event); } @@ -888,7 +888,7 @@ OpalDriverRequestPassword ( return; } =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 PopUpString =3D OpalGetPopUpString (Dev, RequestString); =20 @@ -1074,7 +1074,7 @@ ProcessOpalRequestEnableFeature ( return; } =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 PopUpString =3D OpalGetPopUpString (Dev, RequestString); =20 @@ -1223,7 +1223,7 @@ ProcessOpalRequestDisableUser ( return; } =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 PopUpString =3D OpalGetPopUpString (Dev, RequestString); =20 @@ -1339,7 +1339,7 @@ ProcessOpalRequestPsidRevert ( return; } =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 PopUpString =3D OpalGetPopUpString (Dev, RequestString); =20 @@ -1478,7 +1478,7 @@ ProcessOpalRequestRevert ( return; } =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 PopUpString =3D OpalGetPopUpString (Dev, RequestString); =20 @@ -1646,7 +1646,7 @@ ProcessOpalRequestSecureErase ( return; } =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 PopUpString =3D OpalGetPopUpString (Dev, RequestString); =20 @@ -1784,7 +1784,7 @@ ProcessOpalRequestSetUserPwd ( return; } =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 PopUpString =3D OpalGetPopUpString (Dev, RequestString); =20 @@ -1990,7 +1990,7 @@ ProcessOpalRequestSetAdminPwd ( return; } =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 PopUpString =3D OpalGetPopUpString (Dev, RequestString); =20 @@ -2182,7 +2182,7 @@ ProcessOpalRequest ( UINTN DevicePathSize; BOOLEAN KeepUserData; =20 - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); =20 if (mOpalRequestVariable =3D=3D NULL) { Status =3D GetVariable2 ( @@ -2278,7 +2278,7 @@ ProcessOpalRequest ( TempVariable =3D (OPAL_REQUEST_VARIABLE *)((UINTN)TempVariable + Temp= Variable->Length); } =20 - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); } =20 /** diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalHii.c b/SecurityPkg/Tcg/= Opal/OpalPassword/OpalHii.c index c4f96bee8a3e..8035f44ebebb 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; =20 - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); =20 Variable =3D NULL; VariableSize =3D 0; @@ -141,7 +141,7 @@ GetSavedOpalRequest ( =20 FreePool (Variable); =20 - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); } =20 /** @@ -169,7 +169,7 @@ SaveOpalRequest ( EFI_DEVICE_PATH_PROTOCOL *DevicePath; UINTN DevicePathSize; =20 - DEBUG ((DEBUG_INFO, "%a() - enter\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - enter\n", __func__)); =20 DEBUG (( DEBUG_INFO, @@ -264,7 +264,7 @@ SaveOpalRequest ( FreePool (Variable); } =20 - DEBUG ((DEBUG_INFO, "%a() - exit\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a() - exit\n", __func__)); } =20 /** diff --git a/SecurityPkg/Tcg/Opal/OpalPassword/OpalPasswordPei.c b/Security= Pkg/Tcg/Opal/OpalPassword/OpalPasswordPei.c index c998b50be5e8..0fb6b1bf41d5 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 =3D 0x%x\n", - __FUNCTION__, + __func__, Result )); } @@ -302,7 +302,7 @@ UnlockOpalPassword ( DEBUG (( DEBUG_INFO, "%a() OpalBlockSid() Result =3D 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__)); =20 UnlockOpalPasswordDevices ((EDKII_PEI_STORAGE_SECURITY_CMD_PPI *)Ppi); =20 - DEBUG ((DEBUG_INFO, "%a exit at S3 resume!\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a exit at S3 resume!\n", __func__)); =20 return EFI_SUCCESS; } @@ -466,7 +466,7 @@ OpalPasswordPeiInit ( return EFI_UNSUPPORTED; } =20 - DEBUG ((DEBUG_INFO, "%a: Enters in S3 path.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Enters in S3 path.\n", __func__)); =20 Status =3D PeiServicesNotifyPpi (&mOpalPasswordStorageSecurityPpiNotifyD= esc); ASSERT_EFI_ERROR (Status); diff --git a/SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.c b/SecurityPkg/Tcg/Tcg2Acpi= /Tcg2Acpi.c index e8822cbeb015..76123fc51a53 100644 --- a/SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.c +++ b/SecurityPkg/Tcg/Tcg2Acpi/Tcg2Acpi.c @@ -188,14 +188,14 @@ ExchangeCommonBuffer ( =20 // Step 0: Sanity check for input argument if (TcgNvs =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a - Input argument is NULL!\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a - Input argument is NULL!\n", __func__)); return EFI_INVALID_PARAMETER; } =20 // Step 1: Grab the common buffer header Status =3D EfiGetSystemConfigurationTable (&gEdkiiPiSmmCommunicationRegi= onTableGuid, (VOID **)&PiSmmCommunicationRegionTable); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to locate SMM communciation common b= uffer - %r!\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to locate SMM communciation common b= uffer - %r!\n", __func__, Status)); return Status; } =20 @@ -215,7 +215,7 @@ ExchangeCommonBuffer ( =20 if (Index >=3D PiSmmCommunicationRegionTable->NumberOfEntries) { // Could not find one that meets our goal... - DEBUG ((DEBUG_ERROR, "%a - Could not find a common buffer that is big = enough for NVS!\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a - Could not find a common buffer that is big = enough for NVS!\n", __func__)); return EFI_OUT_OF_RESOURCES; } =20 @@ -236,9 +236,9 @@ ExchangeCommonBuffer ( Status =3D gBS->LocateProtocol (&gEfiMmCommunicationProtocolGuid, NULL, = (VOID **)&MmCommunication); if (!EFI_ERROR (Status)) { Status =3D MmCommunication->Communicate (MmCommunication, CommHeader, = &CommBufferSize); - DEBUG ((DEBUG_INFO, "%a - Communicate() =3D %r\n", __FUNCTION__, Statu= s)); + DEBUG ((DEBUG_INFO, "%a - Communicate() =3D %r\n", __func__, Status)); } else { - DEBUG ((DEBUG_ERROR, "%a - Failed to locate MmCommunication protocol -= %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to locate MmCommunication protocol -= %r\n", __func__, Status)); return Status; } =20 @@ -250,7 +250,7 @@ ExchangeCommonBuffer ( DEBUG (( DEBUG_INFO, "%a Communication returned software SMI value. PP: 0x%x; MC: 0x%x.\n= ", - __FUNCTION__, + __func__, TcgNvs->PhysicalPresence.SoftwareSmi, TcgNvs->MemoryClear.SoftwareSmi )); diff --git a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c b/SecurityPkg/Tcg/Tcg2Pei/Tc= g2Pei.c index 26bb5282a58b..1caaa4e319bc 100644 --- a/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c +++ b/SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c @@ -312,10 +312,10 @@ SyncPcrAllocationsAndPcrMask ( NewTpmActivePcrBanks &=3D BiosHashAlgorithmBitmap; DEBUG ((DEBUG_INFO, "NewTpmActivePcrBanks 0x%08x\n", NewTpmActivePcrBa= nks)); =20 - DEBUG ((DEBUG_INFO, "%a - Reallocating PCR banks from 0x%X to 0x%X.\n"= , __FUNCTION__, TpmActivePcrBanks, NewTpmActivePcrBanks)); + DEBUG ((DEBUG_INFO, "%a - Reallocating PCR banks from 0x%X to 0x%X.\n"= , __func__, TpmActivePcrBanks, NewTpmActivePcrBanks)); =20 if (NewTpmActivePcrBanks =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a - No viable PCRs active! Please set a less = restrictive value for PcdTpm2HashMask!\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a - No viable PCRs active! Please set a less = restrictive value for PcdTpm2HashMask!\n", __func__)); ASSERT (FALSE); } else { DEBUG ((DEBUG_ERROR, "Tpm2PcrAllocateBanks (TpmHashAlgorithmBitmap: = 0x%08x, NewTpmActivePcrBanks: 0x%08x)\n", TpmHashAlgorithmBitmap, NewTpmAct= ivePcrBanks)); @@ -324,7 +324,7 @@ SyncPcrAllocationsAndPcrMask ( // // We can't do much here, but we hope that this doesn't happen. // - DEBUG ((DEBUG_ERROR, "%a - Failed to reallocate PCRs!\n", __FUNCTI= ON__)); + DEBUG ((DEBUG_ERROR, "%a - Failed to reallocate PCRs!\n", __func__= )); ASSERT_EFI_ERROR (Status); } =20 @@ -342,9 +342,9 @@ SyncPcrAllocationsAndPcrMask ( if ((Tpm2PcrMask & TpmHashAlgorithmBitmap) !=3D Tpm2PcrMask) { NewTpm2PcrMask =3D Tpm2PcrMask & TpmHashAlgorithmBitmap; =20 - DEBUG ((DEBUG_INFO, "%a - Updating PcdTpm2HashMask from 0x%X to 0x%X.\= n", __FUNCTION__, Tpm2PcrMask, NewTpm2PcrMask)); + DEBUG ((DEBUG_INFO, "%a - Updating PcdTpm2HashMask from 0x%X to 0x%X.\= n", __func__, Tpm2PcrMask, NewTpm2PcrMask)); if (NewTpm2PcrMask =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a - No viable PCRs supported! Please set a le= ss restrictive value for PcdTpm2HashMask!\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a - No viable PCRs supported! Please set a le= ss restrictive value for PcdTpm2HashMask!\n", __func__)); ASSERT (FALSE); } =20 diff --git a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c b/SecurityPkg/Tcg/Tcg2Smm/Tc= g2Smm.c index 498fb626bd9c..c47c582cc8d2 100644 --- a/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c +++ b/SecurityPkg/Tcg/Tcg2Smm/Tcg2Smm.c @@ -57,7 +57,7 @@ TpmNvsCommunciate ( UINTN TempCommBufferSize; TPM_NVS_MM_COMM_BUFFER *CommParams; =20 - DEBUG ((DEBUG_VERBOSE, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a()\n", __func__)); =20 // // If input is invalid, stop processing this SMI @@ -69,12 +69,12 @@ TpmNvsCommunciate ( TempCommBufferSize =3D *CommBufferSize; =20 if (TempCommBufferSize !=3D sizeof (TPM_NVS_MM_COMM_BUFFER)) { - DEBUG ((DEBUG_ERROR, "[%a] MM Communication buffer size is invalid for= this handler!\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "[%a] MM Communication buffer size is invalid for= this handler!\n", __func__)); return EFI_ACCESS_DENIED; } =20 if (!IsBufferOutsideMmValid ((UINTN)CommBuffer, TempCommBufferSize)) { - DEBUG ((DEBUG_ERROR, "[%a] - MM Communication buffer in invalid locati= on!\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "[%a] - MM Communication buffer in invalid locati= on!\n", __func__)); return EFI_ACCESS_DENIED; } =20 @@ -85,14 +85,14 @@ TpmNvsCommunciate ( Status =3D EFI_SUCCESS; switch (CommParams->Function) { case TpmNvsMmExchangeInfo: - DEBUG ((DEBUG_VERBOSE, "[%a] - Function requested: MM_EXCHANGE_NVS_I= NFO\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "[%a] - Function requested: MM_EXCHANGE_NVS_I= NFO\n", __func__)); CommParams->RegisteredPpSwiValue =3D mPpSoftwareSmi; CommParams->RegisteredMcSwiValue =3D mMcSoftwareSmi; mTcgNvs =3D (TCG_NVS *)(UINTN)CommParams->T= argetAddress; break; =20 default: - DEBUG ((DEBUG_INFO, "[%a] - Unknown function %d!\n", __FUNCTION__, C= ommParams->Function)); + DEBUG ((DEBUG_INFO, "[%a] - Unknown function %d!\n", __func__, CommP= arams->Function)); Status =3D EFI_UNSUPPORTED; break; } @@ -301,7 +301,7 @@ InitializeTcgCommon ( Status =3D gMmst->MmiHandlerRegister (TpmNvsCommunciate, &gTpmNvsMmGuid,= &mReadyToLockHandle); ASSERT_EFI_ERROR (Status); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "[%a] Failed to register NVS communicate as root = MM handler - %r!\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "[%a] Failed to register NVS communicate as root = MM handler - %r!\n", __func__, Status)); goto Cleanup; } =20 @@ -311,7 +311,7 @@ InitializeTcgCommon ( Status =3D gMmst->MmLocateProtocol (&gEfiSmmSwDispatch2ProtocolGuid, NUL= L, (VOID **)&SwDispatch); ASSERT_EFI_ERROR (Status); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "[%a] Failed to locate Sw dispatch protocol - %r!= \n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "[%a] Failed to locate Sw dispatch protocol - %r!= \n", __func__, Status)); goto Cleanup; } =20 @@ -319,7 +319,7 @@ InitializeTcgCommon ( Status =3D SwDispatch->Register (SwDispatch, Physical= PresenceCallback, &SwContext, &PpSwHandle); ASSERT_EFI_ERROR (Status); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "[%a] Failed to register PP callback as SW MM han= dler - %r!\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "[%a] Failed to register PP callback as SW MM han= dler - %r!\n", __func__, Status)); goto Cleanup; } =20 @@ -329,7 +329,7 @@ InitializeTcgCommon ( Status =3D SwDispatch->Register (SwDispatch, MemoryCl= earCallback, &SwContext, &McSwHandle); ASSERT_EFI_ERROR (Status); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "[%a] Failed to register MC callback as SW MM han= dler - %r!\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "[%a] Failed to register MC callback as SW MM han= dler - %r!\n", __func__, Status)); goto Cleanup; } =20 @@ -342,7 +342,7 @@ InitializeTcgCommon ( ASSERT_EFI_ERROR (Status); if (EFI_ERROR (Status)) { // Should not happen - DEBUG ((DEBUG_ERROR, "[%a] Failed to locate SMM variable protocol - %r= !\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "[%a] Failed to locate SMM variable protocol - %r= !\n", __func__, Status)); goto Cleanup; } =20 @@ -350,7 +350,7 @@ InitializeTcgCommon ( Status =3D gMmst->MmRegisterProtocolNotify (&gEfiMmReadyToLockProtocolGu= id, TcgMmReadyToLock, &NotifyHandle); ASSERT_EFI_ERROR (Status); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "[%a] Failed to register ready to lock notificati= on - %r!\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "[%a] Failed to register ready to lock notificati= on - %r!\n", __func__, Status)); goto Cleanup; } =20 diff --git a/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c b/SecurityPkg/Tcg/TdTcg2= Dxe/TdTcg2Dxe.c index b34da724ac42..6ca29f5de0df 100644 --- a/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c +++ b/SecurityPkg/Tcg/TdTcg2Dxe/TdTcg2Dxe.c @@ -1353,12 +1353,12 @@ TdHashLogExtendEvent ( } =20 if (CcEvent->Header.MrIndex =3D=3D CC_MR_INDEX_0_MRTD) { - DEBUG ((DEBUG_ERROR, "%a: MRTD cannot be extended in TDVF.\n", __FUNCT= ION__)); + DEBUG ((DEBUG_ERROR, "%a: MRTD cannot be extended in TDVF.\n", __func_= _)); return EFI_INVALID_PARAMETER; } =20 if (CcEvent->Header.MrIndex >=3D CC_MR_INDEX_INVALID) { - DEBUG ((DEBUG_ERROR, "%a: MrIndex is invalid. (%d)\n", __FUNCTION__, C= cEvent->Header.MrIndex)); + DEBUG ((DEBUG_ERROR, "%a: MrIndex is invalid. (%d)\n", __func__, CcEve= nt->Header.MrIndex)); return EFI_INVALID_PARAMETER; } =20 @@ -2514,7 +2514,7 @@ DriverEntry ( // // Cc measurement feature is crucial to a td-guest and it shall stop r= unning immediately // when it is failed to be installed. - DEBUG ((DEBUG_ERROR, "%a: CcMeasurement protocol failed to be installe= d - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: CcMeasurement protocol failed to be installe= d - %r\n", __func__, Status)); CpuDeadLoop (); } =20 diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Secu= reBootConfigImpl.c index 4299a6b5e56d..0e31502b1bfc 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.c @@ -167,7 +167,7 @@ GetCurrentTime ( DEBUG (( DEBUG_ERROR, "%a(), GetTime() failed, status =3D '%r'\n", - __FUNCTION__, + __func__, Status )); return Status; diff --git a/SecurityPkg/VariableAuthenticated/SecureBootDefaultKeysDxe/Sec= ureBootDefaultKeysDxe.c b/SecurityPkg/VariableAuthenticated/SecureBootDefau= ltKeysDxe/SecureBootDefaultKeysDxe.c index 0abde52a05ae..2f6f3e6796bf 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootDefaultKeysDxe/SecureBoot= DefaultKeysDxe.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootDefaultKeysDxe/SecureBoot= DefaultKeysDxe.c @@ -42,35 +42,35 @@ SecureBootDefaultKeysEntryPoint ( =20 Status =3D SecureBootInitPKDefault (); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Cannot initialize PKDefault: %r\n", __FUNCTI= ON__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Cannot initialize PKDefault: %r\n", __func__= , Status)); return Status; } =20 Status =3D SecureBootInitKEKDefault (); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Cannot initialize KEKDefault: %r\n", __FUNCT= ION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Cannot initialize KEKDefault: %r\n", __func_= _, Status)); return Status; } =20 Status =3D SecureBootInitDbDefault (); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Cannot initialize dbDefault: %r\n", __FUNCTI= ON__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Cannot initialize dbDefault: %r\n", __func__= , Status)); return Status; } =20 Status =3D SecureBootInitDbtDefault (); if (Status =3D=3D EFI_NOT_FOUND) { - DEBUG ((DEBUG_INFO, "%a: dbtDefault not initialized\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: dbtDefault not initialized\n", __func__)); } else if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Cannot initialize dbtDefault: %r\n", __FUNCT= ION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Cannot initialize dbtDefault: %r\n", __func_= _, Status)); return Status; } =20 Status =3D SecureBootInitDbxDefault (); if (Status =3D=3D EFI_NOT_FOUND) { - DEBUG ((DEBUG_INFO, "%a: dbxDefault not initialized\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: dbxDefault not initialized\n", __func__)); } else if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Cannot initialize dbxDefault: %r\n", __FUNCT= ION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Cannot initialize dbxDefault: %r\n", __func_= _, Status)); return Status; } =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 (#102636): https://edk2.groups.io/g/devel/message/102636 Mute This Topic: https://groups.io/mt/98115239/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- From nobody Wed May 15 21:28:33 2024 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+102637+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+102637+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819843; cv=none; d=zohomail.com; s=zohoarc; b=kq7cS7kjp1IpD3UmvYN0H8GIT/MEvewBIpLb/wj/la+rCIVmHTekLdslL9iBUOnbL1nL8PXwzjK0wBnEKxnXlxf0xfDli3M+6VW/E5DhhaVMtnG5gpV3izKYDeIHeIp+rzKm1WmIOmPo65UWS/VFyviO0r4GcdW3hk4fHH30Uqs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819843; 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=tPmaGrjwT81C6rFjMjIwA0/JL8hEFMu2UNXr925UVn0=; b=EaIBTUX02UTgRGb1WP9rIDdm8Xl37yjzMJN+FhkacoDWjAt5BJJi7t4k7b1QmTweObpEjIasIDtVggUCqs6RVx/eg7fxA58E/LjDAoVReiCLmCo8S8TJatsSDZjftB2aF5iPlqu1Qnk9XK1Hy3/73gk1mEeFu11Y223uQ6c7pBU= 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+102637+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819843478781.3557338613696; Thu, 6 Apr 2023 15:24:03 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id X42vYY1788612xFZOozvU49v; Thu, 06 Apr 2023 15:24:03 -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.171996.1680819842320674872 for ; Thu, 06 Apr 2023 15:24:02 -0700 X-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 9FAE05C01D6; Thu, 6 Apr 2023 18:24:01 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 06 Apr 2023 18:24:01 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:23:58 -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 07/18] EmbeddedPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:08 -0600 Message-Id: <20230406222319.2281263-8-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: IJyDLpsPIsZYJ8whfd2C50hxx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819843; bh=/lq91Jp8krgigKUoS6zE53SZluK+pCxRzQnL5FKAY48=; h=Cc:Date:From:Reply-To:Subject:To; b=ClG+07sKFG1bSekszgKDu9ew9HJVrUZGSXiq+0tNbLgV9Ba6CjmLMVtirGK3Te7BHfB TI8nyHAVf5aZ8DxFtIS02UDB1Q7+Oo6v8hLQ1qVo0fgShPeQePvomYadEzIb/n1AshrUv AnXCx+jVWcKwKameLH3EmAhG0/B9LudTsww= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819844221100002 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 EmbeddedPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Abner Chang Reviewed-by: Ard Biesheuvel --- EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.c | 18 ++++++++---= ----- EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c | 10 ++++----- EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.c | 22 ++++++++++-= --------- EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.c | 2 +- EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c | 2 +- EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c | 20 +++++++++--= ------- 6 files changed, 37 insertions(+), 37 deletions(-) diff --git a/EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.c b/Embedded= Pkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.c index 07b82892eb0f..2c2e73e72076 100644 --- a/EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.c +++ b/EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.c @@ -116,7 +116,7 @@ RemoveDtStdoutPath ( DEBUG (( DEBUG_INFO, "%a: could not retrieve DT blob - %r\n", - __FUNCTION__, + __func__, Status )); return; @@ -132,7 +132,7 @@ RemoveDtStdoutPath ( DEBUG (( DEBUG_INFO, "%a: Failed to delete 'stdout-path' property: %a\n", - __FUNCTION__, + __func__, fdt_strerror (Error) )); } @@ -190,7 +190,7 @@ RemoveSpcrTable ( DEBUG (( DEBUG_WARN, "%a: failed to uninstall SPCR table - %r\n", - __FUNCTION__, + __func__, Status )); } @@ -224,7 +224,7 @@ OnReadyToBoot ( DEBUG (( DEBUG_ERROR, "%a: variable '%s' could not be read - bailing!\n", - __FUNCTION__, + __func__, CONSOLE_PREF_VARIABLE_NAME )); return; @@ -234,7 +234,7 @@ OnReadyToBoot ( DEBUG (( DEBUG_INFO, "%a: serial console preferred - doing nothing\n", - __FUNCTION__ + __func__ )); return; } @@ -247,7 +247,7 @@ OnReadyToBoot ( DEBUG (( DEBUG_INFO, "%a: no GOP instances found - doing nothing (%r)\n", - __FUNCTION__, + __func__, Status )); return; @@ -296,7 +296,7 @@ ConsolePrefDxeEntryPoint ( DEBUG (( DEBUG_INFO, "%a: no console preference found, defaulting to graphical\n", - __FUNCTION__ + __func__ )); ConsolePref.Console =3D CONSOLE_PREF_GRAPHICAL; } @@ -308,7 +308,7 @@ ConsolePrefDxeEntryPoint ( DEBUG (( DEBUG_WARN, "%a: invalid value for %s, defaulting to graphical\n", - __FUNCTION__, + __func__, CONSOLE_PREF_VARIABLE_NAME )); ConsolePref.Console =3D CONSOLE_PREF_GRAPHICAL; @@ -332,7 +332,7 @@ ConsolePrefDxeEntryPoint ( DEBUG (( DEBUG_ERROR, "%a: gRT->SetVariable () failed - %r\n", - __FUNCTION__, + __func__, Status )); return Status; diff --git a/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c b/EmbeddedPk= g/Drivers/DtPlatformDxe/DtPlatformDxe.c index 7f7e8c446c98..b94cd4da25d1 100644 --- a/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c +++ b/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c @@ -122,7 +122,7 @@ DtPlatformDxeEntryPoint ( DEBUG (( DEBUG_WARN, "%a: no DTB blob could be loaded, defaulting to ACPI (Status =3D=3D = %r)\n", - __FUNCTION__, + __func__, Status )); DtAcpiPref.Pref =3D DT_ACPI_SELECT_ACPI; @@ -142,7 +142,7 @@ DtPlatformDxeEntryPoint ( DEBUG (( DEBUG_WARN, "%a: no DT/ACPI preference found, defaulting to %a\n", - __FUNCTION__, + __func__, PcdGetBool (PcdDefaultDtPref) ? "DT" : "ACPI" )); DtAcpiPref.Pref =3D PcdGetBool (PcdDefaultDtPref) ? DT_ACPI_SELECT_DT @@ -157,7 +157,7 @@ DtPlatformDxeEntryPoint ( DEBUG (( DEBUG_WARN, "%a: invalid value for %s, defaulting to %a\n", - __FUNCTION__, + __func__, DT_ACPI_VARIABLE_NAME, PcdGetBool (PcdDefaultDtPref) ? "DT" : "ACPI" )); @@ -197,7 +197,7 @@ DtPlatformDxeEntryPoint ( DEBUG (( DEBUG_ERROR, "%a: failed to install gEdkiiPlatformHasAcpiGuid as a protocol\n", - __FUNCTION__ + __func__ )); goto FreeDtb; } @@ -211,7 +211,7 @@ DtPlatformDxeEntryPoint ( DEBUG (( DEBUG_ERROR, "%a: failed to install FDT configuration table\n", - __FUNCTION__ + __func__ )); goto FreeDtb; } diff --git a/EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.c b/EmbeddedPkg/= Drivers/FdtClientDxe/FdtClientDxe.c index b182c77d19b1..7da505a313d7 100644 --- a/EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.c +++ b/EmbeddedPkg/Drivers/FdtClientDxe/FdtClientDxe.c @@ -222,7 +222,7 @@ FindCompatibleNodeReg ( DEBUG (( DEBUG_ERROR, "%a: '%a' compatible node has invalid 'reg' property (size =3D=3D 0x= %x)\n", - __FUNCTION__, + __func__, CompatibleString, *RegSize )); @@ -263,7 +263,7 @@ FindNextMemoryNodeReg ( } =20 if (!IsNodeEnabled (Next)) { - DEBUG ((DEBUG_WARN, "%a: ignoring disabled memory node\n", __FUNCTIO= N__)); + DEBUG ((DEBUG_WARN, "%a: ignoring disabled memory node\n", __func__)= ); continue; } =20 @@ -279,7 +279,7 @@ FindNextMemoryNodeReg ( DEBUG (( DEBUG_WARN, "%a: ignoring memory node with no 'reg' property\n", - __FUNCTION__ + __func__ )); continue; } @@ -288,7 +288,7 @@ FindNextMemoryNodeReg ( DEBUG (( DEBUG_WARN, "%a: ignoring memory node with invalid 'reg' property (size =3D= =3D 0x%x)\n", - __FUNCTION__, + __func__, *RegSize )); continue; @@ -391,7 +391,7 @@ OnPlatformHasDeviceTree ( DEBUG (( DEBUG_INFO, "%a: exposing DTB @ 0x%p to OS\n", - __FUNCTION__, + __func__, DeviceTreeBase )); Status =3D gBS->InstallConfigurationTable (&gFdtTableGuid, DeviceTreeBas= e); @@ -424,7 +424,7 @@ InitializeFdtClientDxe ( DEBUG (( DEBUG_ERROR, "%a: No DTB found @ 0x%p\n", - __FUNCTION__, + __func__, DeviceTreeBase )); return EFI_NOT_FOUND; @@ -432,7 +432,7 @@ InitializeFdtClientDxe ( =20 mDeviceTreeBase =3D DeviceTreeBase; =20 - DEBUG ((DEBUG_INFO, "%a: DTB @ 0x%p\n", __FUNCTION__, mDeviceTreeBase)); + DEBUG ((DEBUG_INFO, "%a: DTB @ 0x%p\n", __func__, mDeviceTreeBase)); =20 // // Register a protocol notify for the EDKII Platform Has Device Tree @@ -446,7 +446,7 @@ InitializeFdtClientDxe ( &PlatformHasDeviceTreeEvent ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: CreateEvent(): %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: CreateEvent(): %r\n", __func__, Status)); return Status; } =20 @@ -459,7 +459,7 @@ InitializeFdtClientDxe ( DEBUG (( DEBUG_ERROR, "%a: RegisterProtocolNotify(): %r\n", - __FUNCTION__, + __func__, Status )); goto CloseEvent; @@ -470,7 +470,7 @@ InitializeFdtClientDxe ( // Status =3D gBS->SignalEvent (PlatformHasDeviceTreeEvent); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: SignalEvent(): %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: SignalEvent(): %r\n", __func__, Status)); goto CloseEvent; } =20 @@ -484,7 +484,7 @@ InitializeFdtClientDxe ( DEBUG (( DEBUG_ERROR, "%a: InstallProtocolInterface(): %r\n", - __FUNCTION__, + __func__, Status )); goto CloseEvent; diff --git a/EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.c b/Em= beddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.c index 44a78c947ef4..e193352fbe41 100644 --- a/EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.c +++ b/EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.c @@ -349,7 +349,7 @@ DmaMap ( "%a: Operation type 'MapOperationBusMasterCommonBuffer' is only " "supported\non memory regions that were allocated using " "DmaAllocateBuffer ()\n", - __FUNCTION__ + __func__ )); Status =3D EFI_UNSUPPORTED; FreeMapInfo: diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c b/Embedded= Pkg/RealTimeClockRuntimeDxe/RealTimeClock.c index 7adb7324057e..17dde432c4eb 100644 --- a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c +++ b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c @@ -219,7 +219,7 @@ InitializeRealTimeClock ( DEBUG (( DEBUG_WARN, "%a: using default timezone/daylight settings\n", - __FUNCTION__ + __func__ )); =20 mTimeSettings.TimeZone =3D EFI_UNSPECIFIED_TIMEZONE; diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c b/EmbeddedPkg= /Universal/MmcDxe/MmcIdentification.c index 86eb55800e5a..57388d9f461c 100755 --- a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c +++ b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c @@ -414,13 +414,13 @@ InitializeSdMmcDevice ( =20 Status =3D MmcHost->SendCommand (MmcHost, MMC_CMD55, CmdArg); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status =3D %r\n", __FU= NCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status =3D %r\n", __fu= nc__, Status)); return Status; } =20 Status =3D MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_R1, Resp= onse); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status =3D %r\n", __FU= NCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status =3D %r\n", __fu= nc__, Status)); return Status; } =20 @@ -473,18 +473,18 @@ InitializeSdMmcDevice ( CmdArg =3D CreateSwitchCmdArgument (0, 0, 0); Status =3D MmcHost->SendCommand (MmcHost, MMC_CMD6, CmdArg); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status =3D %r\n", __F= UNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status =3D %r\n", __f= unc__, Status)); return Status; } else { Status =3D MmcHost->ReadBlockData (MmcHost, 0, SWITCH_CMD_DATA_LENGT= H, Buffer); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): ReadBlockData Error and Statu= s =3D %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): ReadBlockData Error and Statu= s =3D %r\n", __func__, Status)); return Status; } } =20 if (!(Buffer[3] & SD_HIGH_SPEED_SUPPORTED)) { - DEBUG ((DEBUG_INFO, "%a : High Speed not supported by Card\n", __FUN= CTION__)); + DEBUG ((DEBUG_INFO, "%a : High Speed not supported by Card\n", __fun= c__)); } else { Speed =3D SD_HIGH_SPEED; =20 @@ -492,12 +492,12 @@ InitializeSdMmcDevice ( CmdArg =3D CreateSwitchCmdArgument (1, 0, 1); Status =3D MmcHost->SendCommand (MmcHost, MMC_CMD6, CmdArg); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status =3D %r\n", _= _FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status =3D %r\n", _= _func__, Status)); return Status; } else { Status =3D MmcHost->ReadBlockData (MmcHost, 0, SWITCH_CMD_DATA_LEN= GTH, Buffer); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): ReadBlockData Error and Sta= tus =3D %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): ReadBlockData Error and Sta= tus =3D %r\n", __func__, Status)); return Status; } =20 @@ -513,14 +513,14 @@ InitializeSdMmcDevice ( CmdArg =3D MmcHostInstance->CardInfo.RCA << 16; Status =3D MmcHost->SendCommand (MmcHost, MMC_CMD55, CmdArg); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status =3D %r\n", __= FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status =3D %r\n", __= func__, Status)); return Status; } =20 /* Width: 4 */ Status =3D MmcHost->SendCommand (MmcHost, MMC_CMD6, 2); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status =3D %r\n", __F= UNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status =3D %r\n", __f= unc__, Status)); return Status; } } @@ -528,7 +528,7 @@ InitializeSdMmcDevice ( if (MMC_HOST_HAS_SETIOS (MmcHost)) { Status =3D MmcHost->SetIos (MmcHost, Speed, BUSWIDTH_4, EMMCBACKWARD); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (SetIos): Error and Status =3D %r\n", __FUN= CTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (SetIos): Error and Status =3D %r\n", __fun= c__, Status)); return Status; } } --=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 (#102637): https://edk2.groups.io/g/devel/message/102637 Mute This Topic: https://groups.io/mt/98115243/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- From nobody Wed May 15 21:28:33 2024 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel 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- From nobody Wed May 15 21:28:33 2024 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+102639+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+102639+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819850; cv=none; d=zohomail.com; s=zohoarc; b=hnCrp0+Q30kSHoQk48+3oudtER/ZAcOuSOvY/rDG58E8ptnNCFVT2SUAKZJ4JVhQwc74duvcgdsFozpYtqMeSFfiGyUMUtOOC0e6dcprnJbJETaXLJRDVNcpgAD5DiipPMnauXGUJSc3bDfWkowteihz8GU+vV4pdcBdMq1c7mE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819850; 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=+4ez2f1dGXI1ErHbw0D4kz9gGX7ekTfPuGGSki2UiyQ=; b=jhOSSnBapcK+y27dKwkvwrR2vGKSwE3Z9brpLaNXANtDHb8G1DDZ7cOSMBs5nSI28UYMW7FlPNVCGneZW5uqbSkXJBNbKHUg6B49dvhTc3pfuTm3XAbzfFoN2ysgbHj5doa5D9w43eUHDsa/1IkA//C4Vww0oh0UQTPjgV6LKDA= 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+102639+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819850397680.8287096516598; Thu, 6 Apr 2023 15:24:10 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id W36PYY1788612x7d8JgMPzis; Thu, 06 Apr 2023 15:24:09 -0700 X-Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.171747.1680819849151424698 for ; Thu, 06 Apr 2023 15:24:09 -0700 X-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 7C5F55C01EA; Thu, 6 Apr 2023 18:24:08 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 06 Apr 2023 18:24:08 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf 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:05 -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 09/18] ArmPlatformPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:10 -0600 Message-Id: <20230406222319.2281263-10-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: q7hHBxTTqU8BuFp19Z2fECxQx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819849; bh=kDuMxmFm2Ow8QZ+QIE5Wvdpbxsvu/ItpASXPxI7lKjQ=; h=Cc:Date:From:Reply-To:Subject:To; b=nFoGoBQTcQlmKQluz3MvAj9+HyOL1pOMF3d4QphY2PjJZGuD1THgC4JHfiGOIG01hKQ qJiCjcCNEGNc527WCDHGd/lJxVfjc8eXacQ+dIR33L/VUXr/K0dkjxFoG57hyl/It5o1+ nMYSOx8eIXcZn0A1TUqmIeYjxCIbquix6yk= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819852376100003 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 ArmPlatformPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c b/ArmP= latformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c index 5821dc195822..b8e7fbe38d77 100644 --- a/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c +++ b/ArmPlatformPkg/Drivers/SP805WatchdogDxe/SP805Watchdog.c @@ -397,7 +397,7 @@ SP805Initialize ( DEBUG (( DEBUG_ERROR, "%a: failed to register watchdog interrupt - %r\n", - __FUNCTION__, + __func__, Status )); return Status; @@ -406,7 +406,7 @@ SP805Initialize ( DEBUG (( DEBUG_WARN, "%a: no interrupt specified, running in RESET mode only\n", - __FUNCTION__ + __func__ )); } =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 (#102639): https://edk2.groups.io/g/devel/message/102639 Mute This Topic: https://groups.io/mt/98115245/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- From nobody Wed May 15 21:28:33 2024 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+102640+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+102640+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819853; cv=none; d=zohomail.com; s=zohoarc; b=AbTwlxhriA3VUlMB16I71EYfsFtPD0D6c19ZTVs3frWcQ8A2ZaPJgcZhEWrJpKm1z+rjrGxpMr91RO/XYQ9vnAiY20RNAPLNC1wP8W8QE5OBZjnXiEeO4lIaS9Np5VWAZtgaqSNKCAB86d45qwL1hl25D+35VTg6O/6J+s4ITd0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819853; 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=sehi0TvHmmaTfKCWoJ4h5WVnwYA91YNzz/RB0sVpfqA=; b=aBZPIA9keRP9IUXRL7v8ef9sxMROVg46GEEsONY5cEZcpKsIrt0Qbm1xRRANiWn0hoF+k8+O0XNclV43m8EHKluX0eK7BC1l6jZfY5eg9bRkmoF+UA4Jq7+ulVndzfHsSCc4A7bES8RwIkJgjyi4LqcDVSlZlHxnP/6Cl/0NIFE= 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+102640+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819853495156.89300287570927; Thu, 6 Apr 2023 15:24:13 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 32ptYY1788612xmldSgJigcE; Thu, 06 Apr 2023 15:24:13 -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.171999.1680819852470523795 for ; Thu, 06 Apr 2023 15:24:12 -0700 X-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C797E5C01E3; Thu, 6 Apr 2023 18:24:11 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Thu, 06 Apr 2023 18:24:11 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgepfeenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:24:08 -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 10/18] UnitTestFrameworkPkg: Update to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:11 -0600 Message-Id: <20230406222319.2281263-11-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: oD8rvegA8M6vKsU1LhO6RLQ9x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819853; bh=5x6h8nJZlk5H2m0iueBjPBbdrquc87kyHepV+QaDsxM=; h=Cc:Date:From:Reply-To:Subject:To; b=irzLeFTAiNQrECDLDL2ymFNt+8VmLAr0+ccqt2s+fbzuSzofTlRQ0AJH+4zLQ1YtJNc UwpweOx4/ABFZgrxqr7gzzsL8SdllK/n+DZ8V6BV7adFYdDvkqRiFsUr1VtwSuFv0mcg6 iDYfQEAqbPoHtrgNz+5l8Mtztbn3tmIVApg= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819855348100001 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 UnitTestFrameworkPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- UnitTestFrameworkPkg/Library/UnitTestBootLibUsbClass/UnitTestBootLibUsbCla= ss.c | 12 ++++----- UnitTestFrameworkPkg/Library/UnitTestLib/Log.c = | 2 +- UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c = | 4 +-- UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/UnitTe= stPersistenceLibSimpleFileSystem.c | 26 ++++++++++---------- UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportL= ib.c | 2 +- UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportL= ibConOut.c | 2 +- UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultReportL= ibDebugLib.c | 2 +- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/UnitTestFrameworkPkg/Library/UnitTestBootLibUsbClass/UnitTestB= ootLibUsbClass.c b/UnitTestFrameworkPkg/Library/UnitTestBootLibUsbClass/Uni= tTestBootLibUsbClass.c index ebb42186a534..b9b2d23eb14d 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestBootLibUsbClass/UnitTestBootLibU= sbClass.c +++ b/UnitTestFrameworkPkg/Library/UnitTestBootLibUsbClass/UnitTestBootLibU= sbClass.c @@ -61,7 +61,7 @@ SetBootNextDevice ( =20 DpEnd =3D AppendDevicePathNode (NULL, NULL); if (DpEnd =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Unable to create device path. DpEnd is NULL= .\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Unable to create device path. DpEnd is NULL= .\n", __func__)); Status =3D EFI_OUT_OF_RESOURCES; goto CLEANUP; } @@ -72,7 +72,7 @@ SetBootNextDevice ( (EFI_DEVICE_PATH_PROTOCOL *)&UsbDp ); if (Dp =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: Unable to create device path. Dp is NULL.\n= ", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Unable to create device path. Dp is NULL.\n= ", __func__)); Status =3D EFI_OUT_OF_RESOURCES; goto CLEANUP; } @@ -88,15 +88,15 @@ SetBootNextDevice ( OptionalDataSize ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Error creating load option. Status =3D %r\n= ", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Error creating load option. Status =3D %r\n= ", __func__, Status)); goto CLEANUP; } =20 NewOptionValid =3D TRUE; - DEBUG ((DEBUG_VERBOSE, "%a: Generic USB Class Device boot option created= .\n", __FUNCTION__)); + DEBUG ((DEBUG_VERBOSE, "%a: Generic USB Class Device boot option created= .\n", __func__)); Status =3D EfiBootManagerLoadOptionToVariable (&NewOption); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Error Saving boot option NV variable. Status= =3D %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Error Saving boot option NV variable. Status= =3D %r\n", __func__, Status)); goto CLEANUP; } =20 @@ -111,7 +111,7 @@ SetBootNextDevice ( &(BootNextValue) ); =20 - DEBUG ((DEBUG_VERBOSE, "%a - Set BootNext Status (%r)\n", __FUNCTION__, = Status)); + DEBUG ((DEBUG_VERBOSE, "%a - Set BootNext Status (%r)\n", __func__, Stat= us)); =20 CLEANUP: if (Dp !=3D NULL) { diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/Log.c b/UnitTestFrame= workPkg/Library/UnitTestLib/Log.c index 3998aafdf843..19eb8ee0db6e 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestLib/Log.c +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/Log.c @@ -118,7 +118,7 @@ UnitTestLogInit ( // Make sure that you're cooking with gas. // if (Test =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a called with invalid Test parameter\n", __FUNC= TION__)); + DEBUG ((DEBUG_ERROR, "%a called with invalid Test parameter\n", __func= __)); return; } =20 diff --git a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c b/UnitT= estFrameworkPkg/Library/UnitTestLib/UnitTestLib.c index 5b442ed122ea..322ea15b1575 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c +++ b/UnitTestFrameworkPkg/Library/UnitTestLib/UnitTestLib.c @@ -274,7 +274,7 @@ InitUnitTestFramework ( // // Don't actually report it as an error, but emit a warning. // - DEBUG ((DEBUG_ERROR, "%a - Cache was detected, but failed to load.\n= ", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a - Cache was detected, but failed to load.\n= ", __func__)); Status =3D EFI_SUCCESS; } } @@ -856,7 +856,7 @@ SaveFrameworkState ( // Status =3D SaveUnitTestCache (FrameworkHandle, Header, Header->SaveState= Size); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Could not save state! %r\n", __FUNCTION__, = Status)); + DEBUG ((DEBUG_ERROR, "%a - Could not save state! %r\n", __func__, Stat= us)); Status =3D EFI_DEVICE_ERROR; } =20 diff --git a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileS= ystem/UnitTestPersistenceLibSimpleFileSystem.c b/UnitTestFrameworkPkg/Libra= ry/UnitTestPersistenceLibSimpleFileSystem/UnitTestPersistenceLibSimpleFileS= ystem.c index d7a62145dac6..b59991683f48 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/U= nitTestPersistenceLibSimpleFileSystem.c +++ b/UnitTestFrameworkPkg/Library/UnitTestPersistenceLibSimpleFileSystem/U= nitTestPersistenceLibSimpleFileSystem.c @@ -61,7 +61,7 @@ GetCacheFileDevicePath ( (VOID **)&LoadedImage ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_WARN, "%a - Failed to locate DevicePath for loaded image= . %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_WARN, "%a - Failed to locate DevicePath for loaded image= . %r\n", __func__, Status)); return NULL; } =20 @@ -91,7 +91,7 @@ GetCacheFileDevicePath ( // Make sure we didn't get any weird data. // if (DirectorySlashOffset =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a - Weird 0-length string when processing app p= ath.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a - Weird 0-length string when processing app p= ath.\n", __func__)); goto Exit; } =20 @@ -112,7 +112,7 @@ GetCacheFileDevicePath ( // Let's check and make sure that's right. // if (AppPath[DirectorySlashOffset] !=3D L'\\') { - DEBUG ((DEBUG_ERROR, "%a - Could not find a single directory separator= in app path.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a - Could not find a single directory separator= in app path.\n", __func__)); goto Exit; } =20 @@ -202,7 +202,7 @@ DoesCacheExist ( FreePool (FileDevicePath); } =20 - DEBUG ((DEBUG_VERBOSE, "%a - Returning %d\n", __FUNCTION__, !EFI_ERROR (= Status))); + DEBUG ((DEBUG_VERBOSE, "%a - Returning %d\n", __func__, !EFI_ERROR (Stat= us))); =20 return (!EFI_ERROR (Status)); } @@ -263,7 +263,7 @@ SaveUnitTestCache ( // Status =3D ShellDeleteFile (&FileHandle); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a failed to delete file %r\n", __FUNCTION__, = Status)); + DEBUG ((DEBUG_ERROR, "%a failed to delete file %r\n", __func__, Stat= us)); } } =20 @@ -277,7 +277,7 @@ SaveUnitTestCache ( 0 ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Opening file for writing failed! %r\n", __F= UNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Opening file for writing failed! %r\n", __f= unc__, Status)); goto Exit; } =20 @@ -285,7 +285,7 @@ SaveUnitTestCache ( // Write the data to the file. // WriteCount =3D SaveStateSize; - DEBUG ((DEBUG_INFO, "%a - Writing %d bytes to file...\n", __FUNCTION__, = WriteCount)); + DEBUG ((DEBUG_INFO, "%a - Writing %d bytes to file...\n", __func__, Writ= eCount)); Status =3D ShellWriteFile ( FileHandle, &WriteCount, @@ -293,9 +293,9 @@ SaveUnitTestCache ( ); =20 if (EFI_ERROR (Status) || (WriteCount !=3D SaveStateSize)) { - DEBUG ((DEBUG_ERROR, "%a - Writing to file failed! %r\n", __FUNCTION__= , Status)); + DEBUG ((DEBUG_ERROR, "%a - Writing to file failed! %r\n", __func__, St= atus)); } else { - DEBUG ((DEBUG_INFO, "%a - SUCCESS!\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a - SUCCESS!\n", __func__)); } =20 // @@ -368,7 +368,7 @@ LoadUnitTestCache ( 0 ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Opening file for writing failed! %r\n", __F= UNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Opening file for writing failed! %r\n", __f= unc__, Status)); goto Exit; } else { IsFileOpened =3D TRUE; @@ -379,7 +379,7 @@ LoadUnitTestCache ( // Status =3D ShellGetFileSize (FileHandle, &LargeFileSize); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to determine file size! %r\n", __FUN= CTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to determine file size! %r\n", __fun= c__, Status)); goto Exit; } =20 @@ -390,7 +390,7 @@ LoadUnitTestCache ( *SaveStateSize =3D FileSize; Buffer =3D AllocatePool (FileSize); if (Buffer =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a - Failed to allocate a pool to hold the file = contents! %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to allocate a pool to hold the file = contents! %r\n", __func__, Status)); Status =3D EFI_OUT_OF_RESOURCES; goto Exit; } @@ -400,7 +400,7 @@ LoadUnitTestCache ( // Status =3D ShellReadFile (FileHandle, &FileSize, Buffer); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to read the file contents! %r\n", __= FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to read the file contents! %r\n", __= func__, Status)); } =20 Exit: diff --git a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestR= esultReportLib.c b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/Uni= tTestResultReportLib.c index d088b927a6c2..5e2973beb3e1 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultRe= portLib.c +++ b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultRe= portLib.c @@ -102,7 +102,7 @@ GetStringForFailureType ( // // Return last entry if no match found. // - DEBUG ((DEBUG_INFO, "%a Failure Type does not have string defined 0x%X\n= ", __FUNCTION__, (UINT32)Failure)); + DEBUG ((DEBUG_INFO, "%a Failure Type does not have string defined 0x%X\n= ", __func__, (UINT32)Failure)); return mFailureTypeStrings[Index].String; } =20 diff --git a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestR= esultReportLibConOut.c b/UnitTestFrameworkPkg/Library/UnitTestResultReportL= ib/UnitTestResultReportLibConOut.c index aba00fe7b962..3bcbf557a168 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultRe= portLibConOut.c +++ b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultRe= portLibConOut.c @@ -25,7 +25,7 @@ ReportPrint ( VA_START (Marker, Format); Length =3D UnicodeVSPrintAsciiFormat (String, sizeof (String), Format, M= arker); if (Length =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a formatted string is too long\n", __FUNCTION__= )); + DEBUG ((DEBUG_ERROR, "%a formatted string is too long\n", __func__)); } else { gST->ConOut->OutputString (gST->ConOut, String); } diff --git a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestR= esultReportLibDebugLib.c b/UnitTestFrameworkPkg/Library/UnitTestResultRepor= tLib/UnitTestResultReportLibDebugLib.c index ac330861fd40..eb78554f9101 100644 --- a/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultRe= portLibDebugLib.c +++ b/UnitTestFrameworkPkg/Library/UnitTestResultReportLib/UnitTestResultRe= portLibDebugLib.c @@ -24,7 +24,7 @@ ReportPrint ( VA_START (Marker, Format); Length =3D AsciiVSPrint (String, sizeof (String), Format, Marker); if (Length =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a formatted string is too long\n", __FUNCTION__= )); + DEBUG ((DEBUG_ERROR, "%a formatted string is too long\n", __func__)); } else { DEBUG ((DEBUG_INFO, String)); } --=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 (#102640): https://edk2.groups.io/g/devel/message/102640 Mute This Topic: https://groups.io/mt/98115246/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- From nobody Wed May 15 21:28:33 2024 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+102641+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+102641+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819857; cv=none; d=zohomail.com; s=zohoarc; b=N/7+b6tGe1sG5x+ng/2+L+B++PLFPdTuiGmoct5yi/zZ02X0+SffAnLOMsBRJsPPMKa9wi3L1H5dssflxD9fSfSm0g7M9WoBdDkgTSdtfXwnO7SmCgRqNOf51GHRSA9HzqYOlCZuhdkpDA57S3JkQQLEiMPCbom/Gt82f+vHTcc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819857; 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=RnZUlBNHNLTSaEK3013iT2+GBCYZtbNyDcpJN9V2SFI=; b=h6g44OFIRCD4ULrCLFvAfbbgj4KVBpdKRE28U7yd5z/I3shkr3cTILOpj/FwKUdp3UleIeHxpD3EiSeA1sECbAvHLn/i9EpoeZvWH7kSiv6w99oqt4awFm9aChZh6exIKG78eGzhhJsaAcGpsfXy7+zja6B608XhEWFALuQf9gM= 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+102641+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819857019129.38123214927396; Thu, 6 Apr 2023 15:24:17 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id izhqYY1788612xCdVUrv0GA4; Thu, 06 Apr 2023 15:24:16 -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.172003.1680819855915241280 for ; Thu, 06 Apr 2023 15:24:16 -0700 X-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 3DB055C01EE; Thu, 6 Apr 2023 18:24:15 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 06 Apr 2023 18:24:15 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:24:11 -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 11/18] PrmPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:12 -0600 Message-Id: <20230406222319.2281263-12-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: wzpEQ554V5cpNp7Q4x0Oqy5xx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819856; bh=lY7zLp0cD+xMzb30lQiJePqKhpUx0xUsAFNHscq/dxI=; h=Cc:Date:From:Reply-To:Subject:To; b=WiJT8z0qMkrRXgzVFBfixBZm96YB/tOFrnEfWq8ARVUsKbJyVT6aqH/ZhY32+gqsJ3v cWljDqDjshe4TX2Yl4HDabAH/TwF2WF1iw9SN7jIByxG2E7T1B04GqqgQfwnj7Vol0iGR bI3wCjkcP0lkjKuR+PmysxVP7DBUUz0Z5SE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819857802100001 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 PrmPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- PrmPkg/Application/PrmInfo/PrmInfo.c = | 6 +-- PrmPkg/Library/DxePrmContextBufferLib/DxePrmContextBufferLib.c = | 10 ++--- PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmContextBufferLibUnitT= est.c | 2 +- PrmPkg/Library/DxePrmModuleDiscoveryLib/DxePrmModuleDiscoveryLib.c = | 14 +++---- PrmPkg/Library/DxePrmPeCoffLib/DxePrmPeCoffLib.c = | 40 +++++++++--------- PrmPkg/PrmConfigDxe/PrmConfigDxe.c = | 44 ++++++++++---------- PrmPkg/PrmLoaderDxe/PrmLoaderDxe.c = | 22 +++++----- PrmPkg/PrmSsdtInstallDxe/PrmSsdtInstallDxe.c = | 4 +- 8 files changed, 71 insertions(+), 71 deletions(-) diff --git a/PrmPkg/Application/PrmInfo/PrmInfo.c b/PrmPkg/Application/PrmI= nfo/PrmInfo.c index 0cde2fad3b4b..d7ce0d03be60 100644 --- a/PrmPkg/Application/PrmInfo/PrmInfo.c +++ b/PrmPkg/Application/PrmInfo/PrmInfo.c @@ -493,7 +493,7 @@ ExecutePrmHandlerByGuid ( DEBUG_ERROR, "%a - %a: An error occurred creating a context buffer for handler = %g\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, HandlerContext->Guid )); } @@ -628,7 +628,7 @@ ParseParameterList ( DEBUG_ERROR, "%a - %a: An error occurred during PRM module discovery (%r)\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); ReturnStatus =3D Status; @@ -719,7 +719,7 @@ UefiMain ( DEBUG_ERROR, "%a - %a: An error occurred parsing user-provided arguments (%r)\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, Status )); } diff --git a/PrmPkg/Library/DxePrmContextBufferLib/DxePrmContextBufferLib.c= b/PrmPkg/Library/DxePrmContextBufferLib/DxePrmContextBufferLib.c index 3036aa503ec8..a6ad141556a4 100644 --- a/PrmPkg/Library/DxePrmContextBufferLib/DxePrmContextBufferLib.c +++ b/PrmPkg/Library/DxePrmContextBufferLib/DxePrmContextBufferLib.c @@ -40,7 +40,7 @@ FindContextBufferInModuleBuffers ( { UINTN Index; =20 - DEBUG ((DEBUG_INFO, " %a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, " %a %a - Entry.\n", _DBGMSGID_, __func__)); =20 if ((HandlerGuid =3D=3D NULL) || (ModuleContextBuffers =3D=3D NULL) || (= ContextBuffer =3D=3D NULL)) { return EFI_INVALID_PARAMETER; @@ -89,7 +89,7 @@ GetModuleContextBuffers ( PRM_CONFIG_PROTOCOL *PrmConfigProtocol; CONST PRM_CONTEXT_BUFFER *PrmContextBuffer; =20 - DEBUG ((DEBUG_INFO, " %a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, " %a %a - Entry.\n", _DBGMSGID_, __func__)); =20 if ((Guid =3D=3D NULL) || (PrmModuleContextBuffers =3D=3D NULL)) { return EFI_INVALID_PARAMETER; @@ -122,7 +122,7 @@ GetModuleContextBuffers ( DEBUG_INFO, " %a %a: Found a PRM configuration protocol for PRM modul= e %g.\n", _DBGMSGID_, - __FUNCTION__, + __func__, Guid )); =20 @@ -143,7 +143,7 @@ GetModuleContextBuffers ( DEBUG_INFO, " %a %a: Could not locate a PRM configuration protocol for PRM ha= ndler %g.\n", _DBGMSGID_, - __FUNCTION__, + __func__, Guid )); =20 @@ -176,7 +176,7 @@ GetContextBuffer ( EFI_STATUS Status; CONST PRM_MODULE_CONTEXT_BUFFERS *ContextBuffers; =20 - DEBUG ((DEBUG_INFO, " %a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, " %a %a - Entry.\n", _DBGMSGID_, __func__)); =20 if ((PrmHandlerGuid =3D=3D NULL) || (PrmContextBuffer =3D=3D NULL)) { return EFI_INVALID_PARAMETER; diff --git a/PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmContextBu= fferLibUnitTest.c b/PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmCo= ntextBufferLibUnitTest.c index fdc32993b82d..212c4cf6aaba 100644 --- a/PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmContextBufferLib= UnitTest.c +++ b/PrmPkg/Library/DxePrmContextBufferLib/UnitTest/DxePrmContextBufferLib= UnitTest.c @@ -384,7 +384,7 @@ VerifyGetModuleContextBuffers ( UT_ASSERT_TRUE (CompareGuid (TestContext->ExpectedModuleGuid, &Context= Buffers->ModuleGuid)); UT_LOG_INFO ( "%a: Searching by %a GUID ({%g}) returned ContextBuffers at 0x%x\n", - __FUNCTION__, + __func__, ((TestContext->GuidSearchType =3D=3D ByModuleGuid) ? "module" : "han= dler"), TestContext->Guid, (UINTN)ContextBuffers diff --git a/PrmPkg/Library/DxePrmModuleDiscoveryLib/DxePrmModuleDiscoveryL= ib.c b/PrmPkg/Library/DxePrmModuleDiscoveryLib/DxePrmModuleDiscoveryLib.c index e6bea47bc583..efd9f231baa0 100644 --- a/PrmPkg/Library/DxePrmModuleDiscoveryLib/DxePrmModuleDiscoveryLib.c +++ b/PrmPkg/Library/DxePrmModuleDiscoveryLib/DxePrmModuleDiscoveryLib.c @@ -48,7 +48,7 @@ GetNextPrmModuleEntry ( PRM_MODULE_IMAGE_CONTEXT_LIST_ENTRY *CurrentListEntry; PRM_MODULE_IMAGE_CONTEXT_LIST_ENTRY *ForwardListEntry; =20 - DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __func__)); =20 if (ModuleImageContext =3D=3D NULL) { return EFI_INVALID_PARAMETER; @@ -94,7 +94,7 @@ CreateNewPrmModuleImageContextListEntry ( { PRM_MODULE_IMAGE_CONTEXT_LIST_ENTRY *PrmModuleImageContextListEntry; =20 - DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __func__)); =20 PrmModuleImageContextListEntry =3D AllocateZeroPool (sizeof (*PrmModuleI= mageContextListEntry)); if (PrmModuleImageContextListEntry =3D=3D NULL) { @@ -105,7 +105,7 @@ CreateNewPrmModuleImageContextListEntry ( DEBUG_INFO, " %a %a: Allocated PrmModuleImageContextListEntry at 0x%x of size 0x%= x bytes.\n", _DBGMSGID_, - __FUNCTION__, + __func__, (UINTN)PrmModuleImageContextListEntry, sizeof (*PrmModuleImageContextListEntry) )); @@ -186,7 +186,7 @@ DiscoverPrmModules ( EFI_MMRAM_DESCRIPTOR *MmramRanges; UINTN MmramRangeCount; =20 - DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __func__)); =20 PrmHandlerCount =3D 0; PrmModuleCount =3D 0; @@ -203,7 +203,7 @@ DiscoverPrmModules ( &HandleBuffer ); if (EFI_ERROR (Status) && (HandleCount =3D=3D 0)) { - DEBUG ((DEBUG_ERROR, "%a %a: No LoadedImageProtocol instances found!\n= ", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a %a: No LoadedImageProtocol instances found!\n= ", _DBGMSGID_, __func__)); return EFI_NOT_FOUND; } =20 @@ -255,7 +255,7 @@ DiscoverPrmModules ( DEBUG_WARN, "%a %a: ImageHandle 0x%016lx is not a valid PE/COFF image. It cann= ot be considered a PRM module.\n", _DBGMSGID_, - __FUNCTION__, + __func__, (EFI_PHYSICAL_ADDRESS)(UINTN)LoadedImageProtocol->ImageBase )); continue; @@ -304,7 +304,7 @@ DiscoverPrmModules ( InsertTailList (&mPrmModuleList, &PrmModuleImageContextListEntry->Link= ); PrmHandlerCount +=3D TempPrmModuleImageContext.ExportDescriptor->Heade= r.NumberPrmHandlers; PrmModuleCount++; - DEBUG ((DEBUG_INFO, "%a %a: New PRM Module inserted into list to be pr= ocessed.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a: New PRM Module inserted into list to be pr= ocessed.\n", _DBGMSGID_, __func__)); } =20 if (HandlerCount !=3D NULL) { diff --git a/PrmPkg/Library/DxePrmPeCoffLib/DxePrmPeCoffLib.c b/PrmPkg/Libr= ary/DxePrmPeCoffLib/DxePrmPeCoffLib.c index d535c2c10596..15792777b74b 100644 --- a/PrmPkg/Library/DxePrmPeCoffLib/DxePrmPeCoffLib.c +++ b/PrmPkg/Library/DxePrmPeCoffLib/DxePrmPeCoffLib.c @@ -51,7 +51,7 @@ GetPrmModuleExportDescriptorTable ( UINT32 *ExportAddressTable; PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT *TempExportDescriptor; =20 - DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __func__)); =20 if ((ImageExportDirectory =3D=3D NULL) || (PeCoffLoaderImageContext =3D=3D NULL) || @@ -67,7 +67,7 @@ GetPrmModuleExportDescriptorTable ( DEBUG_INFO, " %a %a: %d exported names found in this image.\n", _DBGMSGID_, - __FUNCTION__, + __func__, ImageExportDirectory->NumberOfNames )); =20 @@ -85,7 +85,7 @@ GetPrmModuleExportDescriptorTable ( DEBUG_INFO, " %a %a: Export Name[0x%x] - %a.\n", _DBGMSGID_, - __FUNCTION__, + __func__, Index, CurrentExportName )); @@ -101,29 +101,29 @@ GetPrmModuleExportDescriptorTable ( DEBUG_INFO, " %a %a: PRM Module Export Descriptor found. Ordinal =3D %d.\n", _DBGMSGID_, - __FUNCTION__, + __func__, PrmModuleExportDescriptorOrdinal )); if (PrmModuleExportDescriptorOrdinal >=3D ImageExportDirectory->Numb= erOfFunctions) { - DEBUG ((DEBUG_ERROR, "%a %a: The PRM Module Export Descriptor ordi= nal value is invalid.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a %a: The PRM Module Export Descriptor ordi= nal value is invalid.\n", _DBGMSGID_, __func__)); return EFI_NOT_FOUND; } =20 TempExportDescriptor =3D (PRM_MODULE_EXPORT_DESCRIPTOR_STRUCT *)((UI= NTN)CurrentImageAddress + ExportAddressTable[PrmModuleExportDescriptorOrdin= al]); if (TempExportDescriptor->Header.Signature =3D=3D PRM_MODULE_EXPORT_= DESCRIPTOR_SIGNATURE) { *ExportDescriptor =3D TempExportDescriptor; - DEBUG ((DEBUG_INFO, " %a %a: PRM Module Export Descriptor found a= t 0x%x.\n", _DBGMSGID_, __FUNCTION__, (UINTN)ExportDescriptor)); + DEBUG ((DEBUG_INFO, " %a %a: PRM Module Export Descriptor found a= t 0x%x.\n", _DBGMSGID_, __func__, (UINTN)ExportDescriptor)); } else { DEBUG (( DEBUG_INFO, " %a %a: PRM Module Export Descriptor found at 0x%x but signatu= re check failed.\n", _DBGMSGID_, - __FUNCTION__, + __func__, (UINTN)TempExportDescriptor )); } =20 - DEBUG ((DEBUG_INFO, " %a %a: Exiting export iteration since export = descriptor found.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, " %a %a: Exiting export iteration since export = descriptor found.\n", _DBGMSGID_, __func__)); return EFI_SUCCESS; } } @@ -194,7 +194,7 @@ GetExportDirectoryInPeCoffImage ( DEBUG_WARN, "%a %a: The machine type for this image is not valid for a PRM mod= ule.\n", _DBGMSGID_, - __FUNCTION__ + __func__ )); return EFI_UNSUPPORTED; } @@ -208,7 +208,7 @@ GetExportDirectoryInPeCoffImage ( // Check the PE/COFF Header Signature. Determine if the image is valid a= nd/or a TE image. // if (OptionalHeaderPtrUnion.Pe32->Signature !=3D EFI_IMAGE_NT_SIGNATURE) { - DEBUG ((DEBUG_ERROR, "%a %a: The PE signature is not valid for the cur= rent image.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a %a: The PE signature is not valid for the cur= rent image.\n", _DBGMSGID_, __func__)); return EFI_UNSUPPORTED; } =20 @@ -237,18 +237,18 @@ GetExportDirectoryInPeCoffImage ( // // The directory address overflows // - DEBUG ((DEBUG_ERROR, "%a %a: The export directory entry in this image = results in overflow.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a %a: The export directory entry in this image = results in overflow.\n", _DBGMSGID_, __func__)); return EFI_UNSUPPORTED; } else { - DEBUG ((DEBUG_INFO, "%a %a: Export Directory Entry found in the image = at 0x%x.\n", _DBGMSGID_, __FUNCTION__, (UINTN)OptionalHeaderPtrUnion.Pe32)); - DEBUG ((DEBUG_INFO, " %a %a: Directory Entry Virtual Address =3D 0x%x= .\n", _DBGMSGID_, __FUNCTION__, DirectoryEntry->VirtualAddress)); + DEBUG ((DEBUG_INFO, "%a %a: Export Directory Entry found in the image = at 0x%x.\n", _DBGMSGID_, __func__, (UINTN)OptionalHeaderPtrUnion.Pe32)); + DEBUG ((DEBUG_INFO, " %a %a: Directory Entry Virtual Address =3D 0x%x= .\n", _DBGMSGID_, __func__, DirectoryEntry->VirtualAddress)); =20 ExportDirectory =3D (EFI_IMAGE_EXPORT_DIRECTORY *)((UINTN)Image + Dire= ctoryEntry->VirtualAddress); DEBUG (( DEBUG_INFO, " %a %a: Export Directory Table found successfully at 0x%x. Name ad= dress =3D 0x%x. Name =3D %a.\n", _DBGMSGID_, - __FUNCTION__, + __func__, (UINTN)ExportDirectory, ((UINTN)Image + ExportDirectory->Name), (CHAR8 *)((UINTN)Image + ExportDirectory->Name) @@ -287,7 +287,7 @@ GetImageVersionInPeCoffImage ( EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION OptionalHeaderPtrUnion; UINT16 Magic; =20 - DEBUG ((DEBUG_INFO, " %a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, " %a %a - Entry.\n", _DBGMSGID_, __func__)); =20 if ((Image =3D=3D NULL) || (PeCoffLoaderImageContext =3D=3D NULL) || (Im= ageMajorVersion =3D=3D NULL) || (ImageMinorVersion =3D=3D NULL)) { return EFI_INVALID_PARAMETER; @@ -320,7 +320,7 @@ GetImageVersionInPeCoffImage ( DEBUG_WARN, "%a %a: The machine type for this image is not valid for a PRM mod= ule.\n", _DBGMSGID_, - __FUNCTION__ + __func__ )); return EFI_UNSUPPORTED; } @@ -333,7 +333,7 @@ GetImageVersionInPeCoffImage ( // Check the PE/COFF Header Signature. Determine if the image is valid a= nd/or a TE image. // if (OptionalHeaderPtrUnion.Pe32->Signature !=3D EFI_IMAGE_NT_SIGNATURE) { - DEBUG ((DEBUG_ERROR, "%a %a: The PE signature is not valid for the cur= rent image.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a %a: The PE signature is not valid for the cur= rent image.\n", _DBGMSGID_, __func__)); return EFI_UNSUPPORTED; } =20 @@ -351,8 +351,8 @@ GetImageVersionInPeCoffImage ( *ImageMinorVersion =3D OptionalHeaderPtrUnion.Pe32Plus->OptionalHeader= .MinorImageVersion; } =20 - DEBUG ((DEBUG_INFO, " %a %a - Image Major Version: 0x%02x.\n", _DBG= MSGID_, __FUNCTION__, *ImageMajorVersion)); - DEBUG ((DEBUG_INFO, " %a %a - Image Minor Version: 0x%02x.\n", _DBG= MSGID_, __FUNCTION__, *ImageMinorVersion)); + DEBUG ((DEBUG_INFO, " %a %a - Image Major Version: 0x%02x.\n", _DBG= MSGID_, __func__, *ImageMajorVersion)); + DEBUG ((DEBUG_INFO, " %a %a - Image Minor Version: 0x%02x.\n", _DBG= MSGID_, __func__, *ImageMinorVersion)); =20 return EFI_SUCCESS; } @@ -404,7 +404,7 @@ GetExportEntryAddress ( =20 ASSERT (CurrentExportOrdinal < ImageExportDirectory->NumberOfFunctio= ns); if (CurrentExportOrdinal >=3D ImageExportDirectory->NumberOfFunction= s) { - DEBUG ((DEBUG_ERROR, " %a %a: The export ordinal value is invalid= .\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_ERROR, " %a %a: The export ordinal value is invalid= .\n", _DBGMSGID_, __func__)); break; } =20 diff --git a/PrmPkg/PrmConfigDxe/PrmConfigDxe.c b/PrmPkg/PrmConfigDxe/PrmCo= nfigDxe.c index c175ee2183ce..550ee64b4c53 100644 --- a/PrmPkg/PrmConfigDxe/PrmConfigDxe.c +++ b/PrmPkg/PrmConfigDxe/PrmConfigDxe.c @@ -71,7 +71,7 @@ SetRuntimeMemoryRangeAttributes ( UINTN Index; EFI_GCD_MEMORY_SPACE_DESCRIPTOR Descriptor; =20 - DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __func__)); =20 if ((RuntimeMmioRanges =3D=3D NULL) || (RuntimeMmioRanges->Count =3D=3D = 0)) { return; @@ -82,14 +82,14 @@ SetRuntimeMemoryRangeAttributes ( DEBUG_INFO, " %a %a: Runtime MMIO Range [%d].\n", _DBGMSGID_, - __FUNCTION__, + __func__, Index )); DEBUG (( DEBUG_INFO, " %a %a: Physical address =3D 0x%016x. Length =3D 0x%x.\n", _DBGMSGID_, - __FUNCTION__, + __func__, RuntimeMmioRanges->Range[Index].PhysicalBaseAddress, RuntimeMmioRanges->Range[Index].Length )); @@ -141,7 +141,7 @@ SetRuntimeMemoryRangeAttributes ( DEBUG_ERROR, " %a %a: Error [%r] finding descriptor for runtime memory ran= ge 0x%016x.\n", _DBGMSGID_, - __FUNCTION__, + __func__, Status, RuntimeMmioRanges->Range[Index].PhysicalBaseAddress )); @@ -163,12 +163,12 @@ SetRuntimeMemoryRangeAttributes ( DEBUG_ERROR, " %a %a: Error [%r] setting descriptor for runtime memory ran= ge 0x%016x.\n", _DBGMSGID_, - __FUNCTION__, + __func__, Status, RuntimeMmioRanges->Range[Index].PhysicalBaseAddress )); } else { - DEBUG ((DEBUG_INFO, " %a %a: Successfully set runtime attribute= for the MMIO range.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, " %a %a: Successfully set runtime attribute= for the MMIO range.\n", _DBGMSGID_, __func__)); } } } @@ -189,7 +189,7 @@ StoreVirtualMemoryAddressChangePointers ( EFI_HANDLE *HandleBuffer; PRM_CONFIG_PROTOCOL *PrmConfigProtocol; =20 - DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __func__)); =20 RangeIndex =3D 0; =20 @@ -199,7 +199,7 @@ StoreVirtualMemoryAddressChangePointers ( DEBUG_ERROR, " %a %a: Memory allocation for runtime MMIO pointer array failed.\n= ", _DBGMSGID_, - __FUNCTION__ + __func__ )); ASSERT (FALSE); return; @@ -232,7 +232,7 @@ StoreVirtualMemoryAddressChangePointers ( DEBUG_ERROR, " %a %a: Index out of bounds - Actual count (%d) of runtime M= MIO ranges exceeds maximum count (%d).\n", _DBGMSGID_, - __FUNCTION__, + __func__, RangeIndex + 1, mMaxRuntimeMmioRangeCount )); @@ -248,7 +248,7 @@ StoreVirtualMemoryAddressChangePointers ( DEBUG_INFO, " %a %a: %d MMIO ranges buffers saved for future virtual memory con= version.\n", _DBGMSGID_, - __FUNCTION__, + __func__, RangeIndex )); } @@ -277,12 +277,12 @@ ValidatePrmDataBuffer ( } =20 if (PrmDataBuffer->Header.Signature !=3D PRM_DATA_BUFFER_HEADER_SIGNATUR= E) { - DEBUG ((DEBUG_ERROR, " %a %a: The PRM data buffer signature is invali= d. PRM module.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_ERROR, " %a %a: The PRM data buffer signature is invali= d. PRM module.\n", _DBGMSGID_, __func__)); return EFI_NOT_FOUND; } =20 if (PrmDataBuffer->Header.Length < sizeof (PRM_DATA_BUFFER_HEADER)) { - DEBUG ((DEBUG_ERROR, " %a %a: The PRM data buffer length is invalid.\= n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_ERROR, " %a %a: The PRM data buffer length is invalid.\= n", _DBGMSGID_, __func__)); return EFI_BUFFER_TOO_SMALL; } =20 @@ -311,12 +311,12 @@ ValidatePrmContextBuffer ( } =20 if (PrmContextBuffer->Signature !=3D PRM_CONTEXT_BUFFER_SIGNATURE) { - DEBUG ((DEBUG_ERROR, " %a %a: The PRM context buffer signature is inv= alid.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_ERROR, " %a %a: The PRM context buffer signature is inv= alid.\n", _DBGMSGID_, __func__)); return EFI_NOT_FOUND; } =20 if (IsZeroGuid (&PrmContextBuffer->HandlerGuid)) { - DEBUG ((DEBUG_ERROR, " %a %a: The PRM context buffer GUID is zero.\n"= , _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_ERROR, " %a %a: The PRM context buffer GUID is zero.\n"= , _DBGMSGID_, __func__)); return EFI_NOT_FOUND; } =20 @@ -325,7 +325,7 @@ ValidatePrmContextBuffer ( DEBUG_ERROR, " %a %a: Error in static buffer for PRM handler %g.\n", _DBGMSGID_, - __FUNCTION__, + __func__, &PrmContextBuffer->HandlerGuid )); return EFI_NOT_FOUND; @@ -387,7 +387,7 @@ PrmConfigEndOfDxeNotification ( PRM_CONTEXT_BUFFER *CurrentContextBuffer; PRM_CONFIG_PROTOCOL *PrmConfigProtocol; =20 - DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __func__)); =20 HandleBuffer =3D NULL; Status =3D gBS->LocateHandleBuffer ( @@ -413,11 +413,11 @@ PrmConfigEndOfDxeNotification ( DEBUG_INFO, " %a %a: Found PRM configuration protocol for PRM module %g.\n", _DBGMSGID_, - __FUNCTION__, + __func__, &PrmConfigProtocol->ModuleContextBuffers.ModuleGuid )); =20 - DEBUG ((DEBUG_INFO, " %a %a: Validating module context buffers.= ..\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, " %a %a: Validating module context buffers.= ..\n", _DBGMSGID_, __func__)); for (BufferIndex =3D 0; BufferIndex < PrmConfigProtocol->ModuleConte= xtBuffers.BufferCount; BufferIndex++) { CurrentContextBuffer =3D &(PrmConfigProtocol->ModuleContextBuffers= .Buffer[BufferIndex]); =20 @@ -427,20 +427,20 @@ PrmConfigEndOfDxeNotification ( DEBUG_ERROR, " %a %a: Context buffer validation failed for PRM handl= er %g.\n", _DBGMSGID_, - __FUNCTION__, + __func__, CurrentContextBuffer->HandlerGuid )); } } =20 - DEBUG ((DEBUG_INFO, " %a %a: Module context buffer validation c= omplete.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, " %a %a: Module context buffer validation c= omplete.\n", _DBGMSGID_, __func__)); =20 if (PrmConfigProtocol->ModuleContextBuffers.RuntimeMmioRanges !=3D N= ULL) { DEBUG (( DEBUG_INFO, " %a %a: Found %d PRM runtime MMIO ranges.\n", _DBGMSGID_, - __FUNCTION__, + __func__, PrmConfigProtocol->ModuleContextBuffers.RuntimeMmioRanges->Count )); SetRuntimeMemoryRangeAttributes (PrmConfigProtocol->ModuleContextB= uffers.RuntimeMmioRanges); @@ -478,7 +478,7 @@ PrmConfigEntryPoint ( EFI_STATUS Status; EFI_EVENT Event; =20 - DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __func__)); =20 // // Register a notification function to change memory attributes at end o= f DXE diff --git a/PrmPkg/PrmLoaderDxe/PrmLoaderDxe.c b/PrmPkg/PrmLoaderDxe/PrmLo= aderDxe.c index 5a223d783d80..477c24c8b8ff 100644 --- a/PrmPkg/PrmLoaderDxe/PrmLoaderDxe.c +++ b/PrmPkg/PrmLoaderDxe/PrmLoaderDxe.c @@ -73,7 +73,7 @@ ProcessPrmModules ( =20 UINT64 HandlerPhysicalAddress; =20 - DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __func__)); =20 if (PrmAcpiDescriptionTable =3D=3D NULL) { return EFI_INVALID_PARAMETER; @@ -89,19 +89,19 @@ ProcessPrmModules ( DEBUG_ERROR, " %a %a: The Platform GUID in the DSC file must be set to a unique = non-zero value.\n", _DBGMSGID_, - __FUNCTION__ + __func__ )); ASSERT (!CompareGuid (&gEdkiiDscPlatformGuid, &gZeroGuid)); } =20 - DEBUG ((DEBUG_INFO, " %a %a: %d total PRM modules to process.\n", _DBGM= SGID_, __FUNCTION__, mPrmModuleCount)); - DEBUG ((DEBUG_INFO, " %a %a: %d total PRM handlers to process.\n", _DBG= MSGID_, __FUNCTION__, mPrmHandlerCount)); + DEBUG ((DEBUG_INFO, " %a %a: %d total PRM modules to process.\n", _DBGM= SGID_, __func__, mPrmModuleCount)); + DEBUG ((DEBUG_INFO, " %a %a: %d total PRM handlers to process.\n", _DBG= MSGID_, __func__, mPrmHandlerCount)); =20 PrmAcpiDescriptionTableBufferSize =3D (UINT32)(OFFSET_OF (PRM_ACPI_DESCR= IPTION_TABLE, PrmModuleInfoStructure) + (OFFSET_OF (PRM_MODULE_INFO= RMATION_STRUCT, HandlerInfoStructure) * mPrmModuleCount) + (sizeof (PRM_HANDLER_INFORM= ATION_STRUCT) * mPrmHandlerCount) ); - DEBUG ((DEBUG_INFO, " %a %a: Total PRM ACPI table size: 0x%x.\n", _DBGM= SGID_, __FUNCTION__, PrmAcpiDescriptionTableBufferSize)); + DEBUG ((DEBUG_INFO, " %a %a: Total PRM ACPI table size: 0x%x.\n", _DBGM= SGID_, __func__, PrmAcpiDescriptionTableBufferSize)); =20 PrmAcpiTable =3D AllocateZeroPool ((UINTN)PrmAcpiDescriptionTableBufferS= ize); if (PrmAcpiTable =3D=3D NULL) { @@ -139,7 +139,7 @@ ProcessPrmModules ( DEBUG_INFO, " %a %a: PRM Module - %a with %d handlers.\n", _DBGMSGID_, - __FUNCTION__, + __func__, (CHAR8 *)((UINTN)CurrentImageAddress + CurrentImageExportDirectory->= Name), CurrentExportDescriptorStruct->Header.NumberPrmHandlers )); @@ -212,7 +212,7 @@ ProcessPrmModules ( DEBUG_INFO, " %a %a: Found %a handler physical address at 0x%016x.\n", _DBGMSGID_, - __FUNCTION__, + __func__, CurrentExportDescriptorHandlerName, CurrentHandlerInfoStruct->PhysicalAddress )); @@ -279,7 +279,7 @@ PublishPrmAcpiTable ( &TableKey ); if (!EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a %a: The PRMT ACPI table was installed succes= sfully.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a: The PRMT ACPI table was installed succes= sfully.\n", _DBGMSGID_, __func__)); } } =20 @@ -316,7 +316,7 @@ PrmLoaderEndOfDxeNotification ( EFI_STATUS Status; PRM_ACPI_DESCRIPTION_TABLE *PrmAcpiDescriptionTable; =20 - DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __func__)); =20 Status =3D DiscoverPrmModules (&mPrmModuleCount, &mPrmHandlerCount); ASSERT_EFI_ERROR (Status); @@ -354,7 +354,7 @@ PrmLoaderEntryPoint ( EFI_STATUS Status; EFI_EVENT EndOfDxeEvent; =20 - DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __func__)); =20 // // Discover and process installed PRM modules at the End of DXE @@ -369,7 +369,7 @@ PrmLoaderEntryPoint ( &EndOfDxeEvent ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a %a: EndOfDxe callback registration failed! %r= .\n", _DBGMSGID_, __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a %a: EndOfDxe callback registration failed! %r= .\n", _DBGMSGID_, __func__, Status)); ASSERT_EFI_ERROR (Status); } =20 diff --git a/PrmPkg/PrmSsdtInstallDxe/PrmSsdtInstallDxe.c b/PrmPkg/PrmSsdtI= nstallDxe/PrmSsdtInstallDxe.c index e8bf4cfb8f2d..80ad7d37587d 100644 --- a/PrmPkg/PrmSsdtInstallDxe/PrmSsdtInstallDxe.c +++ b/PrmPkg/PrmSsdtInstallDxe/PrmSsdtInstallDxe.c @@ -42,7 +42,7 @@ InstallPrmSsdt ( EFI_ACPI_TABLE_PROTOCOL *AcpiTableProtocol; EFI_ACPI_DESCRIPTION_HEADER *Ssdt; =20 - DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a %a - Entry.\n", _DBGMSGID_, __func__)); =20 if (OemId =3D=3D NULL) { return EFI_INVALID_PARAMETER; @@ -61,7 +61,7 @@ InstallPrmSsdt ( &SsdtSize ); ASSERT_EFI_ERROR (Status); - DEBUG ((DEBUG_INFO, "%a %a: SSDT loaded...\n", _DBGMSGID_, __FUNCTION_= _)); + DEBUG ((DEBUG_INFO, "%a %a: SSDT loaded...\n", _DBGMSGID_, __func__)); =20 // // Update OEM ID in the SSDT --=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 (#102641): https://edk2.groups.io/g/devel/message/102641 Mute This Topic: https://groups.io/mt/98115248/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- From nobody Wed May 15 21:28:33 2024 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+102642+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+102642+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819860; cv=none; d=zohomail.com; s=zohoarc; b=bWlWKgyyZZb73841nDzj1l9HaPDgsDxpk4rmOqe1xrKIZJMkbilZnhBulzJ8D1GyGVw1tT2t0So/VNaBpXUd8deVV0poLrz0+hVMdYmz87snr2+guPdIAAi+QuDSNGNoLLmY8v2bMPTp9hkbZ0gyePVTkoD1hPabGNOSUV+zNwg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819860; 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=qgIYA1MprSYfyPtBjFnOJ1LLTkkyqgRYyLB3oxhmJFk=; b=EdbURzvI8W6nTkC5uL4E8jp1/jl2nuszYTewaU6yxA4Pzu91d3ixRJMlPFPu0gPAdCo7gUGi4KTzkCRQ7xZwIHm2EdKg1PeP0zRx3t6Lkrc0od1ch7j2rT4pAz1GeSO8wJIICqtdAAabrPCUGTpJs0I0QK2slv1sTtm/qXcAXVI= 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+102642+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819860501958.1011904819541; Thu, 6 Apr 2023 15:24:20 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id FwH7YY1788612xWdaGo3r4T1; Thu, 06 Apr 2023 15:24:20 -0700 X-Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.171751.1680819859367975774 for ; Thu, 06 Apr 2023 15:24:19 -0700 X-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B150D5C01D6; Thu, 6 Apr 2023 18:24:18 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 06 Apr 2023 18:24:18 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:24:15 -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 12/18] StandaloneMmPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:13 -0600 Message-Id: <20230406222319.2281263-13-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: fbcKXWyAEz4dXipVKu8pcIspx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819860; bh=cllGxWUmSR9yB2/hB5c+0MU0ovbk3DTPwCwB5GKqgB4=; h=Cc:Date:From:Reply-To:Subject:To; b=q4i+Mji4W1oWnNaS+Hys7vf7VbIRxsitPEJysHChjC9XfAv6RkW7K0B4SRQjmfV3oYz /oBartdF//jfheOpu0RwCd738Tp5skvlC7C7djLnRS26rznI4talYTwSUXOYMyQk7t9L0 f968g0J8mRzJnEVQC8HQDZjG3VKSrbFB53o= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819862463100003 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 StandaloneMmPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/SetPermissions.c = | 22 ++++++++++---------- StandaloneMmPkg/Library/StandaloneMmMemLib/X86StandaloneMmMemLibInternal.c= | 2 +- StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/Standalon= eMmPeCoffExtraActionLib.c | 16 +++++++------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/SetPerm= issions.c b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/SetPermi= ssions.c index 8f2833a13512..5c6bd0e1d7d2 100644 --- a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/SetPermissions= .c +++ b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/Arm/SetPermissions= .c @@ -80,7 +80,7 @@ UpdateMmFoundationPeCoffPermissions ( DEBUG (( DEBUG_ERROR, "%a: ImageContext->ImageRead () failed (Status =3D %r)\n", - __FUNCTION__, + __func__, Status )); return Status; @@ -89,7 +89,7 @@ UpdateMmFoundationPeCoffPermissions ( DEBUG (( DEBUG_INFO, "%a: Section %d of image at 0x%lx has 0x%x permissions\n", - __FUNCTION__, + __func__, Index, ImageContext->ImageAddress, SectionHeader.Characteristics @@ -97,7 +97,7 @@ UpdateMmFoundationPeCoffPermissions ( DEBUG (( DEBUG_INFO, "%a: Section %d of image at 0x%lx has %a name\n", - __FUNCTION__, + __func__, Index, ImageContext->ImageAddress, SectionHeader.Name @@ -105,7 +105,7 @@ UpdateMmFoundationPeCoffPermissions ( DEBUG (( DEBUG_INFO, "%a: Section %d of image at 0x%lx has 0x%x address\n", - __FUNCTION__, + __func__, Index, ImageContext->ImageAddress, ImageContext->ImageAddress + SectionHeader.VirtualAddress @@ -113,7 +113,7 @@ UpdateMmFoundationPeCoffPermissions ( DEBUG (( DEBUG_INFO, "%a: Section %d of image at 0x%lx has 0x%x data\n", - __FUNCTION__, + __func__, Index, ImageContext->ImageAddress, SectionHeader.PointerToRawData @@ -133,7 +133,7 @@ UpdateMmFoundationPeCoffPermissions ( DEBUG (( DEBUG_INFO, "%a: Mapping section %d of image at 0x%lx with RW-XN permissions= \n", - __FUNCTION__, + __func__, Index, ImageContext->ImageAddress )); @@ -141,7 +141,7 @@ UpdateMmFoundationPeCoffPermissions ( DEBUG (( DEBUG_INFO, "%a: Mapping section %d of image at 0x%lx with RO-XN permissions= \n", - __FUNCTION__, + __func__, Index, ImageContext->ImageAddress )); @@ -150,7 +150,7 @@ UpdateMmFoundationPeCoffPermissions ( DEBUG (( DEBUG_INFO, "%a: Ignoring section %d of image at 0x%lx with 0x%x permissions\n= ", - __FUNCTION__, + __func__, Index, ImageContext->ImageAddress, SectionHeader.Characteristics @@ -251,7 +251,7 @@ GetPeCoffSectionInformation ( DEBUG (( DEBUG_ERROR, "%a: PeCoffLoaderGetImageInfo () failed (Status =3D=3D %r)\n", - __FUNCTION__, + __func__, Status )); return Status; @@ -266,7 +266,7 @@ GetPeCoffSectionInformation ( DEBUG (( DEBUG_WARN, "%a: non-TE Image at 0x%lx has SectionAlignment < 4 KB (%lu)\n", - __FUNCTION__, + __func__, ImageContext->ImageAddress, ImageContext->SectionAlignment )); @@ -296,7 +296,7 @@ GetPeCoffSectionInformation ( DEBUG (( DEBUG_ERROR, "%a: TmpContext->ImageRead () failed (Status =3D %r)\n", - __FUNCTION__, + __func__, Status )); return Status; diff --git a/StandaloneMmPkg/Library/StandaloneMmMemLib/X86StandaloneMmMemL= ibInternal.c b/StandaloneMmPkg/Library/StandaloneMmMemLib/X86StandaloneMmMe= mLibInternal.c index c309d1bc6a56..0b4b1174de18 100644 --- a/StandaloneMmPkg/Library/StandaloneMmMemLib/X86StandaloneMmMemLibInter= nal.c +++ b/StandaloneMmPkg/Library/StandaloneMmMemLib/X86StandaloneMmMemLibInter= nal.c @@ -95,7 +95,7 @@ MmMemLibInternalPopulateMmramRanges ( EFI_MMRAM_DESCRIPTOR *MmramDescriptors; =20 HobStart =3D GetHobList (); - DEBUG ((DEBUG_INFO, "%a - 0x%x\n", __FUNCTION__, HobStart)); + DEBUG ((DEBUG_INFO, "%a - 0x%x\n", __func__, HobStart)); =20 // // Extract MM Core Private context from the Hob. If absent search for diff --git a/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch= 64/StandaloneMmPeCoffExtraActionLib.c b/StandaloneMmPkg/Library/StandaloneM= mPeCoffExtraActionLib/AArch64/StandaloneMmPeCoffExtraActionLib.c index 426fd8dd74ac..492252843e12 100644 --- a/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/Stan= daloneMmPeCoffExtraActionLib.c +++ b/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/Stan= daloneMmPeCoffExtraActionLib.c @@ -55,7 +55,7 @@ UpdatePeCoffPermissions ( DEBUG (( DEBUG_ERROR, "%a: PeCoffLoaderGetImageInfo () failed (Status =3D %r)\n", - __FUNCTION__, + __func__, Status )); return Status; @@ -68,7 +68,7 @@ UpdatePeCoffPermissions ( DEBUG (( DEBUG_INFO, "%a: ignoring XIP TE image at 0x%lx\n", - __FUNCTION__, + __func__, ImageContext->ImageAddress )); return RETURN_SUCCESS; @@ -84,7 +84,7 @@ UpdatePeCoffPermissions ( DEBUG (( DEBUG_WARN, "%a: non-TE Image at 0x%lx has SectionAlignment < 4 KB (%lu)\n", - __FUNCTION__, + __func__, ImageContext->ImageAddress, TmpContext.SectionAlignment )); @@ -114,7 +114,7 @@ UpdatePeCoffPermissions ( DEBUG (( DEBUG_ERROR, "%a: TmpContext.ImageRead () failed (Status =3D %r)\n", - __FUNCTION__, + __func__, Status )); return Status; @@ -156,7 +156,7 @@ UpdatePeCoffPermissions ( DEBUG (( DEBUG_ERROR, "%a: TmpContext.ImageRead () failed (Status =3D %r)\n", - __FUNCTION__, + __func__, Status )); return Status; @@ -169,7 +169,7 @@ UpdatePeCoffPermissions ( DEBUG (( DEBUG_INFO, "%a: Mapping section %d of image at 0x%lx with RO-XN permissions= and size 0x%x\n", - __FUNCTION__, + __func__, Index, Base, SectionHeader.Misc.VirtualSize @@ -179,7 +179,7 @@ UpdatePeCoffPermissions ( DEBUG (( DEBUG_WARN, "%a: Mapping section %d of image at 0x%lx with RW-XN permissions= and size 0x%x\n", - __FUNCTION__, + __func__, Index, Base, SectionHeader.Misc.VirtualSize @@ -189,7 +189,7 @@ UpdatePeCoffPermissions ( DEBUG (( DEBUG_INFO, "%a: Mapping section %d of image at 0x%lx with RO-X permissions an= d size 0x%x\n", - __FUNCTION__, + __func__, Index, Base, SectionHeader.Misc.VirtualSize --=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 (#102642): https://edk2.groups.io/g/devel/message/102642 Mute This Topic: https://groups.io/mt/98115249/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- From nobody Wed May 15 21:28:33 2024 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+102643+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+102643+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819863; cv=none; d=zohomail.com; s=zohoarc; b=G2xQsSXhJy67V3d9BwDh9BoPDi/AZ8QrZGR6dyBj+g0eOJ58ymsXM59A1ZUQ5AyxkQUaOvRtyOO6Y/QF468gcE1ErjtHuMRrrSZ1tIQ2y9C3oiXwoZ/zU/J7iQf2acZXHwdO4t6NodDvPvgidKFDI8As9EQB0ngOCwXdHE33WJ8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819863; 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=dg9tqeGpSr56+hL3q2xPE4kwTxqdphONGaIILVcVmpE=; b=hcyPHQ0bIInmL9bOKBFye2MB4HFTqOv9jS3RUXsj0GWdo+OKm4BZZ37Tet1SvZx1vijhvvAg5ljNaSy8chGhusGixaDWhkDx3edcp+hVHGnpRAyGYtt/py+hkPu2Ifv0j0r55W3z8G/iTjfHmO9As8LfmyZLukqB4j8PPVERUA0= 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+102643+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819863886217.41937221373723; Thu, 6 Apr 2023 15:24:23 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id nlSlYY1788612x7aWxdtyx8b; Thu, 06 Apr 2023 15:24:23 -0700 X-Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.171755.1680819862784556678 for ; Thu, 06 Apr 2023 15:24:22 -0700 X-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 1F61C5C01D1; Thu, 6 Apr 2023 18:24:22 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 06 Apr 2023 18:24:22 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:24:18 -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 13/18] CryptoPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:14 -0600 Message-Id: <20230406222319.2281263-14-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: UZZuQUq63AJP6LJDWIiKIiclx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819863; bh=i5dBXvvfoHzC1TKoDy5FDONIXbdBgEw2iMLlzlGNrXo=; h=Cc:Date:From:Reply-To:Subject:To; b=fO7Tapl2A/+4wO17bYVjI+wJtQW0qJxXTwrjWZeQT4acDlQzI/t9xYyM1KJcSKWHSCr UUYAoNN4mIzRqebR+M02Lyvdkam+4lkF419CrxWz9bLqolU/M/mzr/up8RFgwJEQQK2pT i9rEWqIVHrzebLUvuNqZL4IC2jULCjjYPQY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819865783100007 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 CryptoPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- CryptoPkg/Library/TlsLib/TlsConfig.c | 8 ++++---- CryptoPkg/Library/TlsLib/TlsProcess.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CryptoPkg/Library/TlsLib/TlsConfig.c b/CryptoPkg/Library/TlsLi= b/TlsConfig.c index 60559de4a7f3..fdda73690ae5 100644 --- a/CryptoPkg/Library/TlsLib/TlsConfig.c +++ b/CryptoPkg/Library/TlsLib/TlsConfig.c @@ -331,7 +331,7 @@ TlsSetCipherList ( DEBUG_VERBOSE, "%a:%a: skipping CipherId=3D0x%04x\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, CipherId[Index] )); // @@ -380,7 +380,7 @@ TlsSetCipherList ( DEBUG_ERROR, "%a:%a: no CipherId could be mapped\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); Status =3D EFI_UNSUPPORTED; goto FreeMappedCipher; @@ -441,7 +441,7 @@ TlsSetCipherList ( DEBUG_VERBOSE, "%a:%a: CipherString=3D{\n", gEfiCallerBaseName, - __FUNCTION__ + __func__ )); for (CipherStringPosition =3D CipherString; CipherStringPosition < CipherString + FullLength; @@ -610,7 +610,7 @@ TlsSetVerifyHost ( "%a:%a: parsed \"%a\" as an IPv%c address " "literal\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, HostName, (UINTN)((BinaryAddressSize =3D=3D NS_IN6ADDRSZ) ? '6' : '4') )); diff --git a/CryptoPkg/Library/TlsLib/TlsProcess.c b/CryptoPkg/Library/TlsL= ib/TlsProcess.c index a803d86c4f4e..db296053fd2c 100644 --- a/CryptoPkg/Library/TlsLib/TlsProcess.c +++ b/CryptoPkg/Library/TlsLib/TlsProcess.c @@ -127,7 +127,7 @@ TlsDoHandshake ( DEBUG (( DEBUG_ERROR, "%a SSL_HANDSHAKE_ERROR State=3D0x%x SSL_ERROR_%a\n", - __FUNCTION__, + __func__, SSL_get_state (TlsConn->Ssl), Ret =3D=3D SSL_ERROR_SSL ? "SSL" : Ret =3D=3D SSL_ERROR_SYSCALL ? = "SYSCALL" : "ZERO_RETURN" )); @@ -141,7 +141,7 @@ TlsDoHandshake ( DEBUG (( DEBUG_ERROR, "%a ERROR 0x%x=3DL%x:F%x:R%x\n", - __FUNCTION__, + __func__, ErrorCode, ERR_GET_LIB (ErrorCode), ERR_GET_FUNC (ErrorCode), --=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 (#102643): https://edk2.groups.io/g/devel/message/102643 Mute This Topic: https://groups.io/mt/98115251/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- From nobody Wed May 15 21:28:33 2024 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+102644+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+102644+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819867; cv=none; d=zohomail.com; s=zohoarc; b=dlYz6bpj6ggfGVtV215IfQwWKGcMb7bHWzav/v0kTQqmKVa9wPgveRVusLbLiP5ssiyB0cK4ypuqD8ncrXO+2zmM41y41dfRyOV4CCTn+gSFdYGA4d0+ADbejshzPjV9fLUe6GHRom/z69IXrBuoMrTZL7B6wXNG7OIkLVTHwa4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819867; 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=GwIlMlMhHwU7I0moR68G7efotI2UtBaS9nYV/a0bVU0=; b=UwI+EUEup74Zjy6YqC9UycATsCZ/x+UgOVpeoLwt/6xvNImedE5Frp9VhQhmoViarn9yW1uiPOUrHx6cvp/H1fpHlL7BUkC/tml+/fKl7NJNWp2Gjbb6qbU51/w76FamnpXGxM+f1sjaUyUNzG3TfDEp2kCU5HFBmaqhRF1w5Ew= 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+102644+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819867188984.9217024940757; Thu, 6 Apr 2023 15:24:27 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id J44gYY1788612xHfGif2i5m4; Thu, 06 Apr 2023 15:24:26 -0700 X-Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.171756.1680819866163298743 for ; Thu, 06 Apr 2023 15:24:26 -0700 X-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 7DDFA5C01DF; Thu, 6 Apr 2023 18:24:25 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 06 Apr 2023 18:24:25 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:24:22 -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 14/18] NetworkPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:15 -0600 Message-Id: <20230406222319.2281263-15-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: CeLXr3JNHNz8tm6Wic9hEVjdx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819866; bh=qoeYS6r9tjm+DUMKJwK5zGmhbDWl+BCGMfI1MPRheTQ=; h=Cc:Date:From:Reply-To:Subject:To; b=JN3eeiGMczF5m0QSuk25lRHWmtD/t2aKGsISAYyaAQk0QV4sxQgRg5DglyzYoyTeM9H 2Sm3pvV4FzjPcRvhilHn+9FHze4u5Qz6XxIJaJUMIBlQjJ3DHPnk7IZgseJ6uwVmf9Fni 5bqLxZkcSORPmqvbb3guY6B8CYq4GDfEOjI= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819867803100011 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 NetworkPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel --- NetworkPkg/HttpDxe/HttpsSupport.c | 16 ++++++++-------- NetworkPkg/IScsiDxe/IScsiMisc.c | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/NetworkPkg/HttpDxe/HttpsSupport.c b/NetworkPkg/HttpDxe/HttpsSu= pport.c index ad611e7c3836..7330be42c006 100644 --- a/NetworkPkg/HttpDxe/HttpsSupport.c +++ b/NetworkPkg/HttpDxe/HttpsSupport.c @@ -436,7 +436,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: truncated EFI_SIGNATURE_LIST header\n", - __FUNCTION__ + __func__ )); goto FreeCACert; } @@ -447,7 +447,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: SignatureListSize too small for EFI_SIGNATURE_LIST\n", - __FUNCTION__ + __func__ )); goto FreeCACert; } @@ -456,7 +456,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: truncated EFI_SIGNATURE_LIST body\n", - __FUNCTION__ + __func__ )); goto FreeCACert; } @@ -465,7 +465,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: only X509 certificates are supported\n", - __FUNCTION__ + __func__ )); Status =3D EFI_UNSUPPORTED; goto FreeCACert; @@ -475,7 +475,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: SignatureHeaderSize must be 0 for X509\n", - __FUNCTION__ + __func__ )); goto FreeCACert; } @@ -484,7 +484,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: SignatureSize too small for EFI_SIGNATURE_DATA\n", - __FUNCTION__ + __func__ )); goto FreeCACert; } @@ -495,7 +495,7 @@ TlsConfigCertificate ( DEBUG (( DEBUG_ERROR, "%a: EFI_SIGNATURE_DATA array not a multiple of SignatureSize\n", - __FUNCTION__ + __func__ )); goto FreeCACert; } @@ -505,7 +505,7 @@ TlsConfigCertificate ( } =20 if (CertCount =3D=3D 0) { - DEBUG ((DEBUG_ERROR, "%a: no X509 certificates provided\n", __FUNCTION= __)); + DEBUG ((DEBUG_ERROR, "%a: no X509 certificates provided\n", __func__)); goto FreeCACert; } =20 diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMis= c.c index b3ea90158f51..78dc5c73d35a 100644 --- a/NetworkPkg/IScsiDxe/IScsiMisc.c +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c @@ -875,7 +875,7 @@ IScsiCreateAttempts ( DEBUG_ERROR, "%a: Failed to set 'InitialAttemptOrder' with Guid (%g): " "%r\n", - __FUNCTION__, + __func__, &gIScsiConfigGuid, Status )); @@ -926,7 +926,7 @@ IScsiCreateAttempts ( DEBUG_ERROR, "%a: Failed to set variable (mPrivate->PortString) with Guid (%g):= " "%r\n", - __FUNCTION__, + __func__, &gEfiIScsiInitiatorNameProtocolGuid, Status )); --=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 (#102644): https://edk2.groups.io/g/devel/message/102644 Mute This Topic: https://groups.io/mt/98115252/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- From nobody Wed May 15 21:28:33 2024 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+102645+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+102645+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819870; cv=none; d=zohomail.com; s=zohoarc; b=F4ljx1eUNpYRp66zrj32Gs/gAjhlVrq58o5ms64KqwaBYW5Re8+qZVaSfp8YNadg9g9moYvfzMcqyMRTtvyT6XBNf85UHa2gWMdhtEiNsOmBdyGpvrrzDwISa9FvcEd/yI7+2Qc4BHLff4cEugJx6Gnd7XOjqUzjfmTSaNZpuGA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819870; 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=2db7VhyM6k31hduWcQgzMiDxmsx/5IriUIVS3/jkcug=; b=jBmETKIHrAMrBiwNvzI81D01lMRQbSthjYm9bXWnpLTr/E07N9nW4zD7Jm3pIGhSo3O1gPiEqTVzGZ5J4Hz1KXWMyntrCcmHxJv703fpQpEucXcq80pMWCWUv0c6I9CXdpASLHg4zAY2FjZLnTHo8YPNCUXsuMPaGSiRUFhiPs0= 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+102645+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819870603440.8447434319406; Thu, 6 Apr 2023 15:24:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id inM4YY1788612xlGYAPciBxY; Thu, 06 Apr 2023 15:24:30 -0700 X-Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.171757.1680819869645128276 for ; Thu, 06 Apr 2023 15:24:29 -0700 X-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id EF2F45C0107; Thu, 6 Apr 2023 18:24:28 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 06 Apr 2023 18:24:28 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgepfeenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:24:25 -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 15/18] SourceLevelDebugPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:16 -0600 Message-Id: <20230406222319.2281263-16-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: OwgAzHnR8hy6XKJyhUvWHeDbx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819870; bh=psgPFLi9wvL/dnu0v7IQTMoNia3waRcnqEV6rPCp6IA=; h=Cc:Date:From:Reply-To:Subject:To; b=EqnRcYcZwgFw0V4X5W4c64aNO2vdR041kcwgwCD6BUJIzTBHpOzYm4PVEppUdI3Prdn X7Vv/5i78J9JEMrbbDjz3Y8mI7b6KjjkZLkORkFENQ2HLOzDrJo92XuRcyMrXhRRH58En Ezl2W874E7lTGCvWqEVDKaeKhVvQuepCy+Y= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819871333100001 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 SourceLevelDebugPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel Reviewed-by: Ray Ni --- SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLi= bUsb3Dxe.c | 4 ++-- SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLi= bUsb3Pei.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom= municationLibUsb3Dxe.c b/SourceLevelDebugPkg/Library/DebugCommunicationLibU= sb3/DebugCommunicationLibUsb3Dxe.c index 4490526273c9..d37fb991f1f2 100644 --- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Dxe.c +++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Dxe.c @@ -186,7 +186,7 @@ Usb3DxeSmmReadyToLockNotify ( { USB3_DEBUG_PORT_HANDLE *Instance; =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 Instance =3D GetUsb3DebugPortInstance (); ASSERT (Instance !=3D NULL); @@ -290,7 +290,7 @@ Usb3PciIoNotify ( // // Found the PciIo for USB3 debug port. // - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); if (Usb3GetIoMmu () !=3D NULL) { Instance =3D GetUsb3DebugPortInstance (); ASSERT (Instance !=3D NULL); diff --git a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom= municationLibUsb3Pei.c b/SourceLevelDebugPkg/Library/DebugCommunicationLibU= sb3/DebugCommunicationLibUsb3Pei.c index 15842a317ef0..aa04442918d2 100644 --- a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Pei.c +++ b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicat= ionLibUsb3Pei.c @@ -35,7 +35,7 @@ Usb3IoMmuPpiNotify ( { USB3_DEBUG_PORT_HANDLE *Instance; =20 - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a()\n", __func__)); =20 Instance =3D GetUsb3DebugPortInstance (); ASSERT (Instance !=3D NULL); --=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 (#102645): https://edk2.groups.io/g/devel/message/102645 Mute This Topic: https://groups.io/mt/98115253/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- From nobody Wed May 15 21:28:33 2024 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+102646+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+102646+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819874; cv=none; d=zohomail.com; s=zohoarc; b=li/8KyvLul++jd0p01KW2TwJ0eocthCTtIRRXaIR6X7DIyabCUGLTDYKWxtS8TaZ7i99kxVoidsXmNYJ37zcN9nFiZgc5y1WKwUpnD6TuBPVbVUQpz3i05fkdVq2pFuBRsaYSWdeNcXE89oEKI2onO2UrrP8SF+y5jEU5vRG/DA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819874; 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=HPHCNFDRIT8FoLrGa3frZvF772Pj9Y2qxczAXiILC9w=; b=fBKFRJs79TNV+01TwbJcukz7oE+X65IOVaB7asZl9lBdORgfI4puJcNV2i7wX7dStAEIm2RFuXlo+lYtXC5ZfpPPE+gvC1YxS4JG2SFwMaurxteP34GNjWKEeMpOhx5IxLBphjvvScq76wRUgMMh4onoErxLgkIg7n7NgEc+6cY= 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+102646+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819874148263.485386457966; Thu, 6 Apr 2023 15:24:34 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ltEoYY1788612xALfurtXLr2; Thu, 06 Apr 2023 15:24:33 -0700 X-Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.171761.1680819873071261005 for ; Thu, 06 Apr 2023 15:24:33 -0700 X-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 69D625C01D7; Thu, 6 Apr 2023 18:24:32 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 06 Apr 2023 18:24:32 -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:29 -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 16/18] EmulatorPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:17 -0600 Message-Id: <20230406222319.2281263-17-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: SnWAxIls3NenAsduzZGPc4pHx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819873; bh=hT7x17PInzM4QT7KmzbBi4nMzoyF6UNEJ5xXq0U2ayI=; h=Cc:Date:From:Reply-To:Subject:To; b=YSeT0q4K6NAQ4/Ho1dIT0JULym1BnvbrnoCFrXfMHjftY6S0kz1RQQuc5yJFoirNxyI v4lxrXb73InEqJPgtE8D0uFOu8JdKETCAK3cdLZvSxCxPUKr/nkcSmDsHIpUPSk4Q5ewY g0gAdtFL9DNW86ue6N/DRY4jFquTwwnt8JQ= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819874509100001 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 EmulatorPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Abner Chang Reviewed-by: Ard Biesheuvel Reviewed-by: Ray Ni --- EmulatorPkg/Library/RedfishPlatformHostInterfaceLib/RedfishPlatformHostInt= erfaceLib.c | 2 +- EmulatorPkg/Win/Host/WinPacketFilter.c = | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/EmulatorPkg/Library/RedfishPlatformHostInterfaceLib/RedfishPla= tformHostInterfaceLib.c b/EmulatorPkg/Library/RedfishPlatformHostInterfaceL= ib/RedfishPlatformHostInterfaceLib.c index 4361bd4170e3..4332caa71016 100644 --- a/EmulatorPkg/Library/RedfishPlatformHostInterfaceLib/RedfishPlatformHo= stInterfaceLib.c +++ b/EmulatorPkg/Library/RedfishPlatformHostInterfaceLib/RedfishPlatformHo= stInterfaceLib.c @@ -538,7 +538,7 @@ RedfishPlatformHostInterfaceConstructor ( EFI_STATUS Status; =20 Status =3D GetRedfishRecordFromVariable (&mRedfishOverIpProtocolData, &m= RedfishProtocolDataSize); - DEBUG ((DEBUG_INFO, "%a: GetRedfishRecordFromVariable() - %r\n", __FUNCT= ION__, Status)); + DEBUG ((DEBUG_INFO, "%a: GetRedfishRecordFromVariable() - %r\n", __func_= _, Status)); if (!EFI_ERROR (Status)) { DumpRedfishIpProtocolData (mRedfishOverIpProtocolData, mRedfishProtoco= lDataSize); } diff --git a/EmulatorPkg/Win/Host/WinPacketFilter.c b/EmulatorPkg/Win/Host/= WinPacketFilter.c index 21859897c85f..a71c7e8c131b 100644 --- a/EmulatorPkg/Win/Host/WinPacketFilter.c +++ b/EmulatorPkg/Win/Host/WinPacketFilter.c @@ -966,7 +966,7 @@ WintNtInitializeNetUtilityData ( goto ErrorReturn; } =20 - DEBUG ((DEBUG_INFO, "%a, total %d interface(s) found\n", __FUNCTION__, I= nterfaceCount)); + DEBUG ((DEBUG_INFO, "%a, total %d interface(s) found\n", __func__, Inter= faceCount)); // // Active interface index is set to first interface if given instance do= es // not exist. --=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 (#102646): https://edk2.groups.io/g/devel/message/102646 Mute This Topic: https://groups.io/mt/98115254/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- From nobody Wed May 15 21:28:33 2024 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+102647+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+102647+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819877; cv=none; d=zohomail.com; s=zohoarc; b=FJJiAO0ROx2W9Ki5CprP1ZTIfQf0hjsaThCYlcLdArQwhGI6/ic5MfiaUKj8ZBAmOnmKAMhmi+I88D1zCDkLn6s7JYP59u1SqitBPVJUzkwislrRh8RWRUp9xOcoKOCOeiFYLk9l6tn8kfsJMI8giZgSXGm4puqUCd3JhamIU8c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819877; 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=Sef9BJBFOccsHZoIz9oaA4ihuJBbDxvwp2QLiqNve5o=; b=fgkuER/aHRzzHtRUo3rsklWFs5Rj9uz5CmVWvCVM3S2zmz2UdBJzx3faIg5fFjAQLto602xr1KaK5gNRztFbi9tYOvwwELHVtSzZf+YQ37otcWbwxOfhjdsTI5OXuqO9CxsuTut8URWu1PytIECQEF4NaABurVekFikxeIvXPQI= 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+102647+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819877625564.9980009360061; Thu, 6 Apr 2023 15:24:37 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id yJxdYY1788612xA6rcqVOfjX; Thu, 06 Apr 2023 15:24:37 -0700 X-Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.171762.1680819876535274161 for ; Thu, 06 Apr 2023 15:24:36 -0700 X-Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id D53B55C01BF; Thu, 6 Apr 2023 18:24:35 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 06 Apr 2023 18:24:35 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:24:32 -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 17/18] UefiPayloadPkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:18 -0600 Message-Id: <20230406222319.2281263-18-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: MmQiuipKR9GyALfdUKZMW5Cmx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819877; bh=j/E3QFUoaXkY2O+ySQZtOknXBh1fE7Zut7ojV5RY6Dc=; h=Cc:Date:From:Reply-To:Subject:To; b=lBTM+HH9kRBAPmYtSkdAmd5fYt0FJZrybSgq+NE5WXEa2Q/H81ta67K/V+5EuHJBrw4 NO6dRp1dEbBF/Dol3DoUuKohdX+KcsrCzsQKHlMNArqubyk2QaY7+mskYmlSOD31G7/3P 8Zxmfz5xtC8ntZlfCoFFYioQD8KFk7QtpSM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819878545100001 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 UefiPayloadPkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel Reviewed-by: Gua Guo Reviewed-by: James Lu --- UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c | 4 ++-- UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c b/U= efiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c index 790e6109c03e..57274754141d 100644 --- a/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c +++ b/UefiPayloadPkg/Library/PciHostBridgeLib/PciHostBridgeLib.c @@ -135,7 +135,7 @@ InitRootBridge ( &mRootBridgeDevicePathTemplate ); if (DevicePath =3D=3D NULL) { - DEBUG ((DEBUG_ERROR, "%a: %r\n", __FUNCTION__, EFI_OUT_OF_RESOURCES)); + DEBUG ((DEBUG_ERROR, "%a: %r\n", __func__, EFI_OUT_OF_RESOURCES)); return EFI_OUT_OF_RESOURCES; } =20 @@ -145,7 +145,7 @@ InitRootBridge ( DEBUG (( DEBUG_INFO, "%a: populated root bus %d, with room for %d subordinate bus(es)\n", - __FUNCTION__, + __func__, RootBusNumber, MaxSubBusNumber - RootBusNumber )); diff --git a/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c b/UefiPaylo= adPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c index c66e56aee15a..61a9f01ec9e7 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c +++ b/UefiPayloadPkg/UefiPayloadEntry/Ia32/DxeLoadFunc.c @@ -355,7 +355,7 @@ HandOffToDxeCore ( DEBUG (( DEBUG_INFO, "%a() Stack Base: 0x%lx, Stack Size: 0x%x\n", - __FUNCTION__, + __func__, BaseOfStack, STACK_SIZE )); --=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 (#102647): https://edk2.groups.io/g/devel/message/102647 Mute This Topic: https://groups.io/mt/98115256/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- From nobody Wed May 15 21:28:33 2024 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+102648+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+102648+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1680819880; cv=none; d=zohomail.com; s=zohoarc; b=cWfmd04Cy0lmZ2p+s3KCkRiNJI61NdsxU+ecv2Z8In6P4jWcKJJMCKM/QxtSu+umEbx0Fjz5q1vp25hajrIKkOq86aHdDZlJ5sOKECefiHD9QuSrA8h6/ryyDmgOLxsk9QaQUu8hioW1kxxBV4+0lLu9YO9NVRtcfsXF+sq1qAA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680819880; 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=BCBYVlctyrQcrrF7te6l3lec9QWJ3becyNt/swn35Ck=; b=D/sTCQNIRGQGo52r4A3Z+gConqQfZN9hrb2s98ZhLXC5pRhAkFFy8H5QUlXcebCC6ewmIuwOHpQevpQLqoo2qZ8jiQpAFYrJ4KiSHXu8uVz+XxlouPMTMcXlBBJoCTFdQhD1H9GebYC/SVNeQ6aGy0oKEaDS1SfSDAKMvGzDbK0= 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+102648+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1680819880904849.5412845560152; Thu, 6 Apr 2023 15:24:40 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id vOk3YY1788612xWc8W7BI6VA; Thu, 06 Apr 2023 15:24:40 -0700 X-Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mx.groups.io with SMTP id smtpd.web11.171764.1680819879979496777 for ; Thu, 06 Apr 2023 15:24:40 -0700 X-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 4DA7F5C01D2; Thu, 6 Apr 2023 18:24:39 -0400 (EDT) X-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 06 Apr 2023 18:24:39 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdejgedgtdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepgeffueeuledvgefgvddvgfetvdduhfefkedukeeikedtudekfeetteeifedv leefnecuvehluhhsthgvrhfuihiivgepgeenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail X-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 6 Apr 2023 18:24:35 -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 18/18] FmpDevicePkg: Update code to be more C11 compliant by using __func__ Date: Thu, 6 Apr 2023 16:23:19 -0600 Message-Id: <20230406222319.2281263-19-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: BHCqbDijeZk3DpbvqJvbREpIx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1680819880; bh=8MrQyyQPOSaMVD3so8GTZwtbazGvAvxmWu12Um3p2No=; h=Cc:Date:From:Reply-To:Subject:To; b=JisEJEoVqjB3Z/xO2AhewhKl+8QDGmstxQ0zEZ9JcNC+kbOrJqOSXE/ITU2OrOjoMOT ipIQbSluMozuyE1EQPDNANvTrKONmxO6fJhXU0GsNDwJMLpUrOyiA2wcr4msmV9puuhWY Wg+1D1MXXp4AWnH+upDNm0sKI1aSwHxc9RY= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1680819882564100007 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 FmpDevicePkg. 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 Acked-by: Gerd Hoffmann Reviewed-by: Ard Biesheuvel Reviewed-by: Wei6 Xu --- FmpDevicePkg/FmpDxe/VariableSupport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FmpDevicePkg/FmpDxe/VariableSupport.c b/FmpDevicePkg/FmpDxe/Va= riableSupport.c index 541e5e0f5fc7..5126c5e2d556 100644 --- a/FmpDevicePkg/FmpDxe/VariableSupport.c +++ b/FmpDevicePkg/FmpDxe/VariableSupport.c @@ -832,7 +832,7 @@ LockAllFmpVariables ( // Locate the VariablePolicy protocol. Status =3D gBS->LocateProtocol (&gEdkiiVariablePolicyProtocolGuid, NULL,= (VOID **)&VariablePolicy); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "FmpDxe %a - Could not locate VariablePolicy prot= ocol! %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "FmpDxe %a - Could not locate VariablePolicy prot= ocol! %r\n", __func__, Status)); return Status; } =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 (#102648): https://edk2.groups.io/g/devel/message/102648 Mute This Topic: https://groups.io/mt/98115258/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-