Re: [edk2-platforms][PATCH v1 1/1] MinPlatformPkg/TestPointCheckLib: Remove unnecessary GetVariable2() call


Oram, Isaac W
 

Reviewed-by: Isaac Oram <isaac.w.oram@...>

-----Original Message-----
From: mikuback@... <mikuback@...>
Sent: Friday, August 5, 2022 11:02 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel <chasel.chiu@...>; Desimone, Nathaniel L <nathaniel.l.desimone@...>; Oram, Isaac W <isaac.w.oram@...>; Gao, Liming <gaoliming@...>; Dong, Eric <eric.dong@...>
Subject: [edk2-platforms][PATCH v1 1/1] MinPlatformPkg/TestPointCheckLib: Remove unnecessary GetVariable2() call

From: Michael Kubacki <michael.kubacki@...>

The data buffer returned from the GetVariable2() call in
TestPointCheckMemoryTypeInformation() is not actually used or freed.

This change removes the unnecessary function call.

Cc: Chasel Chiu <chasel.chiu@...>
Cc: Nate DeSimone <nathaniel.l.desimone@...>
Cc: Isaac Oram <isaac.w.oram@...>
Cc: Liming Gao <gaoliming@...>
Cc: Eric Dong <eric.dong@...>
Signed-off-by: Michael Kubacki <michael.kubacki@...>
---
Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c | 8 --------
1 file changed, 8 deletions(-)

diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c
index 9ee9dd252c7e..0ff6789ac621 100644
--- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c
@@ -109,7 +109,6 @@ TestPointCheckMemoryTypeInformation (
EFI_HOB_GUID_TYPE *GuidHob;
VOID *CurrentMemoryTypeInformation;
VOID *PreviousMemoryTypeInformation;
- VOID *VariableMemoryTypeInformation;

DEBUG ((DEBUG_INFO, "==== TestPointCheckMemoryTypeInformation - Enter\n"));
CurrentMemoryTypeInformation = NULL;
@@ -128,13 +127,6 @@ TestPointCheckMemoryTypeInformation (
goto Done;
}

- GetVariable2 (
- EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME,
- &gEfiMemoryTypeInformationGuid,
- &VariableMemoryTypeInformation,
- NULL
- );
-
if ((CurrentMemoryTypeInformation != NULL) && (PreviousMemoryTypeInformation != NULL)) {
DumpMemoryTypeInfoSummary(CurrentMemoryTypeInformation, PreviousMemoryTypeInformation);
}
--
2.28.0.windows.1

Join devel@edk2.groups.io to automatically receive all group messages.