Reviewed-by: Ray Ni <ray.ni@intel.com>
> -----Original Message-----
> From: Rebecca Cran <rebecca@bsdio.com>
> Sent: Friday, April 7, 2023 6:23 AM
> To: devel@edk2.groups.io; Gao, Liming <gaoliming@byosoft.com.cn>;
> Kinney, Michael D <michael.d.kinney@intel.com>; Jiang, Guomin
> <guomin.jiang@intel.com>; Xu, Wei6 <wei6.xu@intel.com>; Dong, Guo
> <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Rhodes, Sean
> <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua
> <gua.guo@intel.com>; Andrew Fish <afish@apple.com>; Wu, Hao A
> <hao.a.wu@intel.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>;
> Siyuan Fu <siyuan.fu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>;
> Wang, Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>;
> Ard Biesheuvel <ardb+tianocore@kernel.org>; Sami Mujawar
> <sami.mujawar@arm.com>; Supreeth Venkatesh
> <supreeth.venkatesh@arm.com>; Michael Kubacki
> <mikuback@linux.microsoft.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Sean Brogan
> <sean.brogan@microsoft.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>; Leif Lindholm
> <quic_llindhol@quicinc.com>; Abner Chang <abner.chang@amd.com>;
> Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>;
> Daniel Schaefer <git@danielschaefer.me>; Xu, Min M
> <min.m.xu@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Gerd
> Hoffmann <kraxel@redhat.com>; Peter Grehan <grehan@freebsd.org>;
> Aktas, Erdem <erdemaktas@google.com>; James Bottomley
> <jejb@linux.ibm.com>; Tom Lendacky <thomas.lendacky@amd.com>;
> Michael Roth <michael.roth@amd.com>; Sunil V L
> <sunilvl@ventanamicro.com>; Warkentin, Andrei
> <andrei.warkentin@intel.com>
> Subject: [PATCH 15/18] SourceLevelDebugPkg: Update code to be more C11
> compliant by using __func__
>
> __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among
> others support, while __func__ was standardized in C99.
>
> Since it's more standard, replace __FUNCTION__ with __func__ throughout
> 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 <rebecca@bsdio.com>
> ---
>
> SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommu
> nicationLibUsb3Dxe.c | 4 ++--
>
> SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommu
> nicationLibUsb3Pei.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git
> a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom
> municationLibUsb3Dxe.c
> b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom
> municationLibUsb3Dxe.c
> index 4490526273c9..d37fb991f1f2 100644
> ---
> a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom
> municationLibUsb3Dxe.c
> +++
> b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom
> municationLibUsb3Dxe.c
> @@ -186,7 +186,7 @@ Usb3DxeSmmReadyToLockNotify (
> {
> USB3_DEBUG_PORT_HANDLE *Instance;
>
> - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__));
> + DEBUG ((DEBUG_INFO, "%a()\n", __func__));
>
> Instance = GetUsb3DebugPortInstance ();
> ASSERT (Instance != 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 () != NULL) {
> Instance = GetUsb3DebugPortInstance ();
> ASSERT (Instance != NULL);
> diff --git
> a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom
> municationLibUsb3Pei.c
> b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom
> municationLibUsb3Pei.c
> index 15842a317ef0..aa04442918d2 100644
> ---
> a/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom
> municationLibUsb3Pei.c
> +++
> b/SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCom
> municationLibUsb3Pei.c
> @@ -35,7 +35,7 @@ Usb3IoMmuPpiNotify (
> {
> USB3_DEBUG_PORT_HANDLE *Instance;
>
> - DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__));
> + DEBUG ((DEBUG_INFO, "%a()\n", __func__));
>
> Instance = GetUsb3DebugPortInstance ();
> ASSERT (Instance != NULL);
> --
> 2.34.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#102660): https://edk2.groups.io/g/devel/message/102660
Mute This Topic: https://groups.io/mt/98115253/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3901457/1787277/102458076/xyzzy [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-