summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/XenAcpiPlatformDxe
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2021-05-26 22:14:18 +0200
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-06-04 16:01:50 +0000
commit3f975ee5706619d90cdb61e689b27181d7cc6d84 (patch)
treed356854fd6143cf74fd5eeee016aa5d1c138aa0c /OvmfPkg/XenAcpiPlatformDxe
parentd6ba8aa6ef628f5d865865e0aba4a329ee0d0728 (diff)
downloadedk2-3f975ee5706619d90cdb61e689b27181d7cc6d84.tar.gz
edk2-3f975ee5706619d90cdb61e689b27181d7cc6d84.tar.bz2
edk2-3f975ee5706619d90cdb61e689b27181d7cc6d84.zip
OvmfPkg/XenAcpiPlatformDxe: remove the InstallAcpiTable() helper function
The InstallAcpiTable() helper function buys us nothing. Reduce code complexity by removing the function. This patch is best viewed with "git show -b". Cc: Anthony Perard <anthony.perard@citrix.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Julien Grall <julien@xen.org> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=2122 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20210526201446.12554-16-lersek@redhat.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Diffstat (limited to 'OvmfPkg/XenAcpiPlatformDxe')
-rw-r--r--OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.c30
-rw-r--r--OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.h9
-rw-r--r--OvmfPkg/XenAcpiPlatformDxe/Xen.c60
3 files changed, 36 insertions, 63 deletions
diff --git a/OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.c b/OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.c
index 66dcf88585..daf2bf3f45 100644
--- a/OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.c
+++ b/OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.c
@@ -14,24 +14,6 @@
#include "AcpiPlatform.h"
-EFI_STATUS
-EFIAPI
-InstallAcpiTable (
- IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
- IN VOID *AcpiTableBuffer,
- IN UINTN AcpiTableBufferSize,
- OUT UINTN *TableKey
- )
-{
- return AcpiProtocol->InstallAcpiTable (
- AcpiProtocol,
- AcpiTableBuffer,
- AcpiTableBufferSize,
- TableKey
- );
-}
-
-
/**
Locate the first instance of a protocol. If the protocol requested is an
FV protocol, then it will return the first FV that contains the ACPI table
@@ -200,12 +182,12 @@ InstallOvmfFvTables (
//
// Install ACPI table
//
- Status = InstallAcpiTable (
- AcpiTable,
- CurrentTable,
- TableSize,
- &TableHandle
- );
+ Status = AcpiTable->InstallAcpiTable (
+ AcpiTable,
+ CurrentTable,
+ TableSize,
+ &TableHandle
+ );
//
// Free memory allocated by ReadSection
diff --git a/OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.h b/OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.h
index 2959ff0be6..47d9769ed1 100644
--- a/OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.h
+++ b/OvmfPkg/XenAcpiPlatformDxe/AcpiPlatform.h
@@ -14,15 +14,6 @@
EFI_STATUS
EFIAPI
-InstallAcpiTable (
- IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
- IN VOID *AcpiTableBuffer,
- IN UINTN AcpiTableBufferSize,
- OUT UINTN *TableKey
- );
-
-EFI_STATUS
-EFIAPI
InstallXenTables (
IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol
);
diff --git a/OvmfPkg/XenAcpiPlatformDxe/Xen.c b/OvmfPkg/XenAcpiPlatformDxe/Xen.c
index e8395db548..151376176f 100644
--- a/OvmfPkg/XenAcpiPlatformDxe/Xen.c
+++ b/OvmfPkg/XenAcpiPlatformDxe/Xen.c
@@ -185,12 +185,12 @@ InstallXenTables (
//
// Install the XSDT tables
//
- Status = InstallAcpiTable (
- AcpiProtocol,
- CurrentTable,
- CurrentTable->Length,
- &TableHandle
- );
+ Status = AcpiProtocol->InstallAcpiTable (
+ AcpiProtocol,
+ CurrentTable,
+ CurrentTable->Length,
+ &TableHandle
+ );
if (EFI_ERROR (Status)) {
return Status;
@@ -235,12 +235,12 @@ InstallXenTables (
//
// Install the RSDT tables
//
- Status = InstallAcpiTable (
- AcpiProtocol,
- CurrentTable,
- CurrentTable->Length,
- &TableHandle
- );
+ Status = AcpiProtocol->InstallAcpiTable (
+ AcpiProtocol,
+ CurrentTable,
+ CurrentTable->Length,
+ &TableHandle
+ );
if (EFI_ERROR (Status)) {
return Status;
@@ -266,12 +266,12 @@ InstallXenTables (
//
// FACS 2.0
//
- Status = InstallAcpiTable (
- AcpiProtocol,
- Facs2Table,
- Facs2Table->Length,
- &TableHandle
- );
+ Status = AcpiProtocol->InstallAcpiTable (
+ AcpiProtocol,
+ Facs2Table,
+ Facs2Table->Length,
+ &TableHandle
+ );
if (EFI_ERROR (Status)) {
return Status;
}
@@ -280,12 +280,12 @@ InstallXenTables (
//
// FACS 1.0
//
- Status = InstallAcpiTable (
- AcpiProtocol,
- Facs1Table,
- Facs1Table->Length,
- &TableHandle
- );
+ Status = AcpiProtocol->InstallAcpiTable (
+ AcpiProtocol,
+ Facs1Table,
+ Facs1Table->Length,
+ &TableHandle
+ );
if (EFI_ERROR (Status)) {
return Status;
}
@@ -301,12 +301,12 @@ InstallXenTables (
CpuDeadLoop ();
}
- Status = InstallAcpiTable (
- AcpiProtocol,
- DsdtTable,
- DsdtTable->Length,
- &TableHandle
- );
+ Status = AcpiProtocol->InstallAcpiTable (
+ AcpiProtocol,
+ DsdtTable,
+ DsdtTable->Length,
+ &TableHandle
+ );
if (EFI_ERROR (Status)) {
return Status;
}