mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
f81273f7fb
commit
165f1e4936
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue