summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
diff options
context:
space:
mode:
authorMin M Xu <min.m.xu@intel.com>2023-01-11 09:22:32 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-01-15 10:26:15 +0000
commit165f1e49361a9a5f5936f2d582641096d0d7a2a2 (patch)
tree112659610a7e2cd7804d9ca7b476056c7dce231b /OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
parentf81273f7fbb3defbef43313ada8397bbc202a1d0 (diff)
downloadedk2-165f1e49361a9a5f5936f2d582641096d0d7a2a2.tar.gz
edk2-165f1e49361a9a5f5936f2d582641096d0d7a2a2.tar.bz2
edk2-165f1e49361a9a5f5936f2d582641096d0d7a2a2.zip
OvmfPkg/AcpiPlatformDxe: Use local variable in QemuFwCfgAcpi.c
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4237 The handle of mQemuAcpiHandle is not needed for anything, beyond the scope of the InstallQemuFwCfgTables(). So a local variable will suffice 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> Reported-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Min Xu <min.m.xu@intel.com> Message-Id: <20230111012235.189-4-min.m.xu@intel.com>
Diffstat (limited to 'OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c')
-rw-r--r--OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
index 1a3852904d..9711335c6c 100644
--- a/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
+++ b/OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpi.c
@@ -20,7 +20,6 @@
#include <Library/UefiBootServicesTableLib.h> // gBS
#include "AcpiPlatform.h"
-EFI_HANDLE mQemuAcpiHandle = NULL;
//
// The user structure for the ordered collection that will track the fw_cfg
@@ -1101,6 +1100,7 @@ InstallQemuFwCfgTables (
ORDERED_COLLECTION_ENTRY *TrackerEntry, *TrackerEntry2;
ORDERED_COLLECTION *SeenPointers;
ORDERED_COLLECTION_ENTRY *SeenPointerEntry, *SeenPointerEntry2;
+ EFI_HANDLE QemuAcpiHandle;
Status = QemuFwCfgFindFile ("etc/table-loader", &FwCfgItem, &FwCfgSize);
if (EFI_ERROR (Status)) {
@@ -1278,8 +1278,9 @@ UninstallAcpiTables:
// Install a protocol to notify that the ACPI table provided by Qemu is
// ready.
//
+ QemuAcpiHandle = NULL;
gBS->InstallProtocolInterface (
- &mQemuAcpiHandle,
+ &QemuAcpiHandle,
&gQemuAcpiTableNotifyProtocolGuid,
EFI_NATIVE_INTERFACE,
NULL