From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by mx.groups.io with SMTP id smtpd.web11.62679.1679535997241439760 for ; Wed, 22 Mar 2023 18:46:37 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@bsdio.com header.s=fm3 header.b=lLRATRk3; spf=pass (domain: bsdio.com, ip: 64.147.123.25, mailfrom: rebecca@bsdio.com) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id C59173200645; Wed, 22 Mar 2023 21:46:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 22 Mar 2023 21:46:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdio.com; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1679535995; x=1679622395; bh=XvK+BEnosU5TH6vx4lxs0xsl9ePKM07lFsf jO7IT85Y=; b=lLRATRk3A/6cUHP88FyrPK7WO/CcxuHQiWuQfjaYTnkv8RCpvpo bUUWQs3Rh7hvgXj2//3/5ybSimmBvTwn/JdyUrT7ryweg2wt1TF2DFu+seHw7/FY GbQT9q21k9xNXPgdwu4DJb6SJU2FBKki3qmRALisUjfVp2iz4G/1Ek5coin/BT/P 7bmQbb5hiBYuEB4UW/ZWFoq6AlH499gSEYH6xInRSqio9Ismf4911IbuSzX44/Bt K+svwvxnKSROg7mTFBKF4acRGMdjFfftShsUIBScpSjCvyAFzmQCP9QMcUhYoPV7 mpU6Gr535VkjAh9zXxf4rQ7xRQoZ0khU4yQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1679535995; x= 1679622395; bh=XvK+BEnosU5TH6vx4lxs0xsl9ePKM07lFsfjO7IT85Y=; b=E oBj5rsVWadGZSHi1M/s0HVxvIjfpdUWvMryNnFhu3bmJ5ljTnaXK7eMW/NUVK17x Q+L5UHY/2L3hAm3YSEJVNuR9QRDsnObuwQa/l/SNt59mu5XX6ZH2IgBRnQi3kbyU KCR6pMW4fxwouLzj38Hl5ek54zOprrUICIqrK1N+PfYW6qYdY3zm7dS0IDKICg9i blAoE5tPX9l8UBka6i57pY3CB5LHNIvxUwqcnzpVptA7uRFlL6NB+4QU3yUSTTFP KEARVAhaxcaoDDRJwChO2fW0xgCQlWaMvWKDidruZTcCHL14mYETmLbNx92IMkOz 5iZc/2M0hriEKd6EOnl7Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdegfedgfeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthekredttdefjeenucfhrhhomheptfgvsggv tggtrgcuvehrrghnuceorhgvsggvtggtrgessghsughiohdrtghomheqnecuggftrfgrth htvghrnhepueehffegfeeluedufefffeejieeugeegvdefgffhueetheeuheegieeftddu feehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprh gvsggvtggtrgessghsughiohdrtghomh X-ME-Proxy: Feedback-ID: i5b994698:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Mar 2023 21:46:33 -0400 (EDT) Message-ID: Date: Wed, 22 Mar 2023 19:46:32 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [edk2-devel] [PATCH 2/2] MdePkg: Update code to be more C11 compliant by using __func__ To: "Huang, Yanbo" , "devel@edk2.groups.io" , "Kinney, Michael D" , "Gao, Liming" , "Liu, Zhiguang" , Michael Kubacki , Sean Brogan References: <20230209154507.81877-1-rebecca@quicinc.com> <20230209154507.81877-2-rebecca@quicinc.com> <86eae547-ffc8-de80-09d1-4b105f12a20a@bsdio.com> From: "Rebecca Cran" In-Reply-To: Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sorry, I didn't realize there were people still using older builds of VS 2015. -- Rebecca Cran On 3/22/23 7:43 PM, Huang, Yanbo wrote: > Hi Rebecca, > > The commit message “Visual Studio versions before VS 2015 don't support __func__” may cause confuse since some of the older release of VS2015 also do not support __func__. > Some of my fellows report the error since they use the VS 2015 version before Update 3. > > Best Regards, > Yanbo Huang > > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Michael D Kinney > Sent: Thursday, March 23, 2023 8:58 AM > To: devel@edk2.groups.io; rebecca@bsdio.com; Gao, Liming ; Liu, Zhiguang ; Michael Kubacki ; Sean Brogan > Cc: Kinney, Michael D > Subject: Re: [edk2-devel] [PATCH 2/2] MdePkg: Update code to be more C11 compliant by using __func__ > > Hi Rebecca, > > Using latest release would be my preference as well and what EDK II should recommend. > > We should document that the min supported version of VS2015 Update 3. > > Mike > >> -----Original Message----- >> From: devel@edk2.groups.io On Behalf Of Rebecca >> Cran >> Sent: Wednesday, March 22, 2023 10:46 AM >> To: Kinney, Michael D ; >> devel@edk2.groups.io; Gao, Liming ; Liu, >> Zhiguang ; Michael Kubacki >> ; Sean Brogan >> >> Subject: Re: [edk2-devel] [PATCH 2/2] MdePkg: Update code to be more >> C11 compliant by using __func__ >> >> Can we not require that VS2015 Update 3 is installed? >> >> Do people have reasons to be running older builds, or is it just that >> they forget to install the updates? >> >> >> -- >> Rebecca Cran >> >> >> On 3/22/23 10:58 AM, Kinney, Michael D wrote: >>> Hi Rebecca, >>> >>> It appears that some of the older release of VS2015 do not support >>> __func__. >>> >>> Can you please work on a patch that implements the workaround? >>> >>> Thanks, >>> >>> Mike >>> >>>> -----Original Message----- >>>> From: Kinney, Michael D >>>> Sent: Friday, March 17, 2023 8:16 AM >>>> To: devel@edk2.groups.io; rebecca@bsdio.com; Gao, Liming >>>> ; Liu, Zhiguang ; >>>> Michael Kubacki ; Sean Brogan >>>> >>>> Cc: Kinney, Michael D >>>> Subject: RE: [edk2-devel] [PATCH 2/2] MdePkg: Update code to be >>>> more C11 compliant by using __func__ >>>> >>>> Hi Rebecca, >>>> >>>> For older compilers that do not support __func__, I believe a >>>> workaround could be added to define __func__ to __FUNCTION__. We >>>> do not need to do this for any of these patches. It can be >>>> something consumers can do if they really want to use an older compiler. >>>> >>>> You can try it out on VS2012 locally. If it works, then you can >>>> mention that workaround in the commit message. >>>> >>>> Do we have any information on GCC/CLANG compatibility for this feature? >>>> >>>> Mike >>>> >>>>> -----Original Message----- >>>>> From: devel@edk2.groups.io On Behalf Of >>>>> Rebecca Cran >>>>> Sent: Friday, March 17, 2023 6:32 AM >>>>> To: Kinney, Michael D ; >>>>> devel@edk2.groups.io; Gao, Liming ; Liu, >> Zhiguang >>>>> ; Michael Kubacki >>>>> ; Sean Brogan >>>>> >>>>> Subject: Re: [edk2-devel] [PATCH 2/2] MdePkg: Update code to be >>>>> more C11 compliant by using __func__ >>>>> >>>>> (+Michael Kubacki, Sean Brogan) >>>>> >>>>> Mike, Michael, Sean: >>>>> >>>>> >>>>> This change is going to break building edk2 with anything older >>>>> than Visual Studio 2015, which is where support for __func__ was added. >>>>> >>>>> I checked and currently it appears that VS2013 builds edk2 but >>>>> VS2012 has errors. Given that the stuart tools don't support >>>>> anything older than VS2017 I'm thinking this is okay, but I want >>>>> to double check before pushing this change. >>>>> >>>>> >>>>> -- >>>>> >>>>> Rebecca Cran >>>>> >>>>> >>>>> On 3/14/23 2:40 PM, Kinney, Michael D wrote: >>>>>> Reviewed-by: Michael D Kinney >>>>>> >>>>>> >>>>>>> -----Original Message----- >>>>>>> From: devel@edk2.groups.io On Behalf Of >>>>>>> Rebecca Cran >>>>>>> Sent: Monday, March 13, 2023 7:20 PM >>>>>>> To: devel@edk2.groups.io; Kinney, Michael D >>>>>>> ; Gao, Liming >>>>>>> ; Liu, Zhiguang >>>>>>> >>>>>>> Subject: Re: [edk2-devel] [PATCH 2/2] MdePkg: Update code to be >>>>>>> more C11 compliant by using __func__ >>>>>>> >>>>>>> Mike, >>>>>>> >>>>>>> >>>>>>> I think your concerns with this patch were addressed? >>>>>>> >>>>>>> Could you add a Reviewed-by please? >>>>>>> >>>>>>> >>>>>>> Thanks. >>>>>>> Rebecca >>>>>>> >>>>>>> >>>>>>> On 2/9/23 6:01 PM, Michael D Kinney wrote: >>>>>>>> Hi Rebecca, >>>>>>>> >>>>>>>> Did this pass EDK II CI? >>>>>>>> >>>>>>>> This change does break EBC compiler builds. The following has >>>>>>>> to be added to MdePkg/Include/Ebc/ProcessorBind.h in order to use __func__ everywhere. >>>>>>>> >>>>>>>> #define __func__ __FUNCTION__ >>>>>>>> >>>>>>>> I also see __FUNCTION__ used in many packages. I am wondering >>>>>>>> if we want to do this clean up if it should be its own patch >>>>>>>> series and update all packages in once series. >>>>>>>> >>>>>>>> Mike >>>>>>>> >>>>>>>>> -----Original Message----- >>>>>>>>> From: devel@edk2.groups.io On Behalf Of >>>>>>>>> Rebecca Cran >>>>>>>>> Sent: Thursday, February 9, 2023 7:45 AM >>>>>>>>> To: devel@edk2.groups.io; Kinney, Michael D >>>>>>>>> ; Gao, Liming >>>>>>>>> ; >>>>>>> Liu, Zhiguang >>>>>>>>> >>>>>>>>> Cc: Rebecca Cran >>>>>>>>> Subject: [edk2-devel] [PATCH 2/2] MdePkg: 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 MdePkg. >>>>>>>>> >>>>>>>>> Signed-off-by: Rebecca Cran >>>>>>>>> --- >>>>>>>>> MdePkg/Include/Library/PerformanceLib.h | 12 ++++++------ >>>>>>>>> MdePkg/Include/Library/UnitTestLib.h | 18 +++++++++------ >>>>>>> --- >>>>>>>>> MdePkg/Library/BaseCacheMaintenanceLib/LoongArchCache.c | 6 +++--- >>>>>>>>> MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c | 12 ++++++------ >>>>>>>>> MdePkg/Library/BaseLib/SafeString.c | 2 +- >>>>>>>>> MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.c | 4 ++-- >>>>>>>>> MdePkg/Library/DxeRngLib/DxeRngLib.c | 14 +++++++------- >>>>>>>>> 7 files changed, 34 insertions(+), 34 deletions(-) >>>>>>>>> >>>>>>>>> diff --git a/MdePkg/Include/Library/PerformanceLib.h >>>>>>>>> b/MdePkg/Include/Library/PerformanceLib.h >>>>>>>>> index 34ec956b9c0e..d0f2dfb070d5 100644 >>>>>>>>> --- a/MdePkg/Include/Library/PerformanceLib.h >>>>>>>>> +++ b/MdePkg/Include/Library/PerformanceLib.h >>>>>>>>> @@ -526,7 +526,7 @@ LogPerformanceMeasurement ( >>>>>>>>> #define PERF_EVENT_SIGNAL_BEGIN(EventGuid) \ >>>>>>>>> do { \ >>>>>>>>> if (LogPerformanceMeasurementEnabled (PERF_GENERAL_TYPE)) { \ >>>>>>>>> - LogPerformanceMeasurement (&gEfiCallerIdGuid, EventGuid, __FUNCTION__ , 0, PERF_EVENTSIGNAL_START_ID); \ >>>>>>>>> + LogPerformanceMeasurement (&gEfiCallerIdGuid, >>>>>>>>> + EventGuid, __func__ , 0, PERF_EVENTSIGNAL_START_ID); \ >>>>>>>>> } \ >>>>>>>>> } while (FALSE) >>>>>>>>> >>>>>>>>> @@ -542,7 +542,7 @@ LogPerformanceMeasurement ( >>>>>>>>> #define PERF_EVENT_SIGNAL_END(EventGuid) \ >>>>>>>>> do { \ >>>>>>>>> if (LogPerformanceMeasurementEnabled (PERF_GENERAL_TYPE)) { \ >>>>>>>>> - LogPerformanceMeasurement (&gEfiCallerIdGuid, EventGuid, __FUNCTION__ , 0, PERF_EVENTSIGNAL_END_ID); \ >>>>>>>>> + LogPerformanceMeasurement (&gEfiCallerIdGuid, >>>>>>>>> + EventGuid, __func__ , 0, PERF_EVENTSIGNAL_END_ID); \ >>>>>>>>> } \ >>>>>>>>> } while (FALSE) >>>>>>>>> >>>>>>>>> @@ -558,7 +558,7 @@ LogPerformanceMeasurement ( >>>>>>>>> #define PERF_CALLBACK_BEGIN(TriggerGuid) \ >>>>>>>>> do { \ >>>>>>>>> if (LogPerformanceMeasurementEnabled (PERF_GENERAL_TYPE)) { \ >>>>>>>>> - LogPerformanceMeasurement (&gEfiCallerIdGuid, TriggerGuid, __FUNCTION__ , 0, PERF_CALLBACK_START_ID); \ >>>>>>>>> + LogPerformanceMeasurement (&gEfiCallerIdGuid, >>>>>>>>> + TriggerGuid, __func__ , 0, PERF_CALLBACK_START_ID); \ >>>>>>>>> } \ >>>>>>>>> } while (FALSE) >>>>>>>>> >>>>>>>>> @@ -574,7 +574,7 @@ LogPerformanceMeasurement ( >>>>>>>>> #define PERF_CALLBACK_END(TriggerGuid) \ >>>>>>>>> do { \ >>>>>>>>> if (LogPerformanceMeasurementEnabled (PERF_GENERAL_TYPE)) { \ >>>>>>>>> - LogPerformanceMeasurement (&gEfiCallerIdGuid, TriggerGuid, __FUNCTION__ , 0, PERF_CALLBACK_END_ID); \ >>>>>>>>> + LogPerformanceMeasurement (&gEfiCallerIdGuid, >>>>>>>>> + TriggerGuid, __func__ , 0, PERF_CALLBACK_END_ID); \ >>>>>>>>> } \ >>>>>>>>> } while (FALSE) >>>>>>>>> >>>>>>>>> @@ -589,7 +589,7 @@ LogPerformanceMeasurement ( >>>>>>>>> #define PERF_FUNCTION_BEGIN() \ >>>>>>>>> do { \ >>>>>>>>> if (LogPerformanceMeasurementEnabled (PERF_GENERAL_TYPE)) { \ >>>>>>>>> - LogPerformanceMeasurement (&gEfiCallerIdGuid, NULL, __FUNCTION__ , 0, PERF_FUNCTION_START_ID); \ >>>>>>>>> + LogPerformanceMeasurement (&gEfiCallerIdGuid, NULL, >>>>>>>>> + __func__ , 0, PERF_FUNCTION_START_ID); \ >>>>>>>>> } \ >>>>>>>>> } while (FALSE) >>>>>>>>> >>>>>>>>> @@ -604,7 +604,7 @@ LogPerformanceMeasurement ( >>>>>>>>> #define PERF_FUNCTION_END() \ >>>>>>>>> do { \ >>>>>>>>> if (LogPerformanceMeasurementEnabled (PERF_GENERAL_TYPE)) { \ >>>>>>>>> - LogPerformanceMeasurement (&gEfiCallerIdGuid, NULL, __FUNCTION__ , 0, PERF_FUNCTION_END_ID); \ >>>>>>>>> + LogPerformanceMeasurement (&gEfiCallerIdGuid, NULL, >>>>>>>>> + __func__ , 0, PERF_FUNCTION_END_ID); \ >>>>>>>>> } \ >>>>>>>>> } while (FALSE) >>>>>>>>> >>>>>>>>> diff --git a/MdePkg/Include/Library/UnitTestLib.h >>>>>>>>> b/MdePkg/Include/Library/UnitTestLib.h >>>>>>>>> index 71c205b1b143..321a310602d7 100644 >>>>>>>>> --- a/MdePkg/Include/Library/UnitTestLib.h >>>>>>>>> +++ b/MdePkg/Include/Library/UnitTestLib.h >>>>>>>>> @@ -348,7 +348,7 @@ SaveFrameworkState ( >>>>>>>>> @param[in] Expression Expression to be evaluated for TRUE. >>>>>>>>> **/ >>>>>>>>> #define UT_ASSERT_TRUE(Expression) \ >>>>>>>>> - if(!UnitTestAssertTrue ((Expression), __FUNCTION__, >>>>>>>>> DEBUG_LINE_NUMBER, __FILE__, #Expression)) { \ >>>>>>>>> + if(!UnitTestAssertTrue ((Expression), __func__, >>>>>>>>> + DEBUG_LINE_NUMBER, __FILE__, #Expression)) { \ >>>>>>>>> return UNIT_TEST_ERROR_TEST_FAILED; \ >>>>>>>>> } >>>>>>>>> >>>>>>>>> @@ -360,7 +360,7 @@ SaveFrameworkState ( >>>>>>>>> @param[in] Expression Expression to be evaluated for FALSE. >>>>>>>>> **/ >>>>>>>>> #define UT_ASSERT_FALSE(Expression) \ >>>>>>>>> - if(!UnitTestAssertFalse ((Expression), __FUNCTION__, >>>>>>>>> DEBUG_LINE_NUMBER, __FILE__, #Expression)) { \ >>>>>>>>> + if(!UnitTestAssertFalse ((Expression), __func__, >>>>>>>>> + DEBUG_LINE_NUMBER, __FILE__, #Expression)) { \ >>>>>>>>> return UNIT_TEST_ERROR_TEST_FAILED; \ >>>>>>>>> } >>>>>>>>> >>>>>>>>> @@ -373,7 +373,7 @@ SaveFrameworkState ( >>>>>>>>> @param[in] ValueB Value to be compared for equality (64-bit comparison). >>>>>>>>> **/ >>>>>>>>> #define UT_ASSERT_EQUAL(ValueA, ValueB) >>>>>>> \ >>>>>>>>> - if(!UnitTestAssertEqual ((UINT64)(ValueA), >>>>>>>>> (UINT64)(ValueB), __FUNCTION__, DEBUG_LINE_NUMBER, __FILE__, >>>>>>> #ValueA, #ValueB)) { \ >>>>>>>>> + if(!UnitTestAssertEqual ((UINT64)(ValueA), >>>>>>>>> + (UINT64)(ValueB), __func__, DEBUG_LINE_NUMBER, __FILE__, >>>>>>>>> + #ValueA, >>>>>>> #ValueB)) { \ >>>>>>>>> return UNIT_TEST_ERROR_TEST_FAILED; >>>>>>> \ >>>>>>>>> } >>>>>>>>> >>>>>>>>> @@ -387,7 +387,7 @@ SaveFrameworkState ( >>>>>>>>> @param[in] Length Number of bytes to compare in BufferA and BufferB. >>>>>>>>> **/ >>>>>>>>> #define UT_ASSERT_MEM_EQUAL(BufferA, BufferB, Length) \ >>>>>>>>> - if(!UnitTestAssertMemEqual ((VOID *)(UINTN)(BufferA), (VOID >>>>>>>>> *)(UINTN)(BufferB), (UINTN)Length, __FUNCTION__, >>>>>>> DEBUG_LINE_NUMBER, >>>>>>>>> __FILE__, #BufferA, #BufferB)) { \ >>>>>>>>> + if(!UnitTestAssertMemEqual ((VOID *)(UINTN)(BufferA), (VOID >>>>>>>>> + *)(UINTN)(BufferB), (UINTN)Length, __func__, >>>>>>> DEBUG_LINE_NUMBER, >>>>>>>>> __FILE__, #BufferA, #BufferB)) { \ >>>>>>>>> return UNIT_TEST_ERROR_TEST_FAILED; \ >>>>>>>>> } >>>>>>>>> >>>>>>>>> @@ -400,7 +400,7 @@ SaveFrameworkState ( >>>>>>>>> @param[in] ValueB Value to be compared for inequality (64-bit comparison). >>>>>>>>> **/ >>>>>>>>> #define UT_ASSERT_NOT_EQUAL(ValueA, ValueB) >>>>>>> \ >>>>>>>>> - if(!UnitTestAssertNotEqual ((UINT64)(ValueA), >>>>>>>>> (UINT64)(ValueB), __FUNCTION__, DEBUG_LINE_NUMBER, __FILE__, >>>>>>> #ValueA, #ValueB)) { \ >>>>>>>>> + if(!UnitTestAssertNotEqual ((UINT64)(ValueA), >>>>>>>>> + (UINT64)(ValueB), __func__, DEBUG_LINE_NUMBER, __FILE__, >>>>>>> #ValueA, #ValueB)) { \ >>>>>>>>> return UNIT_TEST_ERROR_TEST_FAILED; >>>>>>> \ >>>>>>>>> } >>>>>>>>> >>>>>>>>> @@ -412,7 +412,7 @@ SaveFrameworkState ( >>>>>>>>> @param[in] Status EFI_STATUS value to check. >>>>>>>>> **/ >>>>>>>>> #define UT_ASSERT_NOT_EFI_ERROR(Status) \ >>>>>>>>> - if(!UnitTestAssertNotEfiError ((Status), __FUNCTION__, >>>>>>>>> DEBUG_LINE_NUMBER, __FILE__, #Status)) { \ >>>>>>>>> + if(!UnitTestAssertNotEfiError ((Status), __func__, >>>>>>>>> + DEBUG_LINE_NUMBER, __FILE__, #Status)) { \ >>>>>>>>> return UNIT_TEST_ERROR_TEST_FAILED; \ >>>>>>>>> } >>>>>>>>> >>>>>>>>> @@ -425,7 +425,7 @@ SaveFrameworkState ( >>>>>>>>> @param[in] Expected EFI_STATUS values to compare for equality. >>>>>>>>> **/ >>>>>>>>> #define UT_ASSERT_STATUS_EQUAL(Status, Expected) \ >>>>>>>>> - if(!UnitTestAssertStatusEqual ((Status), (Expected), >>>>>>>>> __FUNCTION__, DEBUG_LINE_NUMBER, __FILE__, #Status)) { \ >>>>>>>>> + if(!UnitTestAssertStatusEqual ((Status), (Expected), >>>>>>>>> + __func__, DEBUG_LINE_NUMBER, __FILE__, #Status)) { \ >>>>>>>>> return UNIT_TEST_ERROR_TEST_FAILED; \ >>>>>>>>> } >>>>>>>>> >>>>>>>>> @@ -437,7 +437,7 @@ SaveFrameworkState ( >>>>>>>>> @param[in] Pointer Pointer to be checked against NULL. >>>>>>>>> **/ >>>>>>>>> #define UT_ASSERT_NOT_NULL(Pointer) \ >>>>>>>>> - if(!UnitTestAssertNotNull ((Pointer), __FUNCTION__, >>>>>>>>> DEBUG_LINE_NUMBER, __FILE__, #Pointer)) { \ >>>>>>>>> + if(!UnitTestAssertNotNull ((Pointer), __func__, >>>>>>>>> + DEBUG_LINE_NUMBER, __FILE__, #Pointer)) { \ >>>>>>>>> return UNIT_TEST_ERROR_TEST_FAILED; \ >>>>>>>>> } >>>>>>>>> >>>>>>>>> @@ -482,7 +482,7 @@ extern BASE_LIBRARY_JUMP_BUFFER *gUnitTestExpectAssertFailureJumpBuffer; >>>>>>>>> } \ >>>>>>>>> if (!UnitTestExpectAssertFailure ( \ >>>>>>>>> UnitTestJumpStatus, \ >>>>>>>>> - __FUNCTION__, DEBUG_LINE_NUMBER, __FILE__, \ >>>>>>>>> + __func__, DEBUG_LINE_NUMBER, __FILE__, \ >>>>>>>>> #FunctionCall, Status)) { \ >>>>>>>>> return UNIT_TEST_ERROR_TEST_FAILED; \ >>>>>>>>> } \ >>>>>>>>> diff --git >>>>>>>>> a/MdePkg/Library/BaseCacheMaintenanceLib/LoongArchCache.c >>>>>>> b/MdePkg/Library/BaseCacheMaintenanceLib/LoongArchCache.c >>>>>>>>> index 4c8773278c3c..617b0f4218b8 100644 >>>>>>>>> --- a/MdePkg/Library/BaseCacheMaintenanceLib/LoongArchCache.c >>>>>>>>> +++ b/MdePkg/Library/BaseCacheMaintenanceLib/LoongArchCache.c >>>>>>>>> @@ -100,7 +100,7 @@ WriteBackInvalidateDataCache ( >>>>>>>>> VOID >>>>>>>>> ) >>>>>>>>> { >>>>>>>>> - DEBUG ((DEBUG_ERROR, "%a: Not currently implemented on >>>>>>>>> LoongArch.\n", __FUNCTION__)); >>>>>>>>> + DEBUG ((DEBUG_ERROR, "%a: Not currently implemented on >>>>>>>>> + LoongArch.\n", __func__)); >>>>>>>>> } >>>>>>>>> >>>>>>>>> /** >>>>>>>>> @@ -136,7 +136,7 @@ WriteBackInvalidateDataCacheRange ( >>>>>>>>> IN UINTN Length >>>>>>>>> ) >>>>>>>>> { >>>>>>>>> - DEBUG ((DEBUG_ERROR, "%a: Not currently implemented on >>>>>>>>> LoongArch.\n", __FUNCTION__)); >>>>>>>>> + DEBUG ((DEBUG_ERROR, "%a: Not currently implemented on >>>>>>>>> + LoongArch.\n", __func__)); >>>>>>>>> return Address; >>>>>>>>> } >>>>>>>>> >>>>>>>>> @@ -191,7 +191,7 @@ WriteBackDataCacheRange ( >>>>>>>>> IN UINTN Length >>>>>>>>> ) >>>>>>>>> { >>>>>>>>> - DEBUG ((DEBUG_ERROR, "%a: Not currently implemented on >>>>>>>>> LoongArch.\n", __FUNCTION__)); >>>>>>>>> + DEBUG ((DEBUG_ERROR, "%a: Not currently implemented on >>>>>>>>> + LoongArch.\n", __func__)); >>>>>>>>> return Address; >>>>>>>>> } >>>>>>>>> >>>>>>>>> diff --git >>>>>>>>> a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c >>>>>>> b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c >>>>>>>>> index 67a3387ff3c6..bb26fe013d8b 100644 >>>>>>>>> --- a/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c >>>>>>>>> +++ b/MdePkg/Library/BaseCacheMaintenanceLib/RiscVCache.c >>>>>>>>> @@ -76,7 +76,7 @@ InvalidateInstructionCacheRange ( >>>>>>>>> IN UINTN Length >>>>>>>>> ) >>>>>>>>> { >>>>>>>>> - DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", >>>>>>>>> __FUNCTION__)); >>>>>>>>> + DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", >>>>>>>>> + __func__)); >>>>>>>>> return Address; >>>>>>>>> } >>>>>>>>> >>>>>>>>> @@ -96,7 +96,7 @@ WriteBackInvalidateDataCache ( >>>>>>>>> VOID >>>>>>>>> ) >>>>>>>>> { >>>>>>>>> - DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", >>>>>>>>> __FUNCTION__)); >>>>>>>>> + DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", >>>>>>>>> + __func__)); >>>>>>>>> } >>>>>>>>> >>>>>>>>> /** >>>>>>>>> @@ -132,7 +132,7 @@ WriteBackInvalidateDataCacheRange ( >>>>>>>>> IN UINTN Length >>>>>>>>> ) >>>>>>>>> { >>>>>>>>> - DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", >>>>>>>>> __FUNCTION__)); >>>>>>>>> + DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", >>>>>>>>> + __func__)); >>>>>>>>> return Address; >>>>>>>>> } >>>>>>>>> >>>>>>>>> @@ -152,7 +152,7 @@ WriteBackDataCache ( >>>>>>>>> VOID >>>>>>>>> ) >>>>>>>>> { >>>>>>>>> - DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", >>>>>>>>> __FUNCTION__)); >>>>>>>>> + DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", >>>>>>>>> + __func__)); >>>>>>>>> } >>>>>>>>> >>>>>>>>> /** >>>>>>>>> @@ -187,7 +187,7 @@ WriteBackDataCacheRange ( >>>>>>>>> IN UINTN Length >>>>>>>>> ) >>>>>>>>> { >>>>>>>>> - DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", >>>>>>>>> __FUNCTION__)); >>>>>>>>> + DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", >>>>>>>>> + __func__)); >>>>>>>>> return Address; >>>>>>>>> } >>>>>>>>> >>>>>>>>> @@ -245,6 +245,6 @@ InvalidateDataCacheRange ( >>>>>>>>> IN UINTN Length >>>>>>>>> ) >>>>>>>>> { >>>>>>>>> - DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", >>>>>>>>> __FUNCTION__)); >>>>>>>>> + DEBUG ((DEBUG_ERROR, "%a:RISC-V unsupported function.\n", >>>>>>>>> + __func__)); >>>>>>>>> return Address; >>>>>>>>> } >>>>>>>>> diff --git a/MdePkg/Library/BaseLib/SafeString.c >>>>>>>>> b/MdePkg/Library/BaseLib/SafeString.c >>>>>>>>> index b75b33381732..954d3f8c8988 100644 >>>>>>>>> --- a/MdePkg/Library/BaseLib/SafeString.c >>>>>>>>> +++ b/MdePkg/Library/BaseLib/SafeString.c >>>>>>>>> @@ -17,7 +17,7 @@ >>>>>>>>> if (!(Expression)) { \ >>>>>>>>> DEBUG ((DEBUG_VERBOSE, \ >>>>>>>>> "%a(%d) %a: SAFE_STRING_CONSTRAINT_CHECK(%a) failed. Return %r\n", \ >>>>>>>>> - __FILE__, DEBUG_LINE_NUMBER, __FUNCTION__, DEBUG_EXPRESSION_STRING (Expression), Status)); \ >>>>>>>>> + __FILE__, DEBUG_LINE_NUMBER, __func__, >>>>>>>>> + DEBUG_EXPRESSION_STRING (Expression), Status)); \ >>>>>>>>> return Status; \ >>>>>>>>> } \ >>>>>>>>> } while (FALSE) >>>>>>>>> diff --git >>>>>>>>> a/MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrde >>>>>>>>> redCollectionRedBlackTreeLib.c >>>>>>>>> b/MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrde >>>>>>>>> redCollectionRedBlackTreeLib.c index >>>>>>>>> f47301de8982..a23113f9c91d 100644 >>>>>>>>> --- >>>>>>>>> a/MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrde >>>>>>>>> redCollectionRedBlackTreeLib.c >>>>>>>>> +++ b/MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/Base >>>>>>>>> +++ OrderedCollectionRedBlackTreeLib.c >>>>>>>>> @@ -1416,7 +1416,7 @@ RedBlackTreeValidate ( >>>>>>>>> CONST RED_BLACK_TREE_NODE *Last; >>>>>>>>> CONST RED_BLACK_TREE_NODE *Node; >>>>>>>>> >>>>>>>>> - DEBUG ((DEBUG_VERBOSE, "%a: Tree=%p\n", __FUNCTION__, >>>>>>>>> Tree)); >>>>>>>>> + DEBUG ((DEBUG_VERBOSE, "%a: Tree=%p\n", __func__, Tree)); >>>>>>>>> >>>>>>>>> // >>>>>>>>> // property #5 >>>>>>>>> @@ -1459,7 +1459,7 @@ RedBlackTreeValidate ( >>>>>>>>> DEBUG (( >>>>>>>>> DEBUG_VERBOSE, >>>>>>>>> "%a: Tree=%p BlackHeight=%Ld Count=%Ld\n", >>>>>>>>> - __FUNCTION__, >>>>>>>>> + __func__, >>>>>>>>> Tree, >>>>>>>>> (INT64)BlackHeight, >>>>>>>>> (INT64)ForwardCount >>>>>>>>> diff --git a/MdePkg/Library/DxeRngLib/DxeRngLib.c >>>>>>>>> b/MdePkg/Library/DxeRngLib/DxeRngLib.c >>>>>>>>> index 82129aa44598..46aea515924f 100644 >>>>>>>>> --- a/MdePkg/Library/DxeRngLib/DxeRngLib.c >>>>>>>>> +++ b/MdePkg/Library/DxeRngLib/DxeRngLib.c >>>>>>>>> @@ -37,43 +37,43 @@ GenerateRandomNumberViaNist800Algorithm ( >>>>>>>>> RngProtocol = NULL; >>>>>>>>> >>>>>>>>> if (Buffer == NULL) { >>>>>>>>> - DEBUG ((DEBUG_ERROR, "%a: Buffer == NULL.\n", __FUNCTION__)); >>>>>>>>> + DEBUG ((DEBUG_ERROR, "%a: Buffer == NULL.\n", __func__)); >>>>>>>>> return EFI_INVALID_PARAMETER; >>>>>>>>> } >>>>>>>>> >>>>>>>>> Status = gBS->LocateProtocol (&gEfiRngProtocolGuid, NULL, (VOID **)&RngProtocol); >>>>>>>>> if (EFI_ERROR (Status) || (RngProtocol == NULL)) { >>>>>>>>> - DEBUG ((DEBUG_ERROR, "%a: Could not locate RNG prototocol, Status = %r\n", __FUNCTION__, Status)); >>>>>>>>> + DEBUG ((DEBUG_ERROR, "%a: Could not locate RNG >>>>>>>>> + prototocol, Status = %r\n", __func__, Status)); >>>>>>>>> return Status; >>>>>>>>> } >>>>>>>>> >>>>>>>>> Status = RngProtocol->GetRNG (RngProtocol, >>>>>>>>> &gEfiRngAlgorithmSp80090Ctr256Guid, BufferSize, Buffer); >>>>>>>>> - DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm CTR-256 - Status >>>>>>>>> = %r\n", __FUNCTION__, Status)); >>>>>>>>> + DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm CTR-256 - Status >>>>>>>>> + = %r\n", __func__, Status)); >>>>>>>>> if (!EFI_ERROR (Status)) { >>>>>>>>> return Status; >>>>>>>>> } >>>>>>>>> >>>>>>>>> Status = RngProtocol->GetRNG (RngProtocol, >>>>>>>>> &gEfiRngAlgorithmSp80090Hmac256Guid, BufferSize, Buffer); >>>>>>>>> - DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm HMAC-256 - Status >>>>>>>>> = %r\n", __FUNCTION__, Status)); >>>>>>>>> + DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm HMAC-256 - Status >>>>>>>>> + = %r\n", __func__, Status)); >>>>>>>>> if (!EFI_ERROR (Status)) { >>>>>>>>> return Status; >>>>>>>>> } >>>>>>>>> >>>>>>>>> Status = RngProtocol->GetRNG (RngProtocol, >>>>>>>>> &gEfiRngAlgorithmSp80090Hash256Guid, BufferSize, Buffer); >>>>>>>>> - DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm Hash-256 - Status >>>>>>>>> = %r\n", __FUNCTION__, Status)); >>>>>>>>> + DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm Hash-256 - Status >>>>>>>>> + = %r\n", __func__, Status)); >>>>>>>>> if (!EFI_ERROR (Status)) { >>>>>>>>> return Status; >>>>>>>>> } >>>>>>>>> >>>>>>>>> // If all the other methods have failed, use the default method from the RngProtocol >>>>>>>>> Status = RngProtocol->GetRNG (RngProtocol, NULL, >>>>>>>>> BufferSize, Buffer); >>>>>>>>> - DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm Hash-256 - Status >>>>>>>>> = %r\n", __FUNCTION__, Status)); >>>>>>>>> + DEBUG ((DEBUG_INFO, "%a: GetRNG algorithm Hash-256 - Status >>>>>>>>> + = %r\n", __func__, Status)); >>>>>>>>> if (!EFI_ERROR (Status)) { >>>>>>>>> return Status; >>>>>>>>> } >>>>>>>>> >>>>>>>>> // If we get to this point, we have failed >>>>>>>>> - DEBUG ((DEBUG_ERROR, "%a: GetRNG() failed, staus = %r\n", >>>>>>>>> __FUNCTION__, Status)); >>>>>>>>> + DEBUG ((DEBUG_ERROR, "%a: GetRNG() failed, staus = %r\n", >>>>>>>>> + __func__, Status)); >>>>>>>>> >>>>>>>>> return Status; >>>>>>>>> }// GenerateRandomNumberViaNist800Algorithm() >>>>>>>>> -- >>>>>>>>> 2.30.2 >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>> >>>>> >> >> >> > > > > >