mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
d6ba8aa6ef
commit
3f975ee570
|
@ -14,24 +14,6 @@
|
||||||
|
|
||||||
#include "AcpiPlatform.h"
|
#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
|
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
|
FV protocol, then it will return the first FV that contains the ACPI table
|
||||||
|
@ -200,12 +182,12 @@ InstallOvmfFvTables (
|
||||||
//
|
//
|
||||||
// Install ACPI table
|
// Install ACPI table
|
||||||
//
|
//
|
||||||
Status = InstallAcpiTable (
|
Status = AcpiTable->InstallAcpiTable (
|
||||||
AcpiTable,
|
AcpiTable,
|
||||||
CurrentTable,
|
CurrentTable,
|
||||||
TableSize,
|
TableSize,
|
||||||
&TableHandle
|
&TableHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Free memory allocated by ReadSection
|
// Free memory allocated by ReadSection
|
||||||
|
|
|
@ -12,15 +12,6 @@
|
||||||
|
|
||||||
#include <Protocol/AcpiTable.h> // EFI_ACPI_TABLE_PROTOCOL
|
#include <Protocol/AcpiTable.h> // EFI_ACPI_TABLE_PROTOCOL
|
||||||
|
|
||||||
EFI_STATUS
|
|
||||||
EFIAPI
|
|
||||||
InstallAcpiTable (
|
|
||||||
IN EFI_ACPI_TABLE_PROTOCOL *AcpiProtocol,
|
|
||||||
IN VOID *AcpiTableBuffer,
|
|
||||||
IN UINTN AcpiTableBufferSize,
|
|
||||||
OUT UINTN *TableKey
|
|
||||||
);
|
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
InstallXenTables (
|
InstallXenTables (
|
||||||
|
|
|
@ -185,12 +185,12 @@ InstallXenTables (
|
||||||
//
|
//
|
||||||
// Install the XSDT tables
|
// Install the XSDT tables
|
||||||
//
|
//
|
||||||
Status = InstallAcpiTable (
|
Status = AcpiProtocol->InstallAcpiTable (
|
||||||
AcpiProtocol,
|
AcpiProtocol,
|
||||||
CurrentTable,
|
CurrentTable,
|
||||||
CurrentTable->Length,
|
CurrentTable->Length,
|
||||||
&TableHandle
|
&TableHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
|
@ -235,12 +235,12 @@ InstallXenTables (
|
||||||
//
|
//
|
||||||
// Install the RSDT tables
|
// Install the RSDT tables
|
||||||
//
|
//
|
||||||
Status = InstallAcpiTable (
|
Status = AcpiProtocol->InstallAcpiTable (
|
||||||
AcpiProtocol,
|
AcpiProtocol,
|
||||||
CurrentTable,
|
CurrentTable,
|
||||||
CurrentTable->Length,
|
CurrentTable->Length,
|
||||||
&TableHandle
|
&TableHandle
|
||||||
);
|
);
|
||||||
|
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
|
@ -266,12 +266,12 @@ InstallXenTables (
|
||||||
//
|
//
|
||||||
// FACS 2.0
|
// FACS 2.0
|
||||||
//
|
//
|
||||||
Status = InstallAcpiTable (
|
Status = AcpiProtocol->InstallAcpiTable (
|
||||||
AcpiProtocol,
|
AcpiProtocol,
|
||||||
Facs2Table,
|
Facs2Table,
|
||||||
Facs2Table->Length,
|
Facs2Table->Length,
|
||||||
&TableHandle
|
&TableHandle
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -280,12 +280,12 @@ InstallXenTables (
|
||||||
//
|
//
|
||||||
// FACS 1.0
|
// FACS 1.0
|
||||||
//
|
//
|
||||||
Status = InstallAcpiTable (
|
Status = AcpiProtocol->InstallAcpiTable (
|
||||||
AcpiProtocol,
|
AcpiProtocol,
|
||||||
Facs1Table,
|
Facs1Table,
|
||||||
Facs1Table->Length,
|
Facs1Table->Length,
|
||||||
&TableHandle
|
&TableHandle
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -301,12 +301,12 @@ InstallXenTables (
|
||||||
CpuDeadLoop ();
|
CpuDeadLoop ();
|
||||||
}
|
}
|
||||||
|
|
||||||
Status = InstallAcpiTable (
|
Status = AcpiProtocol->InstallAcpiTable (
|
||||||
AcpiProtocol,
|
AcpiProtocol,
|
||||||
DsdtTable,
|
DsdtTable,
|
||||||
DsdtTable->Length,
|
DsdtTable->Length,
|
||||||
&TableHandle
|
&TableHandle
|
||||||
);
|
);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue