From nobody Tue Feb 10 12:42:44 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+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 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-