From 8ba392687b6f7fcb6e333756edd090003c57402e Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Thu, 6 Apr 2023 13:49:41 -0600 Subject: 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 Reviewed-by: Michael D Kinney Reviewed-by: Ard Biesheuvel Reviewed-by: Sunil V L --- OvmfPkg/IoMmuDxe/CcIoMmu.c | 18 +++++++++--------- OvmfPkg/IoMmuDxe/IoMmuBuffer.c | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'OvmfPkg/IoMmuDxe') 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, -- cgit v1.2.3