summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c
diff options
context:
space:
mode:
authorRebecca Cran <rebecca@bsdio.com>2023-04-06 13:50:06 -0600
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-10 14:19:57 +0000
commit7b82da70edf7dda2c6f4e853f100df620bd5c0f3 (patch)
tree25d8d93d558f8cb02342fd2364202d9e48f29deb /MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c
parent8ba392687b6f7fcb6e333756edd090003c57402e (diff)
downloadedk2-7b82da70edf7dda2c6f4e853f100df620bd5c0f3.tar.gz
edk2-7b82da70edf7dda2c6f4e853f100df620bd5c0f3.tar.bz2
edk2-7b82da70edf7dda2c6f4e853f100df620bd5c0f3.zip
MdeModulePkg: Update code to be more C11 compliant by using __func__
__FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout 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>
Diffstat (limited to 'MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c')
-rw-r--r--MdeModulePkg/Bus/Pci/NvmExpressPei/NvmExpressPei.c36
1 files changed, 18 insertions, 18 deletions
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);