public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ray" <ray.ni@intel.com>
To: Rebecca Cran <rebecca@bsdio.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	"Gao, Liming" <gaoliming@byosoft.com.cn>,
	"Kinney, Michael D" <michael.d.kinney@intel.com>,
	"Jiang, Guomin" <guomin.jiang@intel.com>,
	"Xu, Wei6" <wei6.xu@intel.com>, "Dong, Guo" <guo.dong@intel.com>,
	"Rhodes, Sean" <sean@starlabs.systems>,
	"Lu, James" <james.lu@intel.com>, "Guo, Gua" <gua.guo@intel.com>,
	Andrew Fish <afish@apple.com>, "Wu, Hao A" <hao.a.wu@intel.com>,
	Maciej Rabeda <maciej.rabeda@linux.intel.com>,
	Siyuan Fu <siyuan.fu@intel.com>,
	"Yao, Jiewen" <jiewen.yao@intel.com>,
	"Wang, Jian J" <jian.j.wang@intel.com>,
	"Lu, Xiaoyu1" <xiaoyu1.lu@intel.com>,
	Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Sami Mujawar <sami.mujawar@arm.com>,
	Supreeth Venkatesh <supreeth.venkatesh@arm.com>,
	Michael Kubacki <mikuback@linux.microsoft.com>,
	"Desimone, Nathaniel L" <nathaniel.l.desimone@intel.com>,
	Sean Brogan <sean.brogan@microsoft.com>
Cc: Leif Lindholm <quic_llindhol@quicinc.com>,
	Abner Chang <abner.chang@amd.com>,
	Nickle Wang <nicklew@nvidia.com>,
	Igor Kulchytskyy <igork@ami.com>,
	Daniel Schaefer <git@danielschaefer.me>,
	"Xu, Min M" <min.m.xu@intel.com>,
	"Justen, Jordan L" <jordan.l.justen@intel.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	Peter Grehan <grehan@freebsd.org>,
	"Aktas, Erdem" <erdemaktas@google.com>,
	James Bottomley <jejb@linux.ibm.com>,
	"Tom Lendacky" <thomas.lendacky@amd.com>,
	Michael Roth <michael.roth@amd.com>,
	Sunil V L <sunilvl@ventanamicro.com>,
	"Warkentin, Andrei" <andrei.warkentin@intel.com>
Subject: Re: [PATCH 03/18] UefiCpuPkg: Update code to be more C11 compliant by using __func__
Date: Fri, 7 Apr 2023 03:09:29 +0000	[thread overview]
Message-ID: <MN6PR11MB8244B64051CFAAD9A6584FBF8C969@MN6PR11MB8244.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230406222319.2281263-4-rebecca@bsdio.com>

Reviewed-by: Ray Ni <ray.ni@intel.com>

> -----Original Message-----
> From: Rebecca Cran <rebecca@bsdio.com>
> Sent: Friday, April 7, 2023 6:23 AM
> To: devel@edk2.groups.io; Gao, Liming <gaoliming@byosoft.com.cn>;
> Kinney, Michael D <michael.d.kinney@intel.com>; Jiang, Guomin
> <guomin.jiang@intel.com>; Xu, Wei6 <wei6.xu@intel.com>; Dong, Guo
> <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Rhodes, Sean
> <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua
> <gua.guo@intel.com>; Andrew Fish <afish@apple.com>; Wu, Hao A
> <hao.a.wu@intel.com>; Maciej Rabeda <maciej.rabeda@linux.intel.com>;
> Siyuan Fu <siyuan.fu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>;
> Wang, Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>;
> Ard Biesheuvel <ardb+tianocore@kernel.org>; Sami Mujawar
> <sami.mujawar@arm.com>; Supreeth Venkatesh
> <supreeth.venkatesh@arm.com>; Michael Kubacki
> <mikuback@linux.microsoft.com>; Desimone, Nathaniel L
> <nathaniel.l.desimone@intel.com>; Sean Brogan
> <sean.brogan@microsoft.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>; Leif Lindholm
> <quic_llindhol@quicinc.com>; Abner Chang <abner.chang@amd.com>;
> Nickle Wang <nicklew@nvidia.com>; Igor Kulchytskyy <igork@ami.com>;
> Daniel Schaefer <git@danielschaefer.me>; Xu, Min M
> <min.m.xu@intel.com>; Justen, Jordan L <jordan.l.justen@intel.com>; Gerd
> Hoffmann <kraxel@redhat.com>; Peter Grehan <grehan@freebsd.org>;
> Aktas, Erdem <erdemaktas@google.com>; James Bottomley
> <jejb@linux.ibm.com>; Tom Lendacky <thomas.lendacky@amd.com>;
> Michael Roth <michael.roth@amd.com>; Sunil V L
> <sunilvl@ventanamicro.com>; Warkentin, Andrei
> <andrei.warkentin@intel.com>
> Subject: [PATCH 03/18] UefiCpuPkg: 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
> UefiCpuPkg.
> 
> Visual Studio versions before VS 2015 don't support __func__ and so
> will fail to compile. A workaround is to define __func__ as
> __FUNCTION__ :
> 
>   #define __func__ __FUNCTION__
> 
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
>  UefiCpuPkg/CpuDxe/CpuDxe.c                                                         |  8 ++++----
>  UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c                                                  |  6 +++---
>  UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c                                                |  2 +-
> 
> UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/CpuExceptionHan
> dlerLib.c      |  2 +-
> 
> UefiCpuPkg/Library/CpuExceptionHandlerLib/UnitTest/CpuExceptionHandler
> TestCommon.c |  2 +-
>  UefiCpuPkg/Library/MpInitLib/DxeMpLib.c                                            |  2 +-
>  UefiCpuPkg/Library/MpInitLib/Microcode.c                                           |  8 ++++---
> -
>  UefiCpuPkg/Library/MpInitLib/MpLib.c                                               |  2 +-
>  UefiCpuPkg/Library/MpInitLib/PeiMpLib.c                                            |  2 +-
>  UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c                                                  |  2 +-
>  UefiCpuPkg/SecCore/SecMain.c                                                       | 10 +++++-----
> 
> UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTest
> Commom.c    | 16 ++++++++--------
>  UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c                                  |  2
> +-
>  13 files changed, 32 insertions(+), 32 deletions(-)
> 
> diff --git a/UefiCpuPkg/CpuDxe/CpuDxe.c b/UefiCpuPkg/CpuDxe/CpuDxe.c
> index 3febd59d99e0..804ef5d1fe8e 100644
> --- a/UefiCpuPkg/CpuDxe/CpuDxe.c
> +++ b/UefiCpuPkg/CpuDxe/CpuDxe.c
> @@ -1078,7 +1078,7 @@ IntersectMemoryDescriptor (
>        EFI_ERROR (Status) ? DEBUG_ERROR : DEBUG_VERBOSE,
>        "%a: %a: add [%Lx, %Lx): %r\n",
>        gEfiCallerBaseName,
> -      __FUNCTION__,
> +      __func__,
>        IntersectionBase,
>        IntersectionEnd,
>        Status
> @@ -1091,7 +1091,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,
> @@ -1132,7 +1132,7 @@ AddMemoryMappedIoSpace (
>        DEBUG_ERROR,
>        "%a: %a: GetMemorySpaceMap(): %r\n",
>        gEfiCallerBaseName,
> -      __FUNCTION__,
> +      __func__,
>        Status
>        ));
>      return Status;
> @@ -1215,7 +1215,7 @@ AddLocalApicMemorySpace (
>        DEBUG_INFO,
>        "%a: %a: AllocateMemorySpace() Status - %r\n",
>        gEfiCallerBaseName,
> -      __FUNCTION__,
> +      __func__,
>        Status
>        ));
>    }
> diff --git a/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c
> b/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c
> index 7551e0653603..25fe3f54c325 100644
> --- a/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c
> +++ b/UefiCpuPkg/CpuDxeRiscV64/CpuDxe.c
> @@ -296,7 +296,7 @@ CpuSetMemoryAttributes (
>    IN UINT64                 Attributes
>    )
>  {
> -  DEBUG ((DEBUG_INFO, "%a: Set memory attributes not supported yet\n",
> __FUNCTION__));
> +  DEBUG ((DEBUG_INFO, "%a: Set memory attributes not supported yet\n",
> __func__));
>    return EFI_SUCCESS;
>  }
> 
> @@ -328,10 +328,10 @@ InitializeCpu (
>      return EFI_NOT_FOUND;
>    }
> 
> -  DEBUG ((DEBUG_INFO, " %a: Firmware Context is at 0x%x.\n",
> __FUNCTION__, FirmwareContext));
> +  DEBUG ((DEBUG_INFO, " %a: Firmware Context is at 0x%x.\n", __func__,
> FirmwareContext));
> 
>    mBootHartId = FirmwareContext->BootHartId;
> -  DEBUG ((DEBUG_INFO, " %a: mBootHartId = 0x%x.\n", __FUNCTION__,
> mBootHartId));
> +  DEBUG ((DEBUG_INFO, " %a: mBootHartId = 0x%x.\n", __func__,
> mBootHartId));
> 
>    InitializeCpuExceptionHandlers (NULL);
> 
> diff --git a/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
> b/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
> index 59a5d932eee2..86ce5303cab4 100644
> --- a/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
> +++ b/UefiCpuPkg/CpuS3DataDxe/CpuS3Data.c
> @@ -127,7 +127,7 @@ CpuS3DataOnEndOfDxe (
>                                                      );
>    ASSERT_EFI_ERROR (Status);
> 
> -  DEBUG ((DEBUG_VERBOSE, "%a\n", __FUNCTION__));
> +  DEBUG ((DEBUG_VERBOSE, "%a\n", __func__));
>    MtrrGetAllMtrrs (&AcpiCpuDataEx->MtrrTable);
> 
>    //
> diff --git
> a/UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/CpuExceptionHa
> ndlerLib.c
> b/UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/CpuExceptionHa
> ndlerLib.c
> index bce089feb0da..73a9dd57658c 100644
> ---
> a/UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/CpuExceptionHa
> ndlerLib.c
> +++
> b/UefiCpuPkg/Library/BaseRiscV64CpuExceptionHandlerLib/CpuExceptionHa
> ndlerLib.c
> @@ -230,7 +230,7 @@ RegisterCpuInterruptHandler (
>    IN EFI_CPU_INTERRUPT_HANDLER  InterruptHandler
>    )
>  {
> -  DEBUG ((DEBUG_INFO, "%a: Type:%x Handler: %x\n", __FUNCTION__,
> ExceptionType, InterruptHandler));
> +  DEBUG ((DEBUG_INFO, "%a: Type:%x Handler: %x\n", __func__,
> ExceptionType, InterruptHandler));
>    if (EXCEPT_RISCV_IS_IRQ (ExceptionType)) {
>      if (EXCEPT_RISCV_IRQ_INDEX (ExceptionType) >
> EXCEPT_RISCV_MAX_IRQS) {
>        return EFI_UNSUPPORTED;
> diff --git
> a/UefiCpuPkg/Library/CpuExceptionHandlerLib/UnitTest/CpuExceptionHandl
> erTestCommon.c
> b/UefiCpuPkg/Library/CpuExceptionHandlerLib/UnitTest/CpuExceptionHand
> lerTestCommon.c
> index 17afb592d3c8..9ba70c5b7340 100644
> ---
> a/UefiCpuPkg/Library/CpuExceptionHandlerLib/UnitTest/CpuExceptionHandl
> erTestCommon.c
> +++
> b/UefiCpuPkg/Library/CpuExceptionHandlerLib/UnitTest/CpuExceptionHand
> lerTestCommon.c
> @@ -292,7 +292,7 @@ GetBspStackBase (
>        DEBUG ((
>          DEBUG_INFO,
>          "%a: Bsp StackBase = 0x%016lx  StackSize = 0x%016lx\n",
> -        __FUNCTION__,
> +        __func__,
>          MemoryHob->AllocDescriptor.MemoryBaseAddress,
>          MemoryHob->AllocDescriptor.MemoryLength
>          ));
> diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
> b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
> index 330676b700d1..57ddb86600a7 100644
> --- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
> +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
> @@ -463,7 +463,7 @@ MpInitChangeApLoopCallback (
>        );
>    }
> 
> -  DEBUG ((DEBUG_INFO, "%a() done!\n", __FUNCTION__));
> +  DEBUG ((DEBUG_INFO, "%a() done!\n", __func__));
>  }
> 
>  /**
> diff --git a/UefiCpuPkg/Library/MpInitLib/Microcode.c
> b/UefiCpuPkg/Library/MpInitLib/Microcode.c
> index f9f070fa8bf2..11720560afee 100644
> --- a/UefiCpuPkg/Library/MpInitLib/Microcode.c
> +++ b/UefiCpuPkg/Library/MpInitLib/Microcode.c
> @@ -170,7 +170,7 @@ ShadowMicrocodePatchWorker (
>    DEBUG ((
>      DEBUG_INFO,
>      "%a: Required microcode patches have been loaded at 0x%lx, with size
> 0x%lx.\n",
> -    __FUNCTION__,
> +    __func__,
>      CpuMpData->MicrocodePatchAddress,
>      CpuMpData->MicrocodePatchRegionSize
>      ));
> @@ -305,7 +305,7 @@ ShadowMicrocodePatchByPcd (
>      DEBUG ((
>        DEBUG_INFO,
>        "%a: 0x%x microcode patches will be loaded into memory, with size
> 0x%x.\n",
> -      __FUNCTION__,
> +      __func__,
>        PatchCount,
>        TotalLoadSize
>        ));
> @@ -365,7 +365,7 @@ GetMicrocodePatchInfoFromHob (
> 
>    GuidHob = GetFirstGuidHob (&gEdkiiMicrocodePatchHobGuid);
>    if (GuidHob == NULL) {
> -    DEBUG ((DEBUG_INFO, "%a: Microcode patch cache HOB is not found.\n",
> __FUNCTION__));
> +    DEBUG ((DEBUG_INFO, "%a: Microcode patch cache HOB is not found.\n",
> __func__));
>      return FALSE;
>    }
> 
> @@ -377,7 +377,7 @@ GetMicrocodePatchInfoFromHob (
>    DEBUG ((
>      DEBUG_INFO,
>      "%a: MicrocodeBase = 0x%lx, MicrocodeSize = 0x%lx\n",
> -    __FUNCTION__,
> +    __func__,
>      *Address,
>      *RegionSize
>      ));
> diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c
> b/UefiCpuPkg/Library/MpInitLib/MpLib.c
> index e5dc852ed95f..f1f284071441 100644
> --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
> +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
> @@ -1537,7 +1537,7 @@ TimedWaitForApFinish (
>      DEBUG ((
>        DEBUG_VERBOSE,
>        "%a: reached FinishedApLimit=%u in %Lu microseconds\n",
> -      __FUNCTION__,
> +      __func__,
>        FinishedApLimit,
>        DivU64x64Remainder (
>          MultU64x32 (CpuMpData->TotalTime, 1000000),
> diff --git a/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
> b/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
> index e732371ddd21..013f89b197d0 100644
> --- a/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
> +++ b/UefiCpuPkg/Library/MpInitLib/PeiMpLib.c
> @@ -758,7 +758,7 @@ PlatformShadowMicrocode (
>    DEBUG ((
>      DEBUG_INFO,
>      "%a: Required microcode patches have been loaded at 0x%lx, with size
> 0x%lx.\n",
> -    __FUNCTION__,
> +    __func__,
>      CpuMpData->MicrocodePatchAddress,
>      CpuMpData->MicrocodePatchRegionSize
>      ));
> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
> b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
> index 240eee6a7d2f..0f7ee0372dbd 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c
> @@ -932,7 +932,7 @@ InitSmmS3ResumeState (
>      DEBUG ((
>        DEBUG_ERROR,
>        "ERROR:%a(): HOB(gEfiAcpiVariableGuid=%g) needed by S3 resume
> doesn't exist!\n",
> -      __FUNCTION__,
> +      __func__,
>        &gEfiAcpiVariableGuid
>        ));
>      CpuDeadLoop ();
> diff --git a/UefiCpuPkg/SecCore/SecMain.c
> b/UefiCpuPkg/SecCore/SecMain.c
> index fe03d8019a40..95375850ec76 100644
> --- a/UefiCpuPkg/SecCore/SecMain.c
> +++ b/UefiCpuPkg/SecCore/SecMain.c
> @@ -170,7 +170,7 @@ SecStartup (
>    DEBUG ((
>      DEBUG_INFO,
>      "%a() TempRAM Base: 0x%x, TempRAM Size: 0x%x, BootFirmwareVolume
> 0x%x\n",
> -    __FUNCTION__,
> +    __func__,
>      TempRamBase,
>      SizeOfRam,
>      BootFirmwareVolume
> @@ -242,7 +242,7 @@ SecStartup (
>    DEBUG ((
>      DEBUG_INFO,
>      "%a() BFV Base: 0x%x, BFV Size: 0x%x, TempRAM Base: 0x%x, TempRAM
> Size: 0x%x, PeiTempRamBase: 0x%x, PeiTempRamSize: 0x%x, StackBase:
> 0x%x, StackSize: 0x%x\n",
> -    __FUNCTION__,
> +    __func__,
>      SecCoreData.BootFirmwareVolumeBase,
>      SecCoreData.BootFirmwareVolumeSize,
>      SecCoreData.TemporaryRamBase,
> @@ -345,7 +345,7 @@ SecStartupPhase2 (
>    DEBUG ((
>      DEBUG_INFO,
>      "%a() PeiCoreEntryPoint: 0x%x\n",
> -    __FUNCTION__,
> +    __func__,
>      PeiCoreEntryPoint
>      ));
> 
> @@ -394,7 +394,7 @@ SecStartupPhase2 (
>      DEBUG ((
>        DEBUG_INFO,
>        "%a() PeiTemporaryRamBase: 0x%x, PeiTemporaryRamSize: 0x%x\n",
> -      __FUNCTION__,
> +      __func__,
>        SecCoreData->PeiTemporaryRamBase,
>        SecCoreData->PeiTemporaryRamSize
>        ));
> @@ -408,7 +408,7 @@ SecStartupPhase2 (
>    DEBUG ((
>      DEBUG_INFO,
>      "%a() Stack Base: 0x%p, Stack Size: 0x%x\n",
> -    __FUNCTION__,
> +    __func__,
>      SecCoreData->StackBase,
>      (UINT32)SecCoreData->StackSize
>      ));
> diff --git
> a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTe
> stCommom.c
> b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitT
> estCommom.c
> index ff79c5e8d43b..7cd3f48d761f 100644
> ---
> a/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitTe
> stCommom.c
> +++
> b/UefiCpuPkg/Test/UnitTest/EfiMpServicesPpiProtocol/EfiMpServicesUnitT
> estCommom.c
> @@ -45,7 +45,7 @@ InitUTContext (
> 
>    Status = MpServicesUnitTestWhoAmI (LocalContext->MpServices,
> &BspNumber);
>    UT_ASSERT_NOT_EFI_ERROR (Status);
> -  DEBUG ((DEBUG_INFO, "%a: BspNumber = 0x%x\n", __FUNCTION__,
> BspNumber));
> +  DEBUG ((DEBUG_INFO, "%a: BspNumber = 0x%x\n", __func__,
> BspNumber));
> 
>    Status = MpServicesUnitTestGetNumberOfProcessors (
>               LocalContext->MpServices,
> @@ -56,7 +56,7 @@ InitUTContext (
>    DEBUG ((
>      DEBUG_INFO,
>      "%a: NumberOfProcessors = 0x%x, NumberOfEnabledProcessors =
> 0x%x\n",
> -    __FUNCTION__,
> +    __func__,
>      NumberOfProcessors,
>      NumberOfEnabledProcessors
>      ));
> @@ -89,7 +89,7 @@ InitUTContext (
>          LocalContext->DisabledApNumber[IndexOfDisabledAPs] =
> ProcessorNumber;
>          IndexOfDisabledAPs++;
> 
> -        DEBUG ((DEBUG_INFO, "%a: AP(0x%x) is disabled and temporarily
> enable it.\n", __FUNCTION__, ProcessorNumber));
> +        DEBUG ((DEBUG_INFO, "%a: AP(0x%x) is disabled and temporarily
> enable it.\n", __func__, ProcessorNumber));
>          Status = MpServicesUnitTestEnableDisableAP (
>                     LocalContext->MpServices,
>                     ProcessorNumber,
> @@ -134,7 +134,7 @@ CheckUTContext (
> 
>    if (BspNumber != LocalContext->BspNumber) {
>      LocalContext->BspNumber = BspNumber;
> -    DEBUG ((DEBUG_INFO, "%a: New BspNumber = 0x%x\n",
> __FUNCTION__, BspNumber));
> +    DEBUG ((DEBUG_INFO, "%a: New BspNumber = 0x%x\n", __func__,
> BspNumber));
>    }
> 
>    ASSERT (BspNumber == LocalContext->BspNumber);
> @@ -148,11 +148,11 @@ CheckUTContext (
> 
>    if (NumberOfProcessors != LocalContext->NumberOfProcessors) {
>      LocalContext->NumberOfProcessors = NumberOfProcessors;
> -    DEBUG ((DEBUG_INFO, "%a: New NumberOfProcessors = 0x%x\n",
> __FUNCTION__, NumberOfProcessors));
> +    DEBUG ((DEBUG_INFO, "%a: New NumberOfProcessors = 0x%x\n",
> __func__, NumberOfProcessors));
>    }
> 
>    if (NumberOfEnabledProcessors != LocalContext->NumberOfProcessors) {
> -    DEBUG ((DEBUG_INFO, "%a: New NumberOfEnabledProcessors =
> 0x%x\n", __FUNCTION__, NumberOfEnabledProcessors));
> +    DEBUG ((DEBUG_INFO, "%a: New NumberOfEnabledProcessors =
> 0x%x\n", __func__, NumberOfEnabledProcessors));
> 
>      for (ProcessorNumber = 0; ProcessorNumber < LocalContext-
> >NumberOfProcessors; ProcessorNumber++) {
>        Status = MpServicesUnitTestGetProcessorInfo (
> @@ -163,7 +163,7 @@ CheckUTContext (
>        ASSERT_EFI_ERROR (Status);
> 
>        if (!(ProcessorInfoBuffer.StatusFlag & PROCESSOR_ENABLED_BIT)) {
> -        DEBUG ((DEBUG_INFO, "%a: AP(0x%x) is disabled unexpectedly and
> reenable it.\n", __FUNCTION__, ProcessorNumber));
> +        DEBUG ((DEBUG_INFO, "%a: AP(0x%x) is disabled unexpectedly and
> reenable it.\n", __func__, ProcessorNumber));
>          Status = MpServicesUnitTestEnableDisableAP (
>                     LocalContext->MpServices,
>                     ProcessorNumber,
> @@ -204,7 +204,7 @@ FreeUTContext (
>        DEBUG ((
>          DEBUG_INFO,
>          "%a: Disable AP(0x%x) to restore its state.\n",
> -        __FUNCTION__,
> +        __func__,
>          LocalContext->DisabledApNumber[IndexOfDisabledAPs]
>          ));
> 
> diff --git a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
> b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
> index e82f179569e9..9ea5f6f4e5e5 100644
> --- a/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
> +++ b/UefiCpuPkg/Universal/Acpi/S3Resume2Pei/S3Resume.c
> @@ -509,7 +509,7 @@ S3ResumeBootOs (
>      DEBUG ((
>        DEBUG_INFO,
>        "%a() Stack Base: 0x%x, Stack Size: 0x%x\n",
> -      __FUNCTION__,
> +      __func__,
>        TempStackTop,
>        sizeof (TempStack)
>        ));
> --
> 2.34.1


  reply	other threads:[~2023-04-07  3:09 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 22:23 [PATCH 00/18] Replace pre-standard macro __FUNCTION__ with C99 __func__ throughout edk2 Rebecca Cran
2023-04-06 22:23 ` [PATCH 01/18] ArmPkg: Update code to be more C11 compliant by using __func__ Rebecca Cran
2023-04-07 20:18   ` [edk2-devel] " Michael D Kinney
2023-04-06 22:23 ` [PATCH 02/18] ArmVirtPkg: " Rebecca Cran
2023-04-06 22:23 ` [PATCH 03/18] UefiCpuPkg: " Rebecca Cran
2023-04-07  3:09   ` Ni, Ray [this message]
2023-04-07 11:24   ` Sunil V L
2023-04-06 22:23 ` [PATCH 04/18] OvmfPkg: " Rebecca Cran
2023-04-07 11:19   ` Sunil V L
2023-04-06 22:23 ` [PATCH 05/18] MdeModulePkg: " Rebecca Cran
2023-04-06 22:23 ` [PATCH 06/18] SecurityPkg: " Rebecca Cran
2023-04-06 22:23 ` [PATCH 07/18] EmbeddedPkg: " Rebecca Cran
2023-04-07  8:25   ` Chang, Abner
2023-04-06 22:23 ` [PATCH 08/18] RedfishPkg: " Rebecca Cran
2023-04-07  5:39   ` Nickle Wang
2023-04-06 22:23 ` [PATCH 09/18] ArmPlatformPkg: " Rebecca Cran
2023-04-06 22:23 ` [PATCH 10/18] UnitTestFrameworkPkg: Update " Rebecca Cran
2023-04-06 22:23 ` [PATCH 11/18] PrmPkg: Update code " Rebecca Cran
2023-04-06 22:23 ` [PATCH 12/18] StandaloneMmPkg: " Rebecca Cran
2023-04-06 22:23 ` [PATCH 13/18] CryptoPkg: " Rebecca Cran
2023-04-06 22:23 ` [PATCH 14/18] NetworkPkg: " Rebecca Cran
2023-04-06 22:23 ` [PATCH 15/18] SourceLevelDebugPkg: " Rebecca Cran
2023-04-07  3:08   ` Ni, Ray
2023-04-06 22:23 ` [PATCH 16/18] EmulatorPkg: " Rebecca Cran
2023-04-07  3:08   ` Ni, Ray
2023-04-07  8:23   ` Chang, Abner
2023-04-06 22:23 ` [PATCH 17/18] UefiPayloadPkg: " Rebecca Cran
2023-04-07  5:57   ` Guo, Gua
2023-04-07  7:55   ` Lu, James
2023-04-06 22:23 ` [PATCH 18/18] FmpDevicePkg: " Rebecca Cran
2023-04-10  1:05   ` Xu, Wei6
2023-04-07 10:09 ` [edk2-devel] [PATCH 00/18] Replace pre-standard macro __FUNCTION__ with C99 __func__ throughout edk2 Ard Biesheuvel
2023-04-10 14:21 ` Rebecca Cran
2023-04-11  9:15 ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN6PR11MB8244B64051CFAAD9A6584FBF8C969@MN6PR11MB8244.namprd11.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox