summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/IoMmuDxe
diff options
context:
space:
mode:
authorRebecca Cran <rebecca@bsdio.com>2023-04-06 13:49:41 -0600
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-10 14:19:57 +0000
commit8ba392687b6f7fcb6e333756edd090003c57402e (patch)
tree040194cbfaa73f764e86e050e9bc00b58e4fc60b /OvmfPkg/IoMmuDxe
parent089013a69724687f4051fc88367c9eb74def4284 (diff)
downloadedk2-8ba392687b6f7fcb6e333756edd090003c57402e.tar.gz
edk2-8ba392687b6f7fcb6e333756edd090003c57402e.tar.bz2
edk2-8ba392687b6f7fcb6e333756edd090003c57402e.zip
OvmfPkg: 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 OvmfPkg. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Diffstat (limited to 'OvmfPkg/IoMmuDxe')
-rw-r--r--OvmfPkg/IoMmuDxe/CcIoMmu.c18
-rw-r--r--OvmfPkg/IoMmuDxe/IoMmuBuffer.c8
2 files changed, 13 insertions, 13 deletions
diff --git a/OvmfPkg/IoMmuDxe/CcIoMmu.c b/OvmfPkg/IoMmuDxe/CcIoMmu.c
index 7c2843cd23..b83a969006 100644
--- a/OvmfPkg/IoMmuDxe/CcIoMmu.c
+++ b/OvmfPkg/IoMmuDxe/CcIoMmu.c
@@ -92,7 +92,7 @@ IoMmuMap (
DEBUG ((
DEBUG_VERBOSE,
"%a: Operation=%a Host=0x%p Bytes=0x%Lx\n",
- __FUNCTION__,
+ __func__,
((Operation >= 0 &&
Operation < ARRAY_SIZE (mBusMasterOperationName)) ?
mBusMasterOperationName[Operation] :
@@ -289,7 +289,7 @@ IoMmuMap (
DEBUG ((
DEBUG_VERBOSE,
"%a: Mapping=0x%p Device(PlainText)=0x%Lx Crypted=0x%Lx Pages=0x%Lx, ReservedMemBitmap=0x%Lx\n",
- __FUNCTION__,
+ __func__,
MapInfo,
MapInfo->PlainTextAddress,
MapInfo->CryptedAddress,
@@ -342,7 +342,7 @@ IoMmuUnmapWorker (
DEBUG ((
DEBUG_VERBOSE,
"%a: Mapping=0x%p MemoryMapLocked=%d\n",
- __FUNCTION__,
+ __func__,
Mapping,
MemoryMapLocked
));
@@ -537,7 +537,7 @@ IoMmuAllocateBuffer (
DEBUG ((
DEBUG_VERBOSE,
"%a: MemoryType=%u Pages=0x%Lx Attributes=0x%Lx\n",
- __FUNCTION__,
+ __func__,
(UINT32)MemoryType,
(UINT64)Pages,
Attributes
@@ -625,7 +625,7 @@ IoMmuAllocateBuffer (
DEBUG ((
DEBUG_VERBOSE,
"%a: Host=0x%Lx Stash=0x%p\n",
- __FUNCTION__,
+ __func__,
PhysicalAddress,
StashBuffer
));
@@ -663,7 +663,7 @@ IoMmuFreeBuffer (
DEBUG ((
DEBUG_VERBOSE,
"%a: Host=0x%p Pages=0x%Lx\n",
- __FUNCTION__,
+ __func__,
HostAddress,
(UINT64)Pages
));
@@ -818,7 +818,7 @@ IoMmuExitBoot (
// queue EventToSignal's NotifyFunction after the NotifyFunctions of *all*
// events in EFI_EVENT_GROUP_EXIT_BOOT_SERVICES.
//
- DEBUG ((DEBUG_VERBOSE, "%a\n", __FUNCTION__));
+ DEBUG ((DEBUG_VERBOSE, "%a\n", __func__));
gBS->SignalEvent (EventToSignal);
}
@@ -847,7 +847,7 @@ IoMmuUnmapAllMappings (
LIST_ENTRY *NextNode;
MAP_INFO *MapInfo;
- DEBUG ((DEBUG_VERBOSE, "%a\n", __FUNCTION__));
+ DEBUG ((DEBUG_VERBOSE, "%a\n", __func__));
//
// All drivers that had set up IOMMU mappings have halted their respective
@@ -933,7 +933,7 @@ InstallIoMmuProtocol (
if (EFI_ERROR (Status)) {
mReservedSharedMemSupported = FALSE;
} else {
- DEBUG ((DEBUG_INFO, "%a: Feature of reserved memory for DMA is supported.\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: Feature of reserved memory for DMA is supported.\n", __func__));
}
return EFI_SUCCESS;
diff --git a/OvmfPkg/IoMmuDxe/IoMmuBuffer.c b/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
index 83c7c59583..c8f6cf4818 100644
--- a/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
+++ b/OvmfPkg/IoMmuDxe/IoMmuBuffer.c
@@ -153,7 +153,7 @@ IoMmuInitReservedSharedMem (
DEBUG ((
DEBUG_VERBOSE,
"%a: ReservedMem (%d pages) address = 0x%llx\n",
- __FUNCTION__,
+ __func__,
TotalPages,
PhysicalAddress
));
@@ -330,7 +330,7 @@ InternalAllocateBuffer (
DEBUG ((
DEBUG_VERBOSE,
"%a: range-size: %lx, start-address=0x%llx, pages=0x%llx, bits=0x%lx, bitmap: %lx => %lx\n",
- __FUNCTION__,
+ __func__,
MemRange->DataSize,
*PhysicalAddress,
Pages,
@@ -401,7 +401,7 @@ IoMmuFreeBounceBuffer (
DEBUG ((
DEBUG_VERBOSE,
"%a: PlainTextAddress=0x%Lx, bits=0x%Lx, bitmap: %Lx => %Lx\n",
- __FUNCTION__,
+ __func__,
MapInfo->PlainTextAddress,
MapInfo->ReservedMemBitmap,
mReservedMemBitmap,
@@ -480,7 +480,7 @@ IoMmuFreeCommonBuffer (
DEBUG ((
DEBUG_VERBOSE,
"%a: CommonBuffer=0x%Lx, bits=0x%Lx, bitmap: %Lx => %Lx\n",
- __FUNCTION__,
+ __func__,
(UINT64)(UINTN)CommonBufferHeader + SIZE_4KB,
CommonBufferHeader->ReservedMemBitmap,
mReservedMemBitmap,