]> xenbits.xensource.com Git - ovmf.git/commitdiff
MdeModulePkg: Update code to be more C11 compliant by using __func__
authorRebecca Cran <rebecca@bsdio.com>
Thu, 6 Apr 2023 19:50:06 +0000 (13:50 -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
MdeModulePkg.

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>
47 files changed:
MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c
MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c
MdeModulePkg/Bus/Ata/AhciPei/AhciPeiBlockIo.c
MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c
MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c
MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c
MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c
MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c
MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c
MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c
MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c
MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c
MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c
MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c
MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c
MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c
MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c
MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c
MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c
MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c
MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c
MdeModulePkg/Core/Pei/FwVol/FwVol.c
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c
MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c
MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c
MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c
MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c
MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c
MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c
MdeModulePkg/Universal/Disk/PartitionDxe/Udf.c
MdeModulePkg/Universal/Disk/UdfDxe/File.c
MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c
MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c
MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c
MdeModulePkg/Universal/PCD/Dxe/Service.c
MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c
MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c
MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c
MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c
MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c

index 0f0198d3085beb486142dba073a14425ffae619b..92fb30638ec97b20a31bfdb4272177dee70bd7ef 100644 (file)
@@ -759,7 +759,7 @@ AhciPioTransfer (
       DEBUG_ERROR,\r
       "%a: Driver only support a maximum of 0x%x PRDT entries, "\r
       "current number of data byte 0x%x is too large, maximum allowed is 0x%x.\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       AHCI_MAX_PRDT_NUMBER,\r
       DataCount,\r
       AHCI_MAX_PRDT_NUMBER * AHCI_MAX_DATA_PER_PRDT\r
@@ -778,7 +778,7 @@ AhciPioTransfer (
                 &MapData\r
                 );\r
   if (EFI_ERROR (Status) || (MapLength != DataCount)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __func__));\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
 \r
@@ -860,7 +860,7 @@ AhciPioTransfer (
       Offset         = FisBaseAddr + AHCI_PIO_FIS_OFFSET;\r
       Status         = AhciCheckMemSet (Offset, AHCI_FIS_TYPE_MASK, AHCI_FIS_PIO_SETUP);\r
       if (!EFI_ERROR (Status)) {\r
-        DEBUG ((DEBUG_INFO, "%a: PioFisReceived.\n", __FUNCTION__));\r
+        DEBUG ((DEBUG_INFO, "%a: PioFisReceived.\n", __func__));\r
         PioFisReceived = TRUE;\r
       }\r
 \r
@@ -874,7 +874,7 @@ AhciPioTransfer (
       Offset = FisBaseAddr + AHCI_D2H_FIS_OFFSET;\r
       Status = AhciCheckMemSet (Offset, AHCI_FIS_TYPE_MASK, AHCI_FIS_REGISTER_D2H);\r
       if (!EFI_ERROR (Status)) {\r
-        DEBUG ((DEBUG_INFO, "%a: D2hFisReceived.\n", __FUNCTION__));\r
+        DEBUG ((DEBUG_INFO, "%a: D2hFisReceived.\n", __func__));\r
         D2hFisReceived = TRUE;\r
       }\r
 \r
@@ -918,7 +918,7 @@ AhciPioTransfer (
                Timeout\r
                );\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_ERROR, "%a: AhciWaitMemSet (%r)\n", __FUNCTION__, Status));\r
+      DEBUG ((DEBUG_ERROR, "%a: AhciWaitMemSet (%r)\n", __func__, Status));\r
       goto Exit;\r
     }\r
 \r
@@ -1479,7 +1479,7 @@ IdentifyAtaDevice (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: Not a hard disk device on Port 0x%x PortMultiplierPort 0x%x\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       DeviceData->Port,\r
       DeviceData->PortMultiplier\r
       ));\r
@@ -1489,7 +1489,7 @@ IdentifyAtaDevice (
   DEBUG ((\r
     DEBUG_INFO,\r
     "%a: Identify Device: Port 0x%x PortMultiplierPort 0x%x\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     DeviceData->Port,\r
     DeviceData->PortMultiplier\r
     ));\r
@@ -1518,7 +1518,7 @@ IdentifyAtaDevice (
   }\r
 \r
   if (Capacity == 0) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Invalid Capacity (0) for ATA device.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Invalid Capacity (0) for ATA device.\n", __func__));\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
@@ -1532,7 +1532,7 @@ IdentifyAtaDevice (
   DEBUG ((\r
     DEBUG_INFO,\r
     "%a: PhyLogicSectorSupport = 0x%x\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     PhyLogicSectorSupport\r
     ));\r
   if ((PhyLogicSectorSupport & (BIT14 | BIT15)) == BIT14) {\r
@@ -1550,20 +1550,20 @@ IdentifyAtaDevice (
   //\r
   MaxSectorCount = mMaxTransferBlockNumber[DeviceData->Lba48Bit];\r
   if ((Media->BlockSize == 0) || (Media->BlockSize > MAX_UINT32 / MaxSectorCount)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Invalid BlockSize (0x%x).\n", __FUNCTION__, Media->BlockSize));\r
+    DEBUG ((DEBUG_ERROR, "%a: Invalid BlockSize (0x%x).\n", __func__, Media->BlockSize));\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
   DEBUG ((\r
     DEBUG_INFO,\r
     "%a: BlockSize = 0x%x, LastBlock = 0x%lx\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     Media->BlockSize,\r
     Media->LastBlock\r
     ));\r
 \r
   if ((IdentifyData->trusted_computing_support & BIT0) != 0) {\r
-    DEBUG ((DEBUG_INFO, "%a: Found Trust Computing feature support.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_INFO, "%a: Found Trust Computing feature support.\n", __func__));\r
     DeviceData->TrustComputing = TRUE;\r
   }\r
 \r
@@ -1686,7 +1686,7 @@ AhciModeInitialization (
 \r
   Status = AhciReset (AhciBar, AHCI_PEI_RESET_TIMEOUT);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: AHCI HBA reset failed with %r.\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: AHCI HBA reset failed with %r.\n", __func__, Status));\r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
@@ -1708,7 +1708,7 @@ AhciModeInitialization (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: Transfer-related data allocation failed with %r.\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       Status\r
       ));\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -1814,7 +1814,7 @@ AhciModeInitialization (
         //\r
         Offset = AHCI_PORT_START + Port * AHCI_PORT_REG_WIDTH + AHCI_PORT_CMD;\r
         AhciAndReg (AhciBar, Offset, (UINT32) ~(AHCI_PORT_CMD_SUD));\r
-        DEBUG ((DEBUG_ERROR, "%a: No device detected at Port %d.\n", __FUNCTION__, Port));\r
+        DEBUG ((DEBUG_ERROR, "%a: No device detected at Port %d.\n", __func__, Port));\r
         continue;\r
       }\r
 \r
@@ -1844,7 +1844,7 @@ AhciModeInitialization (
         DEBUG ((\r
           DEBUG_ERROR,\r
           "%a: Port %d device presence detected but phy not ready (TFD=0x%x).\n",\r
-          __FUNCTION__,\r
+          __func__,\r
           Port,\r
           Data\r
           ));\r
@@ -1866,7 +1866,7 @@ AhciModeInitialization (
         DEBUG ((\r
           DEBUG_ERROR,\r
           "%a: Error occurred when waiting for the first D2H register FIS - %r\n",\r
-          __FUNCTION__,\r
+          __func__,\r
           Status\r
           ));\r
         continue;\r
@@ -1876,11 +1876,11 @@ AhciModeInitialization (
       if ((Data & AHCI_ATAPI_SIG_MASK) == AHCI_ATA_DEVICE_SIG) {\r
         Status = AhciIdentify (Private, Port, 0, PortIndex - 1, &IdentifyData);\r
         if (EFI_ERROR (Status)) {\r
-          DEBUG ((DEBUG_ERROR, "%a: AhciIdentify() failed with %r\n", __FUNCTION__, Status));\r
+          DEBUG ((DEBUG_ERROR, "%a: AhciIdentify() failed with %r\n", __func__, Status));\r
           continue;\r
         }\r
 \r
-        DEBUG ((DEBUG_INFO, "%a: ATA hard disk found on Port %d.\n", __FUNCTION__, Port));\r
+        DEBUG ((DEBUG_INFO, "%a: ATA hard disk found on Port %d.\n", __func__, Port));\r
       } else {\r
         continue;\r
       }\r
index e33d863d2acffc41897bb0e5f25900b63769e91f..7ea36afa25405f06af804b5a0df154e8ccd4aeb6 100644 (file)
@@ -156,7 +156,7 @@ AtaAhciInitPrivateData (
   //\r
   Status = PeiServicesGetBootMode (&BootMode);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __func__));\r
     return Status;\r
   }\r
 \r
@@ -168,7 +168,7 @@ AtaAhciInitPrivateData (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: The device path is invalid.\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
     return Status;\r
   }\r
@@ -196,7 +196,7 @@ AtaAhciInitPrivateData (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: Fail to allocate private data.\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
@@ -260,7 +260,7 @@ AtaAhciInitPrivateData (
     DEBUG ((\r
       DEBUG_INFO,\r
       "%a: Security Security Command PPI will be produced.\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
     Private->StorageSecurityPpi.Revision           = EDKII_STORAGE_SECURITY_PPI_REVISION;\r
     Private->StorageSecurityPpi.GetNumberofDevices = AhciStorageSecurityGetDeviceNo;\r
@@ -329,7 +329,7 @@ AtaAhciInitPrivateDataFromHostControllerPpi (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: Fail to allocate get the device path for Controller %d.\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Controller\r
         ));\r
       return Status;\r
@@ -340,7 +340,7 @@ AtaAhciInitPrivateDataFromHostControllerPpi (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: Controller initialization fail for Controller %d with Status - %r.\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Controller,\r
         Status\r
         ));\r
@@ -348,7 +348,7 @@ AtaAhciInitPrivateDataFromHostControllerPpi (
       DEBUG ((\r
         DEBUG_INFO,\r
         "%a: Controller %d has been successfully initialized.\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Controller\r
         ));\r
     }\r
@@ -471,7 +471,7 @@ AtaAhciInitPrivateDataFromPciDevice (
     DEBUG ((\r
       DEBUG_INFO,\r
       "%a: Failed to init controller, with Status - %r\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       Status\r
       ));\r
   }\r
@@ -522,7 +522,7 @@ AtaAhciPeimEntry (
   IN CONST EFI_PEI_SERVICES  **PeiServices\r
   )\r
 {\r
-  DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__));\r
 \r
   PeiServicesNotifyPpi (&mAtaAhciHostControllerNotify);\r
 \r
index c5d1f3fffb6d9d47cd91d8ba7ff3f2c874d5b808..5eb2a9ce82948326fe286d2f50bf46404bf9066e 100644 (file)
@@ -101,7 +101,7 @@ AccessAtaDevice (
     DEBUG ((\r
       DEBUG_BLKIO,\r
       "%a: Blocking AccessAtaDevice, TransferBlockNumber = %x; StartLba = %x\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       TransferBlockNumber,\r
       StartLba\r
       ));\r
index e903593b0198f5a48f9d78e62fc5bdcb1ff7ac66..b4f1a5079914bb2056484fe1dc58953f7a75203b 100644 (file)
@@ -1863,7 +1863,7 @@ EhcDriverBindingStart (
       DEBUG ((\r
         DEBUG_WARN,\r
         "%a: failed to enable 64-bit DMA on 64-bit capable controller @ %p (%r)\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Controller,\r
         Status\r
         ));\r
index 6967aabceb7877d8df8c692e009cd651bf1558ce..59bbe9fc2318430e3005eab52c6ad8be47460afc 100644 (file)
@@ -836,7 +836,7 @@ EhciInsertAsyncIntTransfer (
   Data = AllocatePool (DataLen);\r
 \r
   if (Data == NULL) {\r
-    DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __func__));\r
     return NULL;\r
   }\r
 \r
@@ -858,7 +858,7 @@ EhciInsertAsyncIntTransfer (
           );\r
 \r
   if (Urb == NULL) {\r
-    DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __func__));\r
     gBS->FreePool (Data);\r
     return NULL;\r
   }\r
index 2fb78d8f9687ab9856e572628732d7dabf0d3670..e31c38deed6c098a971e8cc9e56af6104578b993 100644 (file)
@@ -1843,7 +1843,7 @@ InitializePciIoProtocol (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: resource count exceeds number of emulated BARs\n",\r
-        __FUNCTION__\r
+        __func__\r
         ));\r
       ASSERT (FALSE);\r
       break;\r
index b33c9034125584600893f43029e2e63170f6e265..b6ed7f7031b377c809152e6d48330f82eed81b98 100644 (file)
@@ -216,7 +216,7 @@ NvmeRead (
     DEBUG_BLKIO,\r
     "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "\r
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     Lba,\r
     (UINT64)OrginalBlocks,\r
     (UINT64)Blocks,\r
@@ -302,7 +302,7 @@ NvmeWrite (
     DEBUG_BLKIO,\r
     "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "\r
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     Lba,\r
     (UINT64)OrginalBlocks,\r
     (UINT64)Blocks,\r
@@ -817,7 +817,7 @@ NvmeAsyncRead (
     DEBUG_BLKIO,\r
     "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "\r
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     Lba,\r
     (UINT64)OrginalBlocks,\r
     (UINT64)Blocks,\r
@@ -945,7 +945,7 @@ NvmeAsyncWrite (
     DEBUG_BLKIO,\r
     "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "\r
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     Lba,\r
     (UINT64)OrginalBlocks,\r
     (UINT64)Blocks,\r
index 3e6f75345d98b244816483143be208f3166435f2..38f86487e25af9734a27d8be5b4bec0e5a01f088 100644 (file)
@@ -91,7 +91,7 @@ EnumerateNvmeDevNamespace (
              NamespaceData\r
              );\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyNamespace fail, Status - %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyNamespace fail, Status - %r\n", __func__, Status));\r
     goto Exit;\r
   }\r
 \r
@@ -99,7 +99,7 @@ EnumerateNvmeDevNamespace (
   // Validate Namespace\r
   //\r
   if (NamespaceData->Ncap == 0) {\r
-    DEBUG ((DEBUG_INFO, "%a: Namespace ID %d is an inactive one.\n", __FUNCTION__, NamespaceId));\r
+    DEBUG ((DEBUG_INFO, "%a: Namespace ID %d is an inactive one.\n", __func__, NamespaceId));\r
     Status = EFI_DEVICE_ERROR;\r
     goto Exit;\r
   }\r
@@ -142,7 +142,7 @@ EnumerateNvmeDevNamespace (
   DEBUG ((\r
     DEBUG_INFO,\r
     "%a: Namespace ID %d - BlockSize = 0x%x, LastBlock = 0x%lx\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     NamespaceId,\r
     NamespaceInfo->Media.BlockSize,\r
     NamespaceInfo->Media.LastBlock\r
@@ -246,14 +246,14 @@ NvmeInitPrivateData (
   PEI_NVME_CONTROLLER_PRIVATE_DATA  *Private;\r
   EFI_PHYSICAL_ADDRESS              DeviceAddress;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__));\r
 \r
   //\r
   // Get the current boot mode.\r
   //\r
   Status = PeiServicesGetBootMode (&BootMode);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __func__));\r
     return Status;\r
   }\r
 \r
@@ -265,7 +265,7 @@ NvmeInitPrivateData (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: The device path is invalid.\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
     return Status;\r
   }\r
@@ -282,7 +282,7 @@ NvmeInitPrivateData (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: skipped during S3.\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
     return EFI_SUCCESS;\r
   }\r
@@ -295,7 +295,7 @@ NvmeInitPrivateData (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: Fail to allocate private data.\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
@@ -313,13 +313,13 @@ NvmeInitPrivateData (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: Fail to allocate DMA buffers.\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
     return Status;\r
   }\r
 \r
   ASSERT (DeviceAddress == ((EFI_PHYSICAL_ADDRESS)(UINTN)Private->Buffer));\r
-  DEBUG ((DEBUG_INFO, "%a: DMA buffer base at 0x%x\n", __FUNCTION__, Private->Buffer));\r
+  DEBUG ((DEBUG_INFO, "%a: DMA buffer base at 0x%x\n", __func__, Private->Buffer));\r
 \r
   //\r
   // Initialize controller private data\r
@@ -337,7 +337,7 @@ NvmeInitPrivateData (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: Controller initialization fail with Status - %r.\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       Status\r
       ));\r
     NvmeFreeDmaResource (Private);\r
@@ -355,7 +355,7 @@ NvmeInitPrivateData (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: Namespaces discovery fail with Status - %r.\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       Status\r
       ));\r
     NvmeFreeDmaResource (Private);\r
@@ -414,7 +414,7 @@ NvmeInitPrivateData (
     DEBUG ((\r
       DEBUG_INFO,\r
       "%a: Security Security Command PPI will be produced.\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
     Private->StorageSecurityPpi.Revision           = EDKII_STORAGE_SECURITY_PPI_REVISION;\r
     Private->StorageSecurityPpi.GetNumberofDevices = NvmeStorageSecurityGetDeviceNo;\r
@@ -557,7 +557,7 @@ NvmeInitControllerDataFromPciDevice (
     DEBUG ((\r
       DEBUG_INFO,\r
       "%a: Failed to init controller, with Status - %r\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       Status\r
       ));\r
   }\r
@@ -635,7 +635,7 @@ NvmeInitControllerFromHostControllerPpi (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: Fail to allocate get the device path for Controller %d.\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Controller\r
         ));\r
       return Status;\r
@@ -646,7 +646,7 @@ NvmeInitControllerFromHostControllerPpi (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: Controller initialization fail for Controller %d with Status - %r.\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Controller,\r
         Status\r
         ));\r
@@ -654,7 +654,7 @@ NvmeInitControllerFromHostControllerPpi (
       DEBUG ((\r
         DEBUG_INFO,\r
         "%a: Controller %d has been successfully initialized.\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Controller\r
         ));\r
     }\r
@@ -712,7 +712,7 @@ NvmExpressPeimEntry (
   IN CONST EFI_PEI_SERVICES  **PeiServices\r
   )\r
 {\r
-  DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__));\r
 \r
   PeiServicesNotifyPpi (&mNvmeHostControllerNotify);\r
 \r
index 576481dcee2aa0c4d815648f14b56be257539fc5..a61238086cdf3e2040e78b33d783d35732ecda6f 100644 (file)
@@ -125,14 +125,14 @@ NvmeRead (
       MaxTransferBlocks = MaxTransferBlocks >> 1;\r
 \r
       if ((Retries > NVME_READ_MAX_RETRY) || (MaxTransferBlocks < 1)) {\r
-        DEBUG ((DEBUG_ERROR, "%a: ReadSectors fail, Status - %r\n", __FUNCTION__, Status));\r
+        DEBUG ((DEBUG_ERROR, "%a: ReadSectors fail, Status - %r\n", __func__, Status));\r
         break;\r
       }\r
 \r
       DEBUG ((\r
         DEBUG_BLKIO,\r
         "%a: ReadSectors fail, retry with smaller transfer block number - 0x%x\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         MaxTransferBlocks\r
         ));\r
       continue;\r
@@ -151,7 +151,7 @@ NvmeRead (
     DEBUG_BLKIO,\r
     "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "\r
     "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     Lba,\r
     (UINT64)OrginalBlocks,\r
     (UINT64)Blocks,\r
index bff5cfd0d5fe6dac1c134ec18dfc58599510d30a..fc7b684940d9bd5c06e60d9740555843db4ab39a 100644 (file)
@@ -138,7 +138,7 @@ NvmeBaseMemPageOffset (
   PageSizeList[4] = NVME_PRP_SIZE; /* PRPs */\r
 \r
   if (BaseMemIndex > MAX_BASEMEM_COUNT) {\r
-    DEBUG ((DEBUG_ERROR, "%a: The input BaseMem index is invalid.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: The input BaseMem index is invalid.\n", __func__));\r
     ASSERT (FALSE);\r
     return 0;\r
   }\r
@@ -191,7 +191,7 @@ NvmeWaitController (
     //\r
     Status = NVME_GET_CSTS (Private, &Csts);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CSTS fail, Status - %r\n", __FUNCTION__, Status));\r
+      DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CSTS fail, Status - %r\n", __func__, Status));\r
       return Status;\r
     }\r
 \r
@@ -232,7 +232,7 @@ NvmeDisableController (
   //\r
   Status = NVME_GET_CC (Private, &Cc);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CC fail, Status - %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CC fail, Status - %r\n", __func__, Status));\r
     goto ErrorExit;\r
   }\r
 \r
@@ -243,21 +243,21 @@ NvmeDisableController (
     //\r
     Status = NVME_SET_CC (Private, &Cc);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __FUNCTION__, Status));\r
+      DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __func__, Status));\r
       goto ErrorExit;\r
     }\r
   }\r
 \r
   Status = NvmeWaitController (Private, FALSE);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __func__, Status));\r
     goto ErrorExit;\r
   }\r
 \r
   return EFI_SUCCESS;\r
 \r
 ErrorExit:\r
-  DEBUG ((DEBUG_ERROR, "%a fail, Status - %r\n", __FUNCTION__, Status));\r
+  DEBUG ((DEBUG_ERROR, "%a fail, Status - %r\n", __func__, Status));\r
   return Status;\r
 }\r
 \r
@@ -289,20 +289,20 @@ NvmeEnableController (
   Cc.Iocqes = 4;\r
   Status    = NVME_SET_CC (Private, &Cc);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: NVME_SET_CC fail, Status - %r\n", __func__, Status));\r
     goto ErrorExit;\r
   }\r
 \r
   Status = NvmeWaitController (Private, TRUE);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __func__, Status));\r
     goto ErrorExit;\r
   }\r
 \r
   return EFI_SUCCESS;\r
 \r
 ErrorExit:\r
-  DEBUG ((DEBUG_ERROR, "%a fail, Status: %r\n", __FUNCTION__, Status));\r
+  DEBUG ((DEBUG_ERROR, "%a fail, Status: %r\n", __func__, Status));\r
   return Status;\r
 }\r
 \r
@@ -572,7 +572,7 @@ NvmeControllerInit (
   //\r
   NVME_GET_CAP (Private, &Private->Cap);\r
   if ((Private->Cap.Css & BIT0) == 0) {\r
-    DEBUG ((DEBUG_ERROR, "%a: The NVME controller doesn't support NVMe command set.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: The NVME controller doesn't support NVMe command set.\n", __func__));\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
@@ -580,7 +580,7 @@ NvmeControllerInit (
   // Currently, the driver only supports 4k page size\r
   //\r
   if ((Private->Cap.Mpsmin + 12) > EFI_PAGE_SHIFT) {\r
-    DEBUG ((DEBUG_ERROR, "%a: The driver doesn't support page size other than 4K.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: The driver doesn't support page size other than 4K.\n", __func__));\r
     ASSERT (FALSE);\r
     return EFI_UNSUPPORTED;\r
   }\r
@@ -599,7 +599,7 @@ NvmeControllerInit (
   //\r
   Status = NvmeDisableController (Private);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: NvmeDisableController fail, Status - %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: NvmeDisableController fail, Status - %r\n", __func__, Status));\r
     return Status;\r
   }\r
 \r
@@ -647,7 +647,7 @@ NvmeControllerInit (
   //\r
   Status = NvmeEnableController (Private);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: NvmeEnableController fail, Status - %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: NvmeEnableController fail, Status - %r\n", __func__, Status));\r
     return Status;\r
   }\r
 \r
@@ -663,7 +663,7 @@ NvmeControllerInit (
 \r
   Status = NvmeIdentifyController (Private, Private->ControllerData);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyController fail, Status - %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: NvmeIdentifyController fail, Status - %r\n", __func__, Status));\r
     return Status;\r
   }\r
 \r
@@ -676,7 +676,7 @@ NvmeControllerInit (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: Number of Namespaces field in Identify Controller data not supported by the driver.\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
     return EFI_UNSUPPORTED;\r
   }\r
@@ -686,13 +686,13 @@ NvmeControllerInit (
   //\r
   Status = NvmeCreateIoCompletionQueue (Private);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Create IO completion queue fail, Status - %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: Create IO completion queue fail, Status - %r\n", __func__, Status));\r
     return Status;\r
   }\r
 \r
   Status = NvmeCreateIoSubmissionQueue (Private);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Create IO submission queue fail, Status - %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: Create IO submission queue fail, Status - %r\n", __func__, Status));\r
   }\r
 \r
   return Status;\r
index dc280ec4e35f8ce11d212fc8c3906788bd0365d5..5081b53cd5e84690917038f109f1392d7f456507 100644 (file)
@@ -57,7 +57,7 @@ NvmeCreatePrpList (
       DEBUG_ERROR,\r
       "%a: The implementation only supports PrpList number up to 4."\r
       " But %d are needed here.\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       PrpListNo\r
       ));\r
     return 0;\r
@@ -365,7 +365,7 @@ NvmePassThruExecute (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a, Invalid parameter: Packet(%lx)\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       (UINTN)Packet\r
       ));\r
     return EFI_INVALID_PARAMETER;\r
@@ -375,7 +375,7 @@ NvmePassThruExecute (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a, Invalid parameter: NvmeCmd (%lx)/NvmeCompletion(%lx)\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       (UINTN)Packet->NvmeCmd,\r
       (UINTN)Packet->NvmeCompletion\r
       ));\r
@@ -386,7 +386,7 @@ NvmePassThruExecute (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a, Invalid parameter: QueueId(%lx)\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       (UINTN)Packet->QueueType\r
       ));\r
     return EFI_INVALID_PARAMETER;\r
@@ -407,7 +407,7 @@ NvmePassThruExecute (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: Nsid mismatch (%x, %x)\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       Packet->NvmeCmd->Nsid,\r
       NamespaceId\r
       ));\r
@@ -425,7 +425,7 @@ NvmePassThruExecute (
   //\r
   ASSERT (Sq->Psdt == 0);\r
   if (Sq->Psdt != 0) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Does not support SGL mechanism.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Does not support SGL mechanism.\n", __func__));\r
     return EFI_UNSUPPORTED;\r
   }\r
 \r
@@ -458,7 +458,7 @@ NvmePassThruExecute (
         DEBUG ((\r
           DEBUG_ERROR,\r
           "%a: Does not support external IO queues creation request.\n",\r
-          __FUNCTION__\r
+          __func__\r
           ));\r
         return EFI_UNSUPPORTED;\r
       }\r
@@ -480,7 +480,7 @@ NvmePassThruExecute (
                       );\r
         if (EFI_ERROR (Status) || (MapLength != Packet->TransferLength)) {\r
           Status = EFI_OUT_OF_RESOURCES;\r
-          DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __FUNCTION__));\r
+          DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __func__));\r
           goto Exit;\r
         }\r
 \r
@@ -498,7 +498,7 @@ NvmePassThruExecute (
                       );\r
         if (EFI_ERROR (Status) || (MapLength != Packet->MetadataLength)) {\r
           Status = EFI_OUT_OF_RESOURCES;\r
-          DEBUG ((DEBUG_ERROR, "%a: Fail to map meta data buffer.\n", __FUNCTION__));\r
+          DEBUG ((DEBUG_ERROR, "%a: Fail to map meta data buffer.\n", __func__));\r
           goto Exit;\r
         }\r
 \r
@@ -526,7 +526,7 @@ NvmePassThruExecute (
                    );\r
     if (Sq->Prp[1] == 0) {\r
       Status = EFI_OUT_OF_RESOURCES;\r
-      DEBUG ((DEBUG_ERROR, "%a: Create PRP list fail, Status - %r\n", __FUNCTION__, Status));\r
+      DEBUG ((DEBUG_ERROR, "%a: Create PRP list fail, Status - %r\n", __func__, Status));\r
       goto Exit;\r
     }\r
   } else if ((Offset + Bytes) > EFI_PAGE_SIZE) {\r
@@ -568,7 +568,7 @@ NvmePassThruExecute (
   Data32 = ReadUnaligned32 ((UINT32 *)&Private->SqTdbl[QueueId]);\r
   Status = NVME_SET_SQTDBL (Private, QueueId, &Data32);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: NVME_SET_SQTDBL fail, Status - %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a: NVME_SET_SQTDBL fail, Status - %r\n", __func__, Status));\r
     goto Exit;\r
   }\r
 \r
@@ -591,7 +591,7 @@ NvmePassThruExecute (
     //\r
     // Timeout occurs for an NVMe command, reset the controller to abort the outstanding command\r
     //\r
-    DEBUG ((DEBUG_ERROR, "%a: Timeout occurs for the PassThru command.\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Timeout occurs for the PassThru command.\n", __func__));\r
     Status = NvmeControllerInit (Private);\r
     if (EFI_ERROR (Status)) {\r
       Status = EFI_DEVICE_ERROR;\r
index ba4b099bc5c1832ed5d9bfaa02cf4b6c7eb9819d..75c9b344eed2b014b7364811b4ba7b83b3b6ad7b 100644 (file)
@@ -237,7 +237,7 @@ LocatePciExpressCapabilityRegBlock (
       DEBUG ((\r
         DEBUG_WARN,\r
         "%a: [%02x|%02x|%02x] failed to access config space at offset 0x%x\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         PciIoDevice->BusNumber,\r
         PciIoDevice->DeviceNumber,\r
         PciIoDevice->FunctionNumber,\r
index b20bcd310ad5959eedac3fe745d25103bc5195f3..d573e532bac822984f151cc9a388cd56300b2560 100644 (file)
@@ -128,7 +128,7 @@ IntersectIoDescriptor (
       EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE,\r
       "%a: %a: add [%Lx, %Lx): %r\n",\r
       gEfiCallerBaseName,\r
-      __FUNCTION__,\r
+      __func__,\r
       IntersectionBase,\r
       IntersectionEnd,\r
       Status\r
@@ -141,7 +141,7 @@ IntersectIoDescriptor (
     "%a: %a: desc [%Lx, %Lx) type %u conflicts with "\r
     "aperture [%Lx, %Lx)\n",\r
     gEfiCallerBaseName,\r
-    __FUNCTION__,\r
+    __func__,\r
     Descriptor->BaseAddress,\r
     Descriptor->BaseAddress + Descriptor->Length,\r
     (UINT32)Descriptor->GcdIoType,\r
@@ -178,7 +178,7 @@ AddIoSpace (
       DEBUG_ERROR,\r
       "%a: %a: GetIoSpaceMap(): %r\n",\r
       gEfiCallerBaseName,\r
-      __FUNCTION__,\r
+      __func__,\r
       Status\r
       ));\r
     return Status;\r
@@ -299,7 +299,7 @@ IntersectMemoryDescriptor (
       EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE,\r
       "%a: %a: add [%Lx, %Lx): %r\n",\r
       gEfiCallerBaseName,\r
-      __FUNCTION__,\r
+      __func__,\r
       IntersectionBase,\r
       IntersectionEnd,\r
       Status\r
@@ -312,7 +312,7 @@ IntersectMemoryDescriptor (
     "%a: %a: desc [%Lx, %Lx) type %u cap %Lx conflicts "\r
     "with aperture [%Lx, %Lx) cap %Lx\n",\r
     gEfiCallerBaseName,\r
-    __FUNCTION__,\r
+    __func__,\r
     Descriptor->BaseAddress,\r
     Descriptor->BaseAddress + Descriptor->Length,\r
     (UINT32)Descriptor->GcdMemoryType,\r
@@ -353,7 +353,7 @@ AddMemoryMappedIoSpace (
       DEBUG_ERROR,\r
       "%a: %a: GetMemorySpaceMap(): %r\n",\r
       gEfiCallerBaseName,\r
-      __FUNCTION__,\r
+      __func__,\r
       Status\r
       ));\r
     return Status;\r
@@ -955,7 +955,7 @@ NotifyPhase (
               DEBUG ((\r
                 DEBUG_ERROR,\r
                 "[%a:%d] Translation %lx is not aligned to %lx!\n",\r
-                __FUNCTION__,\r
+                __func__,\r
                 DEBUG_LINE_NUMBER,\r
                 Translation,\r
                 Alignment\r
index ab2becdd19e78734738bda99cd11492cf3100ec8..8496ce4727688835e812849f13bd7cf4aea4bd01 100644 (file)
@@ -641,7 +641,7 @@ SdMmcPciHcDriverBindingStart (
       DEBUG ((\r
         DEBUG_INFO,\r
         "%a: found SD/MMC override protocol\n",\r
-        __FUNCTION__\r
+        __func__\r
         ));\r
     }\r
   }\r
@@ -676,7 +676,7 @@ SdMmcPciHcDriverBindingStart (
           DEBUG ((\r
             DEBUG_WARN,\r
             "%a: Failed to override capability - %r\n",\r
-            __FUNCTION__,\r
+            __func__,\r
             Status\r
             ));\r
           continue;\r
@@ -691,7 +691,7 @@ SdMmcPciHcDriverBindingStart (
                               (VOID *)&Private->Slot[Slot].OperatingParameters\r
                               );\r
         if (EFI_ERROR (Status)) {\r
-          DEBUG ((DEBUG_WARN, "%a: Failed to get operating parameters, using defaults\n", __FUNCTION__));\r
+          DEBUG ((DEBUG_WARN, "%a: Failed to get operating parameters, using defaults\n", __func__));\r
         }\r
       }\r
     }\r
index dd45167a009ee8d686aa03a3bdce6a2f02dcc0a0..aab68153283e307a890fc16e7deabd95a2549d4b 100644 (file)
@@ -498,7 +498,7 @@ SdMmcHcReset (
       DEBUG ((\r
         DEBUG_WARN,\r
         "%a: SD/MMC pre reset notifier callback failed - %r\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Status\r
         ));\r
       return Status;\r
@@ -556,7 +556,7 @@ SdMmcHcReset (
       DEBUG ((\r
         DEBUG_WARN,\r
         "%a: SD/MMC post reset notifier callback failed - %r\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Status\r
         ));\r
     }\r
@@ -942,7 +942,7 @@ SdMmcHcClockSupply (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: SD/MMC switch clock freq post notifier callback failed - %r\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Status\r
         ));\r
       return Status;\r
@@ -1234,7 +1234,7 @@ SdMmcHcInitHost (
       DEBUG ((\r
         DEBUG_WARN,\r
         "%a: SD/MMC pre init notifier callback failed - %r\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Status\r
         ));\r
       return Status;\r
@@ -1286,7 +1286,7 @@ SdMmcHcInitHost (
       DEBUG ((\r
         DEBUG_WARN,\r
         "%a: SD/MMC post init notifier callback failed - %r\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Status\r
         ));\r
     }\r
@@ -1375,7 +1375,7 @@ SdMmcHcUhsSignaling (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "%a: SD/MMC uhs signaling notifier callback failed - %r\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Status\r
         ));\r
       return Status;\r
index d8fa41f68f5577aa595bf9dd4c09d9ddc935ab73..62682dd27c476c381aa9f8d3746299cba9866a63 100644 (file)
@@ -2059,7 +2059,7 @@ XhcDriverBindingStart (
       DEBUG ((\r
         DEBUG_WARN,\r
         "%a: failed to enable 64-bit DMA on 64-bit capable controller @ %p (%r)\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Controller,\r
         Status\r
         ));\r
index 4b7462704a812ee2868123a8100ed63df7a64c22..298fb88b811e331eca16f356daee6f3e3a7ebe72 100644 (file)
@@ -1495,7 +1495,7 @@ XhciInsertAsyncIntTransfer (
 \r
   Data = AllocateZeroPool (DataLen);\r
   if (Data == NULL) {\r
-    DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __func__));\r
     return NULL;\r
   }\r
 \r
@@ -1513,7 +1513,7 @@ XhciInsertAsyncIntTransfer (
           Context\r
           );\r
   if (Urb == NULL) {\r
-    DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: failed to create URB\n", __func__));\r
     FreePool (Data);\r
     return NULL;\r
   }\r
index 873581d817ce1702794ee777e43bdd664bdd0b52..670f70caf41f02358581ea46cf7133d8b11f1b20 100644 (file)
@@ -2593,7 +2593,7 @@ ScsiDiskInquiryDevice (
           DEBUG ((\r
             DEBUG_WARN,\r
             "%a: invalid PageLength (%u) in Supported VPD Pages page\n",\r
-            __FUNCTION__,\r
+            __func__,\r
             (UINT32)PageLength\r
             ));\r
           PageLength = 0;\r
@@ -2606,7 +2606,7 @@ ScsiDiskInquiryDevice (
           DEBUG ((\r
             DEBUG_WARN,\r
             "%a: Supported VPD Pages page doesn't start with code 0x%02x\n",\r
-            __FUNCTION__,\r
+            __func__,\r
             EFI_SCSI_PAGE_CODE_SUPPORTED_VPD\r
             ));\r
           PageLength = 0;\r
@@ -2626,7 +2626,7 @@ ScsiDiskInquiryDevice (
             DEBUG ((\r
               DEBUG_WARN,\r
               "%a: non-ascending code in Supported VPD Pages page @ %u\n",\r
-              __FUNCTION__,\r
+              __func__,\r
               Index\r
               ));\r
             Index      = 0;\r
index fb9ae3ce78dacacead90ed30f2fcc3c527f26670..cf9d556877664790cf52fec487c4634406554ecb 100644 (file)
@@ -1095,7 +1095,7 @@ CoreProcessFvImageFile (
         DEBUG ((\r
           DEBUG_INFO,\r
           "%a() FV at 0x%x, FvAlignment required is 0x%x\n",\r
-          __FUNCTION__,\r
+          __func__,\r
           FvHeader,\r
           FvAlignment\r
           ));\r
index 4683016ed758494d66f887ac6d5f48479554b855..0e0f9769b99d4c6ce02c6f8ebbb66989ab86456a 100644 (file)
@@ -315,7 +315,7 @@ DxeMain (
   DEBUG ((\r
     DEBUG_INFO,\r
     "%a: MemoryBaseAddress=0x%Lx MemoryLength=0x%Lx\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     MemoryBaseAddress,\r
     MemoryLength\r
     ));\r
index b89ab046fa73458c2dd8526243e4a6bff6875a53..7cc829b17402c2bc377314949d8f6ab41f846b71 100644 (file)
@@ -838,7 +838,7 @@ InitializeDxeNxMemoryProtectionPolicy (
         DEBUG ((\r
           DEBUG_INFO,\r
           "%a: StackBase = 0x%016lx  StackSize = 0x%016lx\n",\r
-          __FUNCTION__,\r
+          __func__,\r
           MemoryHob->AllocDescriptor.MemoryBaseAddress,\r
           MemoryHob->AllocDescriptor.MemoryLength\r
           ));\r
@@ -864,7 +864,7 @@ InitializeDxeNxMemoryProtectionPolicy (
   DEBUG ((\r
     DEBUG_INFO,\r
     "%a: applying strict permissions to active memory regions\n",\r
-    __FUNCTION__\r
+    __func__\r
     ));\r
 \r
   MergeMemoryMapForProtectionPolicy (MemoryMap, &MemoryMapSize, DescriptorSize);\r
@@ -926,7 +926,7 @@ InitializeDxeNxMemoryProtectionPolicy (
     DEBUG ((\r
       DEBUG_INFO,\r
       "%a: applying strict permissions to inactive memory regions\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
 \r
     CoreAcquireGcdMemoryLock ();\r
index b8d4184b5064b0b54e7f283838a709da02e05013..2152833ff63928d44b68eb8e9b2984841779c648 100644 (file)
@@ -1304,7 +1304,7 @@ GetSection (
         DEBUG ((\r
           DEBUG_ERROR,\r
           "%a: recursion aborted due to nesting depth\n",\r
-          __FUNCTION__\r
+          __func__\r
           ));\r
         //\r
         // Map "aborted" to "not found".\r
index fdeaaa39d88e277388cd2e59a8c464a47987ddba..4bc7b749b0fc2b69aedcfef26c0d64c53770af7a 100644 (file)
@@ -369,7 +369,7 @@ HandOffToDxeCore (
     DEBUG ((\r
       DEBUG_INFO,\r
       "%a() Stack Base: 0x%lx, Stack Size: 0x%x\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       BaseOfStack,\r
       STACK_SIZE\r
       ));\r
@@ -457,7 +457,7 @@ HandOffToDxeCore (
     DEBUG ((\r
       DEBUG_INFO,\r
       "%a() Stack Base: 0x%lx, Stack Size: 0x%x\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       BaseOfStack,\r
       STACK_SIZE\r
       ));\r
index f7b57df1c49eebefa46c3741b1d1a930948088e3..b3567d88f73467e707657f23378696055cf48760 100644 (file)
@@ -36,7 +36,7 @@ HandOffToDxeCore (
   //\r
   BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE));\r
   if (BaseOfStack == NULL) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Can't allocate memory for stack.", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Can't allocate memory for stack.", __func__));\r
     ASSERT (FALSE);\r
   }\r
 \r
@@ -52,7 +52,7 @@ HandOffToDxeCore (
   //\r
   Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a: Fail to signal End of PEI event.", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a: Fail to signal End of PEI event.", __func__));\r
     ASSERT (FALSE);\r
   }\r
 \r
index 3552feda8f1b59923f0eb26705773895c3a937a4..d8284f9f4f34baf283d5d8276b08f56da5355ddc 100644 (file)
@@ -101,7 +101,7 @@ DiscoverPeimsAndOrderWithApriori (
   DEBUG ((\r
     DEBUG_INFO,\r
     "%a(): Found 0x%x PEI FFS files in the %dth FV\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     PeimCount,\r
     Private->CurrentPeimFvCount\r
     ));\r
index 60bbe57332b7fa0151cda811c02f973d88711b8f..f7cc94c6ebd0f783543ff172e9b8966e07253a4e 100644 (file)
@@ -1494,7 +1494,7 @@ ProcessFvFile (
       DEBUG ((\r
         DEBUG_INFO,\r
         "%a() FV at 0x%x, FvAlignment required is 0x%x\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         FvHeader,\r
         FvAlignment\r
         ));\r
index efc6b4ce2661f107439ea6b4e9588cdc93107230..a1523428cdaa1c87863f5724f6c1a8c54352b801 100644 (file)
@@ -502,7 +502,7 @@ InitCapsuleVariable (
   // Locate the VariablePolicy protocol\r
   Status = gBS->LocateProtocol (&gEdkiiVariablePolicyProtocolGuid, NULL, (VOID **)&VariablePolicy);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "DxeCapsuleReportLib %a - Could not locate VariablePolicy protocol! %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "DxeCapsuleReportLib %a - Could not locate VariablePolicy protocol! %r\n", __func__, Status));\r
     ASSERT_EFI_ERROR (Status);\r
   }\r
 \r
index 8c7b58b2f960e5609045eff250199ca4fb4f146c..a6af2e848562f573a921bfa5f629e12d913096c4 100644 (file)
@@ -579,7 +579,7 @@ S3BootScriptLibDeinitialize (
     return RETURN_SUCCESS;\r
   }\r
 \r
-  DEBUG ((DEBUG_INFO, "%a() in %a module\n", __FUNCTION__, gEfiCallerBaseName));\r
+  DEBUG ((DEBUG_INFO, "%a() in %a module\n", __func__, gEfiCallerBaseName));\r
 \r
   if (mEventDxeSmmReadyToLock != NULL) {\r
     //\r
index 50131a431f972a613fb9e798eb3ce88dce140e86..4ca8425705f882b60e982e8e12e9813cf7de1901 100644 (file)
@@ -132,7 +132,7 @@ GetResetPlatformSpecificGuid (
   //\r
   if ((ResetDataStringSize < DataSize) && ((DataSize - ResetDataStringSize) >= sizeof (GUID))) {\r
     ResetSubtypeGuid = (GUID *)((UINT8 *)ResetData + ResetDataStringSize);\r
-    DEBUG ((DEBUG_VERBOSE, "%a - Detected reset subtype %g...\n", __FUNCTION__, ResetSubtypeGuid));\r
+    DEBUG ((DEBUG_VERBOSE, "%a - Detected reset subtype %g...\n", __func__, ResetSubtypeGuid));\r
     return ResetSubtypeGuid;\r
   }\r
 \r
index bde22fa6590ead0818d0a416d5b868916425bfd1..c3763c4483c7a65ed03504dd218a71ab54f7446d 100644 (file)
@@ -1448,7 +1448,7 @@ BmExpandLoadFile (
       "%a:%a: failed to allocate reserved pages: "\r
       "BufferSize=%Lu LoadFile=\"%s\" FilePath=\"%s\"\n",\r
       gEfiCallerBaseName,\r
-      __FUNCTION__,\r
+      __func__,\r
       (UINT64)BufferSize,\r
       LoadFileText,\r
       FileText\r
index 46a2fa2016274c81a60d17c02b142d637c19409a..46a8b780e337952a5924cd24524d56ddd96ed19c 100644 (file)
@@ -581,7 +581,7 @@ BmRepairAllControllers (
       DEBUG ((\r
         DEBUG_ERROR,\r
         "[%a:%d] Repair failed after %d retries.\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         DEBUG_LINE_NUMBER,\r
         ReconnectRepairCount\r
         ));\r
index da90f4fc6ac960570dc48328193147e99da7bce6..5de46133bb261008d14b5e20fc3c24d1084bac0a 100644 (file)
@@ -95,7 +95,7 @@ VarCheckPolicyLibMmiHandler (
   //\r
   // If either of the pointers are NULL, we can't proceed.\r
   if ((CommBuffer == NULL) || (CommBufferSize == NULL)) {\r
-    DEBUG ((DEBUG_INFO, "%a - Invalid comm buffer pointers!\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_INFO, "%a - Invalid comm buffer pointers!\n", __func__));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -105,14 +105,14 @@ VarCheckPolicyLibMmiHandler (
   if ((InternalCommBufferSize > VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE) ||\r
       !VarCheckPolicyIsBufferOutsideValid ((UINTN)CommBuffer, (UINT64)InternalCommBufferSize))\r
   {\r
-    DEBUG ((DEBUG_ERROR, "%a - Invalid CommBuffer supplied! 0x%016lX[0x%016lX]\n", __FUNCTION__, CommBuffer, InternalCommBufferSize));\r
+    DEBUG ((DEBUG_ERROR, "%a - Invalid CommBuffer supplied! 0x%016lX[0x%016lX]\n", __func__, CommBuffer, InternalCommBufferSize));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
   // If the size does not meet a minimum threshold, we cannot proceed.\r
   ExpectedSize = sizeof (VAR_CHECK_POLICY_COMM_HEADER);\r
   if (InternalCommBufferSize < ExpectedSize) {\r
-    DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION__, InternalCommBufferSize, ExpectedSize));\r
+    DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, InternalCommBufferSize, ExpectedSize));\r
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
@@ -128,7 +128,7 @@ VarCheckPolicyLibMmiHandler (
   if ((InternalPolicyCommmHeader->Signature != VAR_CHECK_POLICY_COMM_SIG) ||\r
       (InternalPolicyCommmHeader->Revision != VAR_CHECK_POLICY_COMM_REVISION))\r
   {\r
-    DEBUG ((DEBUG_INFO, "%a - Signature or revision are incorrect!\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_INFO, "%a - Signature or revision are incorrect!\n", __func__));\r
     // We have verified the buffer is not null and have enough size to hold Result field.\r
     PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;\r
     return EFI_SUCCESS;\r
@@ -157,7 +157,7 @@ VarCheckPolicyLibMmiHandler (
       // This add should be safe because these are fixed sizes so far.\r
       ExpectedSize += sizeof (VAR_CHECK_POLICY_COMM_IS_ENABLED_PARAMS);\r
       if (InternalCommBufferSize < ExpectedSize) {\r
-        DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION__, InternalCommBufferSize, ExpectedSize));\r
+        DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, InternalCommBufferSize, ExpectedSize));\r
         PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;\r
         break;\r
       }\r
@@ -173,7 +173,7 @@ VarCheckPolicyLibMmiHandler (
       // This add should be safe because these are fixed sizes so far.\r
       ExpectedSize += sizeof (VARIABLE_POLICY_ENTRY);\r
       if (InternalCommBufferSize < ExpectedSize) {\r
-        DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION__, InternalCommBufferSize, ExpectedSize));\r
+        DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, InternalCommBufferSize, ExpectedSize));\r
         PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;\r
         break;\r
       }\r
@@ -186,7 +186,7 @@ VarCheckPolicyLibMmiHandler (
           EFI_ERROR (SafeUintnAdd (sizeof (VAR_CHECK_POLICY_COMM_HEADER), PolicyEntry->Size, &ExpectedSize)) ||\r
           (InternalCommBufferSize < ExpectedSize))\r
       {\r
-        DEBUG ((DEBUG_INFO, "%a - Bad policy entry contents!\n", __FUNCTION__));\r
+        DEBUG ((DEBUG_INFO, "%a - Bad policy entry contents!\n", __func__));\r
         PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;\r
         break;\r
       }\r
@@ -199,7 +199,7 @@ VarCheckPolicyLibMmiHandler (
       // This add should be safe because these are fixed sizes so far.\r
       ExpectedSize += sizeof (VAR_CHECK_POLICY_COMM_DUMP_PARAMS) + VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE;\r
       if (InternalCommBufferSize < ExpectedSize) {\r
-        DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __FUNCTION__, InternalCommBufferSize, ExpectedSize));\r
+        DEBUG ((DEBUG_INFO, "%a - Bad comm buffer size! %d < %d\n", __func__, InternalCommBufferSize, ExpectedSize));\r
         PolicyCommmHeader->Result = EFI_INVALID_PARAMETER;\r
         break;\r
       }\r
@@ -298,7 +298,7 @@ VarCheckPolicyLibMmiHandler (
 \r
     default:\r
       // Mark unknown requested command as EFI_UNSUPPORTED.\r
-      DEBUG ((DEBUG_INFO, "%a - Invalid command requested! %d\n", __FUNCTION__, PolicyCommmHeader->Command));\r
+      DEBUG ((DEBUG_INFO, "%a - Invalid command requested! %d\n", __func__, PolicyCommmHeader->Command));\r
       PolicyCommmHeader->Result = EFI_UNSUPPORTED;\r
       break;\r
   }\r
@@ -306,7 +306,7 @@ VarCheckPolicyLibMmiHandler (
   DEBUG ((\r
     DEBUG_VERBOSE,\r
     "%a - Command %d returning %r.\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     PolicyCommmHeader->Command,\r
     PolicyCommmHeader->Result\r
     ));\r
@@ -349,7 +349,7 @@ VarCheckPolicyLibCommonConstructor (
   }\r
   // Otherwise, there's not much we can do.\r
   else {\r
-    DEBUG ((DEBUG_ERROR, "%a - Cannot Initialize VariablePolicyLib! %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a - Cannot Initialize VariablePolicyLib! %r\n", __func__, Status));\r
     ASSERT_EFI_ERROR (Status);\r
   }\r
 \r
index 82dae67ef50f72fec3b4a180bb4050c143984c8e..214f76ab96265029fdef165dd087b3b53b935d00 100644 (file)
@@ -521,7 +521,7 @@ ValidateSetVariable (
         DEBUG ((\r
           DEBUG_VERBOSE,\r
           "%a - Bad Size. 0x%X <> 0x%X-0x%X\n",\r
-          __FUNCTION__,\r
+          __func__,\r
           DataSize,\r
           ActivePolicy->MinSize,\r
           ActivePolicy->MaxSize\r
@@ -537,7 +537,7 @@ ValidateSetVariable (
         DEBUG ((\r
           DEBUG_VERBOSE,\r
           "%a - Bad Attributes. 0x%X <> 0x%X:0x%X\n",\r
-          __FUNCTION__,\r
+          __func__,\r
           Attributes,\r
           ActivePolicy->AttributesMustHave,\r
           ActivePolicy->AttributesCantHave\r
@@ -598,7 +598,7 @@ ValidateSetVariable (
   }\r
 \r
 Exit:\r
-  DEBUG ((DEBUG_VERBOSE, "%a - Variable (%g:%s) returning %r.\n", __FUNCTION__, VendorGuid, VariableName, ReturnStatus));\r
+  DEBUG ((DEBUG_VERBOSE, "%a - Variable (%g:%s) returning %r.\n", __func__, VendorGuid, VariableName, ReturnStatus));\r
   return ReturnStatus;\r
 }\r
 \r
index cdeffa9113119a8327d26abaa3ab1b7413c43cc3..8e26a7d7959e27f207b176946284a4621b9bdf5c 100644 (file)
@@ -344,7 +344,7 @@ Thunk32To64 (
     DEBUG ((\r
       DEBUG_INFO,\r
       "%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       Context->StackBufferBase,\r
       Context->StackBufferLength\r
       ));\r
@@ -917,7 +917,7 @@ GetScatterGatherHeadEntries (
   CapsuleDataPtr64  = 0;\r
 \r
   if ((ListLength == NULL) || (HeadList == NULL)) {\r
-    DEBUG ((DEBUG_ERROR, "%a Invalid parameters.  Inputs can't be NULL\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a Invalid parameters.  Inputs can't be NULL\n", __func__));\r
     ASSERT (ListLength != NULL);\r
     ASSERT (HeadList != NULL);\r
     return EFI_INVALID_PARAMETER;\r
@@ -1022,7 +1022,7 @@ GetScatterGatherHeadEntries (
   }\r
 \r
   if (ValidIndex == 0) {\r
-    DEBUG ((DEBUG_ERROR, "%a didn't find any SG lists in variables\n", __FUNCTION__));\r
+    DEBUG ((DEBUG_ERROR, "%a didn't find any SG lists in variables\n", __func__));\r
     return EFI_NOT_FOUND;\r
   }\r
 \r
@@ -1101,7 +1101,7 @@ CapsuleCoalesce (
   //\r
   Status = GetScatterGatherHeadEntries (&ListLength, &VariableArrayAddress);\r
   if (EFI_ERROR (Status) || (VariableArrayAddress == NULL)) {\r
-    DEBUG ((DEBUG_ERROR, "%a failed to get Scatter Gather List Head Entries.  Status = %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a failed to get Scatter Gather List Head Entries.  Status = %r\n", __func__, Status));\r
     goto Done;\r
   }\r
 \r
index 05941f9f8d561374bea336e847b52f14410f022a..4085f371abad5b886ed993f41b773e011c793f1c 100644 (file)
@@ -277,7 +277,7 @@ _ModuleEntryPoint (
   DEBUG ((\r
     DEBUG_INFO,\r
     "%a() Stack Base: 0x%lx, Stack Size: 0x%lx\n",\r
-    __FUNCTION__,\r
+    __func__,\r
     EntrypointContext->StackBufferBase,\r
     EntrypointContext->StackBufferLength\r
     ));\r
index 098e4fec663b9f17b6a968528c94fc552f705387..6e10defe59c0f1bcf9078582af7689aeae99a7a7 100644 (file)
@@ -114,7 +114,7 @@ FindAnchorVolumeDescriptorPointer (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: Media block size 0x%x unable to hold an AVDP.\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       BlockSize\r
       ));\r
     return EFI_UNSUPPORTED;\r
@@ -140,7 +140,7 @@ FindAnchorVolumeDescriptorPointer (
   // Check if read block is a valid AVDP descriptor\r
   //\r
   if (DescriptorTag->TagIdentifier == UdfAnchorVolumeDescriptorPointer) {\r
-    DEBUG ((DEBUG_INFO, "%a: found AVDP at block %d\n", __FUNCTION__, 256));\r
+    DEBUG ((DEBUG_INFO, "%a: found AVDP at block %d\n", __func__, 256));\r
     AvdpsCount++;\r
   }\r
 \r
@@ -167,7 +167,7 @@ FindAnchorVolumeDescriptorPointer (
     DEBUG ((\r
       DEBUG_INFO,\r
       "%a: found AVDP at block %Ld\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       EndLBA - 256\r
       ));\r
     return EFI_SUCCESS;\r
@@ -251,13 +251,13 @@ FindAnchorVolumeDescriptorPointer (
       DEBUG ((\r
         DEBUG_WARN,\r
         "%a: found AVDP at block %Ld\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         LastAvdpBlockNum\r
         ));\r
       DEBUG ((\r
         DEBUG_WARN,\r
         "%a: correcting last block from %Ld to %Ld\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         EndLBA,\r
         LastAvdpBlockNum\r
         ));\r
index 6cd197046f4018e11f7d670de57cead2f4956c09..ca2f3e0766102ffc2e3765d39f383e119ef054dc 100644 (file)
@@ -262,7 +262,7 @@ UdfOpen (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: GetFileSize() fails with status - %r.\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       Status\r
       ));\r
     goto Error_Get_File_Size;\r
index 2998c3369cc9d27f3ba97c252e61ce8309d0840f..86020de6e092f4ee7c8583c784fc6da0fd11513e 100644 (file)
@@ -298,7 +298,7 @@ GetLongAdLsn (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a: Fail to get the Partition Descriptor from the given Long Allocation Descriptor.\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
     return EFI_UNSUPPORTED;\r
   }\r
index 53f9aefb2dbba29cf207acc5cdd803d56858b67f..10a67767ebc58f99fad33fffe9d780631c6be6c0 100644 (file)
@@ -731,7 +731,7 @@ FtwRestart (
     return EFI_ABORTED;\r
   }\r
 \r
-  DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a(): success\n", __func__));\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -787,7 +787,7 @@ FtwAbort (
 \r
   FtwDevice->FtwLastWriteHeader->Complete = FTW_VALID_STATE;\r
 \r
-  DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a(): success\n", __func__));\r
   return EFI_SUCCESS;\r
 }\r
 \r
@@ -901,7 +901,7 @@ FtwGetLastWrite (
     Status = EFI_SUCCESS;\r
   }\r
 \r
-  DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_INFO, "%a(): success\n", __func__));\r
 \r
   return Status;\r
 }\r
index f1335870e7977d7b192255b69b4e81825616434f..508184f7a048aac13661bfba337f703a70678bd1 100644 (file)
@@ -1320,7 +1320,7 @@ InitFtwProtocol (
       DEBUG ((\r
         DEBUG_INFO,\r
         "Ftw: Restart working block update in %a() - %r\n",\r
-        __FUNCTION__,\r
+        __func__,\r
         Status\r
         ));\r
       FtwAbort (&FtwDevice->FtwInstance);\r
index 5ade8d988bacc17c37f735a8f71288e54c47d861..1ae06a639c43ca2c39b52233decd25784a0815bd 100644 (file)
@@ -1632,7 +1632,7 @@ GetExPcdTokenNumber (
     }\r
   }\r
 \r
-  DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token number: %d\n", __FUNCTION__, Guid, ExTokenNumber));\r
+  DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token number: %d\n", __func__, Guid, ExTokenNumber));\r
   ASSERT (FALSE);\r
 \r
   return 0;\r
index dd077bb0cf19765c3caef4dac62f873bfba4f64a..1a86e69d3c21e94a942bb015e9dd12e4eb46a8d8 100644 (file)
@@ -1157,7 +1157,7 @@ SmbiosCreateTable (
     DEBUG ((\r
       DEBUG_INFO,\r
       "%a() re-allocate SMBIOS 32-bit table\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
     if (EntryPointStructure->TableAddress != 0) {\r
       //\r
@@ -1329,7 +1329,7 @@ SmbiosCreate64BitTable (
     DEBUG ((\r
       DEBUG_INFO,\r
       "%a() re-allocate SMBIOS 64-bit table\n",\r
-      __FUNCTION__\r
+      __func__\r
       ));\r
     if (Smbios30EntryPointStructure->TableAddress != 0) {\r
       //\r
index 88984c31ab4f96d2218e062b82c6e4437fb6cfaf..114d0693fe777c15b0c4814482a9b77243cd3acd 100644 (file)
@@ -116,7 +116,7 @@ MorLockInitAtEndOfDxe (
   // First, we obviously need to locate the VariablePolicy protocol.\r
   Status = gBS->LocateProtocol (&gEdkiiVariablePolicyProtocolGuid, NULL, (VOID **)&VariablePolicy);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a - Could not locate VariablePolicy protocol! %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a - Could not locate VariablePolicy protocol! %r\n", __func__, Status));\r
     return;\r
   }\r
 \r
@@ -132,7 +132,7 @@ MorLockInitAtEndOfDxe (
              VARIABLE_POLICY_TYPE_LOCK_NOW\r
              );\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status));\r
   }\r
 \r
   Status = RegisterBasicVariablePolicy (\r
@@ -146,7 +146,7 @@ MorLockInitAtEndOfDxe (
              VARIABLE_POLICY_TYPE_LOCK_NOW\r
              );\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status));\r
   }\r
 \r
   return;\r
index 296afd2ec4141318b67fefd68c08e71d5b78c6db..da1105ff073e9eb54736c02c96444dce0ba7bafb 100644 (file)
@@ -485,7 +485,7 @@ MorLockInitAtEndOfDxe (
     DEBUG ((\r
       DEBUG_WARN,\r
       "%a: deleting unexpected / unsupported variable %g:%s\n",\r
-      __FUNCTION__,\r
+      __func__,\r
       &gEfiMemoryOverwriteControlDataGuid,\r
       MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME\r
       ));\r
@@ -521,7 +521,7 @@ MorLockInitAtEndOfDxe (
   }\r
 \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status));\r
     ASSERT_EFI_ERROR (Status);\r
   }\r
 \r
@@ -559,7 +559,7 @@ MorLockInitAtEndOfDxe (
   }\r
 \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_CONTROL_LOCK_NAME, Status));\r
     ASSERT_EFI_ERROR (Status);\r
   }\r
 \r
index 3eb7d935b4d2186a0533aba9ea66cb82c4e08445..7a1331255b815bd89edc563e81f5e2389f276a78 100644 (file)
@@ -2770,7 +2770,7 @@ VariableServiceSetVariable (
         DEBUG ((\r
           DEBUG_ERROR,\r
           "%a: Failed to set variable '%s' with Guid %g\n",\r
-          __FUNCTION__,\r
+          __func__,\r
           VariableName,\r
           VendorGuid\r
           ));\r
@@ -2792,7 +2792,7 @@ VariableServiceSetVariable (
         DEBUG ((\r
           DEBUG_ERROR,\r
           "%a: Failed to set variable '%s' with Guid %g\n",\r
-          __FUNCTION__,\r
+          __func__,\r
           VariableName,\r
           VendorGuid\r
           ));\r
@@ -2814,7 +2814,7 @@ VariableServiceSetVariable (
         DEBUG ((\r
           DEBUG_ERROR,\r
           "%a: Failed to set variable '%s' with Guid %g\n",\r
-          __FUNCTION__,\r
+          __func__,\r
           VariableName,\r
           VendorGuid\r
           ));\r
index d849ee9ce2928e8c90af128b72d77953836a6ae0..f6bb7284f060ed6c3887cfa8421ecf8d8a92c476 100644 (file)
@@ -48,7 +48,7 @@ VariableLockRequestToLock (
   EFI_STATUS             Status;\r
   VARIABLE_POLICY_ENTRY  *NewPolicy;\r
 \r
-  DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! %a() will go away soon!\n", __FUNCTION__));\r
+  DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! %a() will go away soon!\n", __func__));\r
   DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Please move to use Variable Policy!\n"));\r
   DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", VendorGuid, VariableName));\r
 \r
@@ -85,7 +85,7 @@ VariableLockRequestToLock (
   }\r
 \r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTION__, VariableName, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__, VariableName, Status));\r
   }\r
 \r
   if (NewPolicy != NULL) {\r
index b2094fbcd6ea37539e214f3aec11250682a2c984..6151a2ba0b186732ebd63d15b05c7bc3c06ee08d 100644 (file)
@@ -95,7 +95,7 @@ ProtocolDisableVariablePolicy (
   PolicyHeader->Command     = VAR_CHECK_POLICY_COMMAND_DISABLE;\r
 \r
   Status = InternalMmCommunicate (CommHeader, &BufferSize);\r
-  DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status));\r
+  DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));\r
 \r
   ReleaseLockOnlyAtBootTime (&mMmCommunicationLock);\r
 \r
@@ -144,7 +144,7 @@ ProtocolIsVariablePolicyEnabled (
   PolicyHeader->Command     = VAR_CHECK_POLICY_COMMAND_IS_ENABLED;\r
 \r
   Status = InternalMmCommunicate (CommHeader, &BufferSize);\r
-  DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status));\r
+  DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));\r
 \r
   if (!EFI_ERROR (Status)) {\r
     Status = PolicyHeader->Result;\r
@@ -197,7 +197,7 @@ ProtocolRegisterVariablePolicy (
     DEBUG ((\r
       DEBUG_ERROR,\r
       "%a - Policy too large for buffer! %r, %d > %d \n",\r
-      __FUNCTION__,\r
+      __func__,\r
       Status,\r
       RequiredSize,\r
       mMmCommunicationBufferSize\r
@@ -222,7 +222,7 @@ ProtocolRegisterVariablePolicy (
   CopyMem (PolicyBuffer, NewPolicy, NewPolicy->Size);\r
 \r
   Status = InternalMmCommunicate (CommHeader, &BufferSize);\r
-  DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status));\r
+  DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));\r
 \r
   ReleaseLockOnlyAtBootTime (&mMmCommunicationLock);\r
 \r
@@ -278,7 +278,7 @@ DumpVariablePolicyHelper (
   CommandParams->PageRequested = PageRequested;\r
 \r
   Status = InternalMmCommunicate (CommHeader, &BufferSize);\r
-  DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status));\r
+  DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));\r
 \r
   if (!EFI_ERROR (Status)) {\r
     Status     = PolicyHeader->Result;\r
@@ -403,7 +403,7 @@ ProtocolLockVariablePolicy (
   PolicyHeader->Command     = VAR_CHECK_POLICY_COMMAND_LOCK;\r
 \r
   Status = InternalMmCommunicate (CommHeader, &BufferSize);\r
-  DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status));\r
+  DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status));\r
 \r
   ReleaseLockOnlyAtBootTime (&mMmCommunicationLock);\r
 \r
@@ -500,7 +500,7 @@ VariablePolicySmmDxeMain (
   // Locate the shared comm buffer to use for sending MM commands.\r
   Status = InitMmCommonCommBuffer (&mMmCommunicationBufferSize, &mMmCommunicationBuffer);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a - Failed to locate a viable MM comm buffer! %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a - Failed to locate a viable MM comm buffer! %r\n", __func__, Status));\r
     ASSERT_EFI_ERROR (Status);\r
     return Status;\r
   }\r
@@ -508,7 +508,7 @@ VariablePolicySmmDxeMain (
   // Locate the MmCommunication protocol.\r
   Status = gBS->LocateProtocol (&gEfiMmCommunication2ProtocolGuid, NULL, (VOID **)&mMmCommunication);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a - Failed to locate MmCommunication protocol! %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a - Failed to locate MmCommunication protocol! %r\n", __func__, Status));\r
     ASSERT_EFI_ERROR (Status);\r
     return Status;\r
   }\r
@@ -529,7 +529,7 @@ VariablePolicySmmDxeMain (
                   NULL\r
                   );\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a - Failed to install protocol! %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a - Failed to install protocol! %r\n", __func__, Status));\r
     goto Exit;\r
   } else {\r
     ProtocolInstalled = TRUE;\r
@@ -551,7 +551,7 @@ VariablePolicySmmDxeMain (
                   &VirtualAddressChangeEvent\r
                   );\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((DEBUG_ERROR, "%a - Failed to create VirtualAddressChange event! %r\n", __FUNCTION__, Status));\r
+    DEBUG ((DEBUG_ERROR, "%a - Failed to create VirtualAddressChange event! %r\n", __func__, Status));\r
     goto Exit;\r
   } else {\r
     VirtualAddressChangeRegistered = TRUE;\r