]> xenbits.xensource.com Git - ovmf.git/commitdiff
SourceLevelDebugPkg: Update code to be more C11 compliant by using __func__
authorRebecca Cran <rebecca@bsdio.com>
Thu, 6 Apr 2023 19:53:42 +0000 (13:53 -0600)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 10 Apr 2023 14:19:57 +0000 (14:19 +0000)
__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.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Ray Ni <ray.ni@intel.com>
SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Dxe.c
SourceLevelDebugPkg/Library/DebugCommunicationLibUsb3/DebugCommunicationLibUsb3Pei.c

index 4490526273c9b88acbabf931661de889d926b8ee..d37fb991f1f235fec1d3439171d8705c6830eda2 100644 (file)
@@ -186,7 +186,7 @@ Usb3DxeSmmReadyToLockNotify (
 {\r
   USB3_DEBUG_PORT_HANDLE  *Instance;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a()\n", __func__));\r
 \r
   Instance = GetUsb3DebugPortInstance ();\r
   ASSERT (Instance != NULL);\r
@@ -290,7 +290,7 @@ Usb3PciIoNotify (
         //\r
         // Found the PciIo for USB3 debug port.\r
         //\r
-        DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__));\r
+        DEBUG ((DEBUG_INFO, "%a()\n", __func__));\r
         if (Usb3GetIoMmu () != NULL) {\r
           Instance = GetUsb3DebugPortInstance ();\r
           ASSERT (Instance != NULL);\r
index 15842a317ef06272408a889b1a7df37f655d00be..aa04442918d28d772878876dda2bd1d3e145e9de 100644 (file)
@@ -35,7 +35,7 @@ Usb3IoMmuPpiNotify (
 {\r
   USB3_DEBUG_PORT_HANDLE  *Instance;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a()\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a()\n", __func__));\r
 \r
   Instance = GetUsb3DebugPortInstance ();\r
   ASSERT (Instance != NULL);\r