diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c b/MdeModulePkg/Bus/Ata/AhciPei/AhciMode.c index 0f0198d308..92fb30638e 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 0x%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 != 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; } @@ -860,7 +860,7 @@ AhciPioTransfer ( Offset = FisBaseAddr + AHCI_PIO_FIS_OFFSET; Status = 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 = TRUE; } @@ -874,7 +874,7 @@ AhciPioTransfer ( Offset = FisBaseAddr + AHCI_D2H_FIS_OFFSET; Status = AhciCheckMemSet (Offset, AHCI_FIS_TYPE_MASK, AHCI_FIS_REGISTER_D2H); if (!EFI_ERROR (Status)) { - DEBUG ((DEBUG_INFO, "%a: D2hFisReceived.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: D2hFisReceived.\n", __func__)); D2hFisReceived = TRUE; } @@ -918,7 +918,7 @@ AhciPioTransfer ( Timeout ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: AhciWaitMemSet (%r)\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: AhciWaitMemSet (%r)\n", __func__, Status)); goto Exit; } @@ -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 ( } if (Capacity == 0) { - DEBUG ((DEBUG_ERROR, "%a: Invalid Capacity (0) for ATA device.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Invalid Capacity (0) for ATA device.\n", __func__)); return EFI_UNSUPPORTED; } @@ -1532,7 +1532,7 @@ IdentifyAtaDevice ( DEBUG (( DEBUG_INFO, "%a: PhyLogicSectorSupport = 0x%x\n", - __FUNCTION__, + __func__, PhyLogicSectorSupport )); if ((PhyLogicSectorSupport & (BIT14 | BIT15)) == BIT14) { @@ -1550,20 +1550,20 @@ IdentifyAtaDevice ( // MaxSectorCount = mMaxTransferBlockNumber[DeviceData->Lba48Bit]; if ((Media->BlockSize == 0) || (Media->BlockSize > MAX_UINT32 / MaxSectorCount)) { - DEBUG ((DEBUG_ERROR, "%a: Invalid BlockSize (0x%x).\n", __FUNCTION__, Media->BlockSize)); + DEBUG ((DEBUG_ERROR, "%a: Invalid BlockSize (0x%x).\n", __func__, Media->BlockSize)); return EFI_UNSUPPORTED; } DEBUG (( DEBUG_INFO, "%a: BlockSize = 0x%x, LastBlock = 0x%lx\n", - __FUNCTION__, + __func__, Media->BlockSize, Media->LastBlock )); if ((IdentifyData->trusted_computing_support & BIT0) != 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 = TRUE; } @@ -1686,7 +1686,7 @@ AhciModeInitialization ( Status = AhciReset (AhciBar, AHCI_PEI_RESET_TIMEOUT); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: AHCI HBA reset failed with %r.\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: AHCI HBA reset failed with %r.\n", __func__, Status)); return EFI_DEVICE_ERROR; } @@ -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 = AHCI_PORT_START + Port * AHCI_PORT_REG_WIDTH + AHCI_PORT_CMD; AhciAndReg (AhciBar, Offset, (UINT32) ~(AHCI_PORT_CMD_SUD)); - DEBUG ((DEBUG_ERROR, "%a: No device detected at Port %d.\n", __FUNCTION__, Port)); + DEBUG ((DEBUG_ERROR, "%a: No device detected at Port %d.\n", __func__, Port)); continue; } @@ -1844,7 +1844,7 @@ AhciModeInitialization ( DEBUG (( DEBUG_ERROR, "%a: Port %d device presence detected but phy not ready (TFD=0x%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) == AHCI_ATA_DEVICE_SIG) { Status = AhciIdentify (Private, Port, 0, PortIndex - 1, &IdentifyData); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: AhciIdentify() failed with %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: AhciIdentify() failed with %r\n", __func__, Status)); continue; } - DEBUG ((DEBUG_INFO, "%a: ATA hard disk found on Port %d.\n", __FUNCTION__, Port)); + DEBUG ((DEBUG_INFO, "%a: ATA hard disk found on Port %d.\n", __func__, Port)); } else { continue; } diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c b/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c index e33d863d2a..7ea36afa25 100644 --- a/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c +++ b/MdeModulePkg/Bus/Ata/AhciPei/AhciPei.c @@ -156,7 +156,7 @@ AtaAhciInitPrivateData ( // Status = PeiServicesGetBootMode (&BootMode); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __func__)); return Status; } @@ -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 = EDKII_STORAGE_SECURITY_PPI_REVISION; Private->StorageSecurityPpi.GetNumberofDevices = AhciStorageSecurityGetDeviceNo; @@ -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__)); PeiServicesNotifyPpi (&mAtaAhciHostControllerNotify); diff --git a/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiBlockIo.c b/MdeModulePkg/Bus/Ata/AhciPei/AhciPeiBlockIo.c index c5d1f3fffb..5eb2a9ce82 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 = %x; StartLba = %x\n", - __FUNCTION__, + __func__, TransferBlockNumber, StartLba )); diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c index e903593b01..b4f1a50799 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/Pci/EhciDxe/EhciSched.c index 6967aabceb..59bbe9fc23 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c @@ -836,7 +836,7 @@ EhciInsertAsyncIntTransfer ( Data = AllocatePool (DataLen); if (Data == NULL) { - DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __func__)); return NULL; } @@ -858,7 +858,7 @@ EhciInsertAsyncIntTransfer ( ); if (Urb == 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/NonDiscoverablePciDeviceIo.c b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c index 2fb78d8f96..e31c38deed 100644 --- a/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.c +++ b/MdeModulePkg/Bus/Pci/NonDiscoverablePciDeviceDxe/NonDiscoverablePciDeviceIo.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/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c index b33c903412..b6ed7f7031 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c @@ -216,7 +216,7 @@ NvmeRead ( DEBUG_BLKIO, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, " "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", - __FUNCTION__, + __func__, Lba, (UINT64)OrginalBlocks, (UINT64)Blocks, @@ -302,7 +302,7 @@ NvmeWrite ( DEBUG_BLKIO, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, " "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", - __FUNCTION__, + __func__, Lba, (UINT64)OrginalBlocks, (UINT64)Blocks, @@ -817,7 +817,7 @@ NvmeAsyncRead ( DEBUG_BLKIO, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, " "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", - __FUNCTION__, + __func__, Lba, (UINT64)OrginalBlocks, (UINT64)Blocks, @@ -945,7 +945,7 @@ NvmeAsyncWrite ( DEBUG_BLKIO, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, " "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", - __FUNCTION__, + __func__, Lba, (UINT64)OrginalBlocks, (UINT64)Blocks, diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c index 3e6f75345d..38f86487e2 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; } @@ -99,7 +99,7 @@ EnumerateNvmeDevNamespace ( // Validate Namespace // if (NamespaceData->Ncap == 0) { - DEBUG ((DEBUG_INFO, "%a: Namespace ID %d is an inactive one.\n", __FUNCTION__, NamespaceId)); + DEBUG ((DEBUG_INFO, "%a: Namespace ID %d is an inactive one.\n", __func__, NamespaceId)); Status = EFI_DEVICE_ERROR; goto Exit; } @@ -142,7 +142,7 @@ EnumerateNvmeDevNamespace ( DEBUG (( DEBUG_INFO, "%a: Namespace ID %d - BlockSize = 0x%x, LastBlock = 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; - DEBUG ((DEBUG_INFO, "%a: Enters.\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a: Enters.\n", __func__)); // // Get the current boot mode. // Status = PeiServicesGetBootMode (&BootMode); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to get the current boot mode.\n", __func__)); return Status; } @@ -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; } ASSERT (DeviceAddress == ((EFI_PHYSICAL_ADDRESS)(UINTN)Private->Buffer)); - DEBUG ((DEBUG_INFO, "%a: DMA buffer base at 0x%x\n", __FUNCTION__, Private->Buffer)); + DEBUG ((DEBUG_INFO, "%a: DMA buffer base at 0x%x\n", __func__, Private->Buffer)); // // 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 = EDKII_STORAGE_SECURITY_PPI_REVISION; Private->StorageSecurityPpi.GetNumberofDevices = NvmeStorageSecurityGetDeviceNo; @@ -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__)); PeiServicesNotifyPpi (&mNvmeHostControllerNotify); diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c index 576481dcee..a61238086c 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiBlockIo.c @@ -125,14 +125,14 @@ NvmeRead ( MaxTransferBlocks = MaxTransferBlocks >> 1; if ((Retries > NVME_READ_MAX_RETRY) || (MaxTransferBlocks < 1)) { - DEBUG ((DEBUG_ERROR, "%a: ReadSectors fail, Status - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: ReadSectors fail, Status - %r\n", __func__, Status)); break; } 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 = 0x%08Lx, Original = 0x%08Lx, " "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", - __FUNCTION__, + __func__, Lba, (UINT64)OrginalBlocks, (UINT64)Blocks, diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c index bff5cfd0d5..fc7b684940 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiHci.c @@ -138,7 +138,7 @@ NvmeBaseMemPageOffset ( PageSizeList[4] = NVME_PRP_SIZE; /* PRPs */ if (BaseMemIndex > MAX_BASEMEM_COUNT) { - DEBUG ((DEBUG_ERROR, "%a: The input BaseMem index is invalid.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: The input BaseMem index is invalid.\n", __func__)); ASSERT (FALSE); return 0; } @@ -191,7 +191,7 @@ NvmeWaitController ( // Status = NVME_GET_CSTS (Private, &Csts); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CSTS fail, Status - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NVME_GET_CSTS fail, Status - %r\n", __func__, Status)); return Status; } @@ -232,7 +232,7 @@ NvmeDisableController ( // Status = 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; } @@ -243,21 +243,21 @@ NvmeDisableController ( // Status = 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; } } Status = NvmeWaitController (Private, FALSE); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __func__, Status)); goto ErrorExit; } return EFI_SUCCESS; ErrorExit: - DEBUG ((DEBUG_ERROR, "%a fail, Status - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a fail, Status - %r\n", __func__, Status)); return Status; } @@ -289,20 +289,20 @@ NvmeEnableController ( Cc.Iocqes = 4; Status = 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; } Status = NvmeWaitController (Private, TRUE); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NvmeWaitController fail, Status - %r\n", __func__, Status)); goto ErrorExit; } return EFI_SUCCESS; ErrorExit: - DEBUG ((DEBUG_ERROR, "%a fail, Status: %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a fail, Status: %r\n", __func__, Status)); return Status; } @@ -572,7 +572,7 @@ NvmeControllerInit ( // NVME_GET_CAP (Private, &Private->Cap); if ((Private->Cap.Css & BIT0) == 0) { - DEBUG ((DEBUG_ERROR, "%a: The NVME controller doesn't support NVMe command set.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: The NVME controller doesn't support NVMe command set.\n", __func__)); return EFI_UNSUPPORTED; } @@ -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 than 4K.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: The driver doesn't support page size other than 4K.\n", __func__)); ASSERT (FALSE); return EFI_UNSUPPORTED; } @@ -599,7 +599,7 @@ NvmeControllerInit ( // Status = 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; } @@ -647,7 +647,7 @@ NvmeControllerInit ( // Status = 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; } @@ -663,7 +663,7 @@ NvmeControllerInit ( Status = 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; } @@ -676,7 +676,7 @@ NvmeControllerInit ( DEBUG (( DEBUG_ERROR, "%a: Number of Namespaces field in Identify Controller data not supported by the driver.\n", - __FUNCTION__ + __func__ )); return EFI_UNSUPPORTED; } @@ -686,13 +686,13 @@ NvmeControllerInit ( // Status = 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; } Status = 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)); } return Status; diff --git a/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c b/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPeiPassThru.c index dc280ec4e3..5081b53cd5 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 == 0); if (Sq->Psdt != 0) { - DEBUG ((DEBUG_ERROR, "%a: Does not support SGL mechanism.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Does not support SGL mechanism.\n", __func__)); return EFI_UNSUPPORTED; } @@ -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 != Packet->TransferLength)) { Status = EFI_OUT_OF_RESOURCES; - DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to map data buffer.\n", __func__)); goto Exit; } @@ -498,7 +498,7 @@ NvmePassThruExecute ( ); if (EFI_ERROR (Status) || (MapLength != Packet->MetadataLength)) { Status = EFI_OUT_OF_RESOURCES; - DEBUG ((DEBUG_ERROR, "%a: Fail to map meta data buffer.\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to map meta data buffer.\n", __func__)); goto Exit; } @@ -526,7 +526,7 @@ NvmePassThruExecute ( ); if (Sq->Prp[1] == 0) { Status = EFI_OUT_OF_RESOURCES; - DEBUG ((DEBUG_ERROR, "%a: Create PRP list fail, Status - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: Create PRP list fail, Status - %r\n", __func__, Status)); goto Exit; } } else if ((Offset + Bytes) > EFI_PAGE_SIZE) { @@ -568,7 +568,7 @@ NvmePassThruExecute ( Data32 = ReadUnaligned32 ((UINT32 *)&Private->SqTdbl[QueueId]); Status = NVME_SET_SQTDBL (Private, QueueId, &Data32); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: NVME_SET_SQTDBL fail, Status - %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a: NVME_SET_SQTDBL fail, Status - %r\n", __func__, Status)); goto Exit; } @@ -591,7 +591,7 @@ NvmePassThruExecute ( // // Timeout occurs for an NVMe command, reset the controller to abort the 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 = NvmeControllerInit (Private); if (EFI_ERROR (Status)) { Status = EFI_DEVICE_ERROR; diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciCommand.c index ba4b099bc5..75c9b344ee 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/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridge.c index b20bcd310a..d573e532ba 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/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c index ab2becdd19..8496ce4727 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].OperatingParameters ); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_WARN, "%a: Failed to get operating parameters, using defaults\n", __FUNCTION__)); + DEBUG ((DEBUG_WARN, "%a: Failed to get operating parameters, using defaults\n", __func__)); } } } diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c index dd45167a00..aab6815328 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/XhciDxe/Xhci.c index d8fa41f68f..62682dd27c 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/Pci/XhciDxe/XhciSched.c index 4b7462704a..298fb88b81 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c @@ -1495,7 +1495,7 @@ XhciInsertAsyncIntTransfer ( Data = AllocateZeroPool (DataLen); if (Data == NULL) { - DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: failed to allocate buffer\n", __func__)); return NULL; } @@ -1513,7 +1513,7 @@ XhciInsertAsyncIntTransfer ( Context ); if (Urb == 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/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c index 873581d817..670f70caf4 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 = 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 = 0; @@ -2626,7 +2626,7 @@ ScsiDiskInquiryDevice ( DEBUG (( DEBUG_WARN, "%a: non-ascending code in Supported VPD Pages page @ %u\n", - __FUNCTION__, + __func__, Index )); Index = 0; diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c index fb9ae3ce78..cf9d556877 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/Dxe/DxeMain/DxeMain.c index 4683016ed7..0e0f9769b9 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=0x%Lx MemoryLength=0x%Lx\n", - __FUNCTION__, + __func__, MemoryBaseAddress, MemoryLength )); diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c index b89ab046fa..7cc829b174 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 = 0x%016lx StackSize = 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__ )); MergeMemoryMapForProtectionPolicy (MemoryMap, &MemoryMapSize, DescriptorSize); @@ -926,7 +926,7 @@ InitializeDxeNxMemoryProtectionPolicy ( DEBUG (( DEBUG_INFO, "%a: applying strict permissions to inactive memory regions\n", - __FUNCTION__ + __func__ )); CoreAcquireGcdMemoryLock (); diff --git a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c index b8d4184b50..2152833ff6 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 fdeaaa39d8..4bc7b749b0 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/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c index f7b57df1c4..b3567d88f7 100644 --- a/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/RiscV64/DxeLoadFunc.c @@ -36,7 +36,7 @@ HandOffToDxeCore ( // BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE)); if (BaseOfStack == NULL) { - DEBUG ((DEBUG_ERROR, "%a: Can't allocate memory for stack.", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Can't allocate memory for stack.", __func__)); ASSERT (FALSE); } @@ -52,7 +52,7 @@ HandOffToDxeCore ( // Status = PeiServicesInstallPpi (&gEndOfPeiSignalPpi); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a: Fail to signal End of PEI event.", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a: Fail to signal End of PEI event.", __func__)); ASSERT (FALSE); } diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index 3552feda8f..d8284f9f4f 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/FwVol/FwVol.c index 60bbe57332..f7cc94c6eb 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 efc6b4ce26..a1523428cd 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c @@ -502,7 +502,7 @@ InitCapsuleVariable ( // Locate the VariablePolicy protocol Status = gBS->LocateProtocol (&gEdkiiVariablePolicyProtocolGuid, NULL, (VOID **)&VariablePolicy); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "DxeCapsuleReportLib %a - Could not locate VariablePolicy protocol! %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "DxeCapsuleReportLib %a - Could not locate VariablePolicy protocol! %r\n", __func__, Status)); ASSERT_EFI_ERROR (Status); } diff --git a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c index 8c7b58b2f9..a6af2e8485 100644 --- a/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c +++ b/MdeModulePkg/Library/PiDxeS3BootScriptLib/BootScriptSave.c @@ -579,7 +579,7 @@ S3BootScriptLibDeinitialize ( return RETURN_SUCCESS; } - DEBUG ((DEBUG_INFO, "%a() in %a module\n", __FUNCTION__, gEfiCallerBaseName)); + DEBUG ((DEBUG_INFO, "%a() in %a module\n", __func__, gEfiCallerBaseName)); if (mEventDxeSmmReadyToLock != NULL) { // diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c index 50131a431f..4ca8425705 100644 --- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c +++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c @@ -132,7 +132,7 @@ GetResetPlatformSpecificGuid ( // if ((ResetDataStringSize < DataSize) && ((DataSize - ResetDataStringSize) >= sizeof (GUID))) { ResetSubtypeGuid = (GUID *)((UINT8 *)ResetData + ResetDataStringSize); - DEBUG ((DEBUG_VERBOSE, "%a - Detected reset subtype %g...\n", __FUNCTION__, ResetSubtypeGuid)); + DEBUG ((DEBUG_VERBOSE, "%a - Detected reset subtype %g...\n", __func__, ResetSubtypeGuid)); return ResetSubtypeGuid; } diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c index bde22fa659..c3763c4483 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=%Lu LoadFile=\"%s\" FilePath=\"%s\"\n", gEfiCallerBaseName, - __FUNCTION__, + __func__, (UINT64)BufferSize, LoadFileText, FileText diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c index 46a2fa2016..46a8b780e3 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/MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLib.c index da90f4fc6a..5de46133bb 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 == NULL) || (CommBufferSize == 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; } @@ -105,14 +105,14 @@ VarCheckPolicyLibMmiHandler ( if ((InternalCommBufferSize > VAR_CHECK_POLICY_MM_COMM_BUFFER_SIZE) || !VarCheckPolicyIsBufferOutsideValid ((UINTN)CommBuffer, (UINT64)InternalCommBufferSize)) { - DEBUG ((DEBUG_ERROR, "%a - Invalid CommBuffer supplied! 0x%016lX[0x%016lX]\n", __FUNCTION__, CommBuffer, InternalCommBufferSize)); + DEBUG ((DEBUG_ERROR, "%a - Invalid CommBuffer supplied! 0x%016lX[0x%016lX]\n", __func__, CommBuffer, InternalCommBufferSize)); return EFI_INVALID_PARAMETER; } // If the size does not meet a minimum threshold, we cannot proceed. ExpectedSize = 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; } @@ -128,7 +128,7 @@ VarCheckPolicyLibMmiHandler ( if ((InternalPolicyCommmHeader->Signature != VAR_CHECK_POLICY_COMM_SIG) || (InternalPolicyCommmHeader->Revision != VAR_CHECK_POLICY_COMM_REVISION)) { - DEBUG ((DEBUG_INFO, "%a - Signature or revision are incorrect!\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a - Signature or revision are incorrect!\n", __func__)); // We have verified the buffer is not null and have enough size to hold Result field. PolicyCommmHeader->Result = EFI_INVALID_PARAMETER; return EFI_SUCCESS; @@ -157,7 +157,7 @@ VarCheckPolicyLibMmiHandler ( // This add should be safe because these are fixed sizes so far. ExpectedSize += sizeof (VAR_CHECK_POLICY_COMM_IS_ENABLED_PARAMS); 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)); PolicyCommmHeader->Result = EFI_INVALID_PARAMETER; break; } @@ -173,7 +173,7 @@ VarCheckPolicyLibMmiHandler ( // This add should be safe because these are fixed sizes so far. ExpectedSize += sizeof (VARIABLE_POLICY_ENTRY); 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)); PolicyCommmHeader->Result = 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", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a - Bad policy entry contents!\n", __func__)); PolicyCommmHeader->Result = EFI_INVALID_PARAMETER; break; } @@ -199,7 +199,7 @@ VarCheckPolicyLibMmiHandler ( // This add should be safe because these are fixed sizes so far. ExpectedSize += sizeof (VAR_CHECK_POLICY_COMM_DUMP_PARAMS) + VAR_CHECK_POLICY_MM_DUMP_BUFFER_SIZE; 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)); PolicyCommmHeader->Result = EFI_INVALID_PARAMETER; break; } @@ -298,7 +298,7 @@ VarCheckPolicyLibMmiHandler ( default: // Mark unknown requested command as EFI_UNSUPPORTED. - DEBUG ((DEBUG_INFO, "%a - Invalid command requested! %d\n", __FUNCTION__, PolicyCommmHeader->Command)); + DEBUG ((DEBUG_INFO, "%a - Invalid command requested! %d\n", __func__, PolicyCommmHeader->Command)); PolicyCommmHeader->Result = 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); } diff --git a/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c b/MdeModulePkg/Library/VariablePolicyLib/VariablePolicyLib.c index 82dae67ef5..214f76ab96 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 ( } Exit: - DEBUG ((DEBUG_VERBOSE, "%a - Variable (%g:%s) returning %r.\n", __FUNCTION__, VendorGuid, VariableName, ReturnStatus)); + DEBUG ((DEBUG_VERBOSE, "%a - Variable (%g:%s) returning %r.\n", __func__, VendorGuid, VariableName, ReturnStatus)); return ReturnStatus; } diff --git a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c index cdeffa9113..8e26a7d795 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 = 0; if ((ListLength == NULL) || (HeadList == 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 != NULL); ASSERT (HeadList != NULL); return EFI_INVALID_PARAMETER; @@ -1022,7 +1022,7 @@ GetScatterGatherHeadEntries ( } if (ValidIndex == 0) { - DEBUG ((DEBUG_ERROR, "%a didn't find any SG lists in variables\n", __FUNCTION__)); + DEBUG ((DEBUG_ERROR, "%a didn't find any SG lists in variables\n", __func__)); return EFI_NOT_FOUND; } @@ -1101,7 +1101,7 @@ CapsuleCoalesce ( // Status = GetScatterGatherHeadEntries (&ListLength, &VariableArrayAddress); if (EFI_ERROR (Status) || (VariableArrayAddress == NULL)) { - DEBUG ((DEBUG_ERROR, "%a failed to get Scatter Gather List Head Entries. Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a failed to get Scatter Gather List Head Entries. Status = %r\n", __func__, Status)); goto Done; } diff --git a/MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c b/MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c index 05941f9f8d..4085f371ab 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 098e4fec66..6e10defe59 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 == 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++; } @@ -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/Universal/Disk/UdfDxe/File.c index 6cd197046f..ca2f3e0766 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/MdeModulePkg/Universal/Disk/UdfDxe/FileSystemOperations.c index 2998c3369c..86020de6e0 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 Allocation Descriptor.\n", - __FUNCTION__ + __func__ )); return EFI_UNSUPPORTED; } diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c index 53f9aefb2d..10a67767eb 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c @@ -731,7 +731,7 @@ FtwRestart ( return EFI_ABORTED; } - DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a(): success\n", __func__)); return EFI_SUCCESS; } @@ -787,7 +787,7 @@ FtwAbort ( FtwDevice->FtwLastWriteHeader->Complete = FTW_VALID_STATE; - DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a(): success\n", __func__)); return EFI_SUCCESS; } @@ -901,7 +901,7 @@ FtwGetLastWrite ( Status = EFI_SUCCESS; } - DEBUG ((DEBUG_INFO, "%a(): success\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a(): success\n", __func__)); return Status; } diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c index f1335870e7..508184f7a0 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/Universal/PCD/Dxe/Service.c index 5ade8d988b..1ae06a639c 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c @@ -1632,7 +1632,7 @@ GetExPcdTokenNumber ( } } - DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token number: %d\n", __FUNCTION__, Guid, ExTokenNumber)); + DEBUG ((DEBUG_ERROR, "%a: Failed to find PCD with GUID: %g and token number: %d\n", __func__, Guid, ExTokenNumber)); ASSERT (FALSE); return 0; diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c index dd077bb0cf..1a86e69d3c 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 != 0) { // @@ -1329,7 +1329,7 @@ SmbiosCreate64BitTable ( DEBUG (( DEBUG_INFO, "%a() re-allocate SMBIOS 64-bit table\n", - __FUNCTION__ + __func__ )); if (Smbios30EntryPointStructure->TableAddress != 0) { // diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockDxe.c index 88984c31ab..114d0693fe 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 = 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; } @@ -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", __FUNCTION__, 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)); } Status = 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", __FUNCTION__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status)); + DEBUG ((DEBUG_ERROR, "%a - Could not lock variable %s! %r\n", __func__, MEMORY_OVERWRITE_REQUEST_VARIABLE_NAME, Status)); } return; diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/TcgMorLockSmm.c index 296afd2ec4..da1105ff07 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 ( } if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTION__, 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); } @@ -559,7 +559,7 @@ MorLockInitAtEndOfDxe ( } if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTION__, 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); } diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c index 3eb7d935b4..7a1331255b 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/VariableLockRequestToLock.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableLockRequestToLock.c index d849ee9ce2..f6bb7284f0 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; - 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 Variable Policy!\n")); DEBUG ((DEBUG_WARN, "!!! DEPRECATED INTERFACE !!! Variable: %g %s\n", VendorGuid, VariableName)); @@ -85,7 +85,7 @@ VariableLockRequestToLock ( } if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __FUNCTION__, VariableName, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to lock variable %s! %r\n", __func__, VariableName, Status)); } if (NewPolicy != NULL) { diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c index b2094fbcd6..6151a2ba0b 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariablePolicySmmDxe.c @@ -95,7 +95,7 @@ ProtocolDisableVariablePolicy ( PolicyHeader->Command = VAR_CHECK_POLICY_COMMAND_DISABLE; Status = InternalMmCommunicate (CommHeader, &BufferSize); - DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status)); ReleaseLockOnlyAtBootTime (&mMmCommunicationLock); @@ -144,7 +144,7 @@ ProtocolIsVariablePolicyEnabled ( PolicyHeader->Command = VAR_CHECK_POLICY_COMMAND_IS_ENABLED; Status = InternalMmCommunicate (CommHeader, &BufferSize); - DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status)); if (!EFI_ERROR (Status)) { Status = 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); Status = InternalMmCommunicate (CommHeader, &BufferSize); - DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status)); ReleaseLockOnlyAtBootTime (&mMmCommunicationLock); @@ -278,7 +278,7 @@ DumpVariablePolicyHelper ( CommandParams->PageRequested = PageRequested; Status = InternalMmCommunicate (CommHeader, &BufferSize); - DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status)); if (!EFI_ERROR (Status)) { Status = PolicyHeader->Result; @@ -403,7 +403,7 @@ ProtocolLockVariablePolicy ( PolicyHeader->Command = VAR_CHECK_POLICY_COMMAND_LOCK; Status = InternalMmCommunicate (CommHeader, &BufferSize); - DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_VERBOSE, "%a - MmCommunication returned %r.\n", __func__, Status)); ReleaseLockOnlyAtBootTime (&mMmCommunicationLock); @@ -500,7 +500,7 @@ VariablePolicySmmDxeMain ( // Locate the shared comm buffer to use for sending MM commands. Status = InitMmCommonCommBuffer (&mMmCommunicationBufferSize, &mMmCommunicationBuffer); 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 = 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", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a - Failed to install protocol! %r\n", __func__, Status)); goto Exit; } else { ProtocolInstalled = 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 = TRUE;