From: Min M Xu <min.m.xu@intel.com>
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4237
The handle of mChAcpiHandle is not needed for anything, beyond the
scope of the InstallCloudHvTablesTdx (). A local variable (ChAcpiHandle)
suffices for storing the handle.
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Sebastien Boeuf <sebastien.boeuf@intel.com>
Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
---
OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
index ad39e4253478..d849a59526b5 100644
--- a/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
+++ b/OvmfPkg/AcpiPlatformDxe/CloudHvAcpi.c
@@ -20,8 +20,6 @@
#include "AcpiPlatform.h"
-EFI_HANDLE mChAcpiHandle = NULL;
-
EFI_STATUS
EFIAPI
InstallCloudHvTablesTdx (
@@ -30,13 +28,15 @@ InstallCloudHvTablesTdx (
{
EFI_STATUS Status;
UINTN TableHandle;
+ EFI_HANDLE ChAcpiHandle;
EFI_PEI_HOB_POINTERS Hob;
EFI_ACPI_DESCRIPTION_HEADER *CurrentTable;
EFI_ACPI_DESCRIPTION_HEADER *DsdtTable;
- DsdtTable = NULL;
- TableHandle = 0;
+ DsdtTable = NULL;
+ TableHandle = 0;
+ ChAcpiHandle = NULL;
Hob.Guid = (EFI_HOB_GUID_TYPE *)GetFirstGuidHob (&gUefiOvmfPkgTdxAcpiHobGuid);
@@ -90,7 +90,7 @@ InstallCloudHvTablesTdx (
// ready.
//
gBS->InstallProtocolInterface (
- &mChAcpiHandle,
+ &ChAcpiHandle,
&gQemuAcpiTableNotifyProtocolGuid,
EFI_NATIVE_INTERFACE,
NULL
--
2.29.2.windows.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#98184): https://edk2.groups.io/g/devel/message/98184
Mute This Topic: https://groups.io/mt/96152529/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-