StandaloneMmPkg: 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
StandaloneMmPkg.

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>
This commit is contained in:
Rebecca Cran 2023-04-06 13:52:42 -06:00 committed by mergify[bot]
parent 9e7b042ecb
commit f1d31a6ec7
3 changed files with 20 additions and 20 deletions

View File

@ -80,7 +80,7 @@ UpdateMmFoundationPeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: ImageContext->ImageRead () failed (Status = %r)\n", "%a: ImageContext->ImageRead () failed (Status = %r)\n",
__FUNCTION__, __func__,
Status Status
)); ));
return Status; return Status;
@ -89,7 +89,7 @@ UpdateMmFoundationPeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Section %d of image at 0x%lx has 0x%x permissions\n", "%a: Section %d of image at 0x%lx has 0x%x permissions\n",
__FUNCTION__, __func__,
Index, Index,
ImageContext->ImageAddress, ImageContext->ImageAddress,
SectionHeader.Characteristics SectionHeader.Characteristics
@ -97,7 +97,7 @@ UpdateMmFoundationPeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Section %d of image at 0x%lx has %a name\n", "%a: Section %d of image at 0x%lx has %a name\n",
__FUNCTION__, __func__,
Index, Index,
ImageContext->ImageAddress, ImageContext->ImageAddress,
SectionHeader.Name SectionHeader.Name
@ -105,7 +105,7 @@ UpdateMmFoundationPeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Section %d of image at 0x%lx has 0x%x address\n", "%a: Section %d of image at 0x%lx has 0x%x address\n",
__FUNCTION__, __func__,
Index, Index,
ImageContext->ImageAddress, ImageContext->ImageAddress,
ImageContext->ImageAddress + SectionHeader.VirtualAddress ImageContext->ImageAddress + SectionHeader.VirtualAddress
@ -113,7 +113,7 @@ UpdateMmFoundationPeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Section %d of image at 0x%lx has 0x%x data\n", "%a: Section %d of image at 0x%lx has 0x%x data\n",
__FUNCTION__, __func__,
Index, Index,
ImageContext->ImageAddress, ImageContext->ImageAddress,
SectionHeader.PointerToRawData SectionHeader.PointerToRawData
@ -133,7 +133,7 @@ UpdateMmFoundationPeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Mapping section %d of image at 0x%lx with RW-XN permissions\n", "%a: Mapping section %d of image at 0x%lx with RW-XN permissions\n",
__FUNCTION__, __func__,
Index, Index,
ImageContext->ImageAddress ImageContext->ImageAddress
)); ));
@ -141,7 +141,7 @@ UpdateMmFoundationPeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Mapping section %d of image at 0x%lx with RO-XN permissions\n", "%a: Mapping section %d of image at 0x%lx with RO-XN permissions\n",
__FUNCTION__, __func__,
Index, Index,
ImageContext->ImageAddress ImageContext->ImageAddress
)); ));
@ -150,7 +150,7 @@ UpdateMmFoundationPeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Ignoring section %d of image at 0x%lx with 0x%x permissions\n", "%a: Ignoring section %d of image at 0x%lx with 0x%x permissions\n",
__FUNCTION__, __func__,
Index, Index,
ImageContext->ImageAddress, ImageContext->ImageAddress,
SectionHeader.Characteristics SectionHeader.Characteristics
@ -251,7 +251,7 @@ GetPeCoffSectionInformation (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: PeCoffLoaderGetImageInfo () failed (Status == %r)\n", "%a: PeCoffLoaderGetImageInfo () failed (Status == %r)\n",
__FUNCTION__, __func__,
Status Status
)); ));
return Status; return Status;
@ -266,7 +266,7 @@ GetPeCoffSectionInformation (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: non-TE Image at 0x%lx has SectionAlignment < 4 KB (%lu)\n", "%a: non-TE Image at 0x%lx has SectionAlignment < 4 KB (%lu)\n",
__FUNCTION__, __func__,
ImageContext->ImageAddress, ImageContext->ImageAddress,
ImageContext->SectionAlignment ImageContext->SectionAlignment
)); ));
@ -296,7 +296,7 @@ GetPeCoffSectionInformation (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: TmpContext->ImageRead () failed (Status = %r)\n", "%a: TmpContext->ImageRead () failed (Status = %r)\n",
__FUNCTION__, __func__,
Status Status
)); ));
return Status; return Status;

View File

@ -95,7 +95,7 @@ MmMemLibInternalPopulateMmramRanges (
EFI_MMRAM_DESCRIPTOR *MmramDescriptors; EFI_MMRAM_DESCRIPTOR *MmramDescriptors;
HobStart = GetHobList (); HobStart = GetHobList ();
DEBUG ((DEBUG_INFO, "%a - 0x%x\n", __FUNCTION__, HobStart)); DEBUG ((DEBUG_INFO, "%a - 0x%x\n", __func__, HobStart));
// //
// Extract MM Core Private context from the Hob. If absent search for // Extract MM Core Private context from the Hob. If absent search for

View File

@ -55,7 +55,7 @@ UpdatePeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: PeCoffLoaderGetImageInfo () failed (Status = %r)\n", "%a: PeCoffLoaderGetImageInfo () failed (Status = %r)\n",
__FUNCTION__, __func__,
Status Status
)); ));
return Status; return Status;
@ -68,7 +68,7 @@ UpdatePeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: ignoring XIP TE image at 0x%lx\n", "%a: ignoring XIP TE image at 0x%lx\n",
__FUNCTION__, __func__,
ImageContext->ImageAddress ImageContext->ImageAddress
)); ));
return RETURN_SUCCESS; return RETURN_SUCCESS;
@ -84,7 +84,7 @@ UpdatePeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: non-TE Image at 0x%lx has SectionAlignment < 4 KB (%lu)\n", "%a: non-TE Image at 0x%lx has SectionAlignment < 4 KB (%lu)\n",
__FUNCTION__, __func__,
ImageContext->ImageAddress, ImageContext->ImageAddress,
TmpContext.SectionAlignment TmpContext.SectionAlignment
)); ));
@ -114,7 +114,7 @@ UpdatePeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: TmpContext.ImageRead () failed (Status = %r)\n", "%a: TmpContext.ImageRead () failed (Status = %r)\n",
__FUNCTION__, __func__,
Status Status
)); ));
return Status; return Status;
@ -156,7 +156,7 @@ UpdatePeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_ERROR, DEBUG_ERROR,
"%a: TmpContext.ImageRead () failed (Status = %r)\n", "%a: TmpContext.ImageRead () failed (Status = %r)\n",
__FUNCTION__, __func__,
Status Status
)); ));
return Status; return Status;
@ -169,7 +169,7 @@ UpdatePeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Mapping section %d of image at 0x%lx with RO-XN permissions and size 0x%x\n", "%a: Mapping section %d of image at 0x%lx with RO-XN permissions and size 0x%x\n",
__FUNCTION__, __func__,
Index, Index,
Base, Base,
SectionHeader.Misc.VirtualSize SectionHeader.Misc.VirtualSize
@ -179,7 +179,7 @@ UpdatePeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_WARN, DEBUG_WARN,
"%a: Mapping section %d of image at 0x%lx with RW-XN permissions and size 0x%x\n", "%a: Mapping section %d of image at 0x%lx with RW-XN permissions and size 0x%x\n",
__FUNCTION__, __func__,
Index, Index,
Base, Base,
SectionHeader.Misc.VirtualSize SectionHeader.Misc.VirtualSize
@ -189,7 +189,7 @@ UpdatePeCoffPermissions (
DEBUG (( DEBUG ((
DEBUG_INFO, DEBUG_INFO,
"%a: Mapping section %d of image at 0x%lx with RO-X permissions and size 0x%x\n", "%a: Mapping section %d of image at 0x%lx with RO-X permissions and size 0x%x\n",
__FUNCTION__, __func__,
Index, Index,
Base, Base,
SectionHeader.Misc.VirtualSize SectionHeader.Misc.VirtualSize