[edk2] [PATCH v2 8/9] ArmPlatformPkg/ArmJunoDxe: simplify ACPI table installation

Ard Biesheuvel posted 9 patches 7 years, 7 months ago
[edk2] [PATCH v2 8/9] ArmPlatformPkg/ArmJunoDxe: simplify ACPI table installation
Posted by Ard Biesheuvel 7 years, 7 months ago
Having a three way conditional with callbacks would make sense if the
callbacks weren't (a) identical and (b) didn't return TRUE all the
time. So get rid of the kludge.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 37 +-------------------
 1 file changed, 1 insertion(+), 36 deletions(-)

diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
index 14ff189a3078..2b3cca944cf1 100644
--- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
+++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
@@ -405,34 +405,6 @@ OnEndOfDxe (
   }
 }
 
-STATIC
-BOOLEAN
-AcpiTableJunoR0Check (
-  IN  EFI_ACPI_DESCRIPTION_HEADER *AcpiHeader
-  )
-{
-  return TRUE;
-}
-
-STATIC
-BOOLEAN
-AcpiTableJunoR1Check (
-  IN  EFI_ACPI_DESCRIPTION_HEADER *AcpiHeader
-  )
-{
-  return TRUE;
-}
-
-STATIC
-BOOLEAN
-AcpiTableJunoR2Check (
-  IN  EFI_ACPI_DESCRIPTION_HEADER *AcpiHeader
-  )
-{
-  return TRUE;
-}
-
-
 EFI_STATUS
 EFIAPI
 ArmJunoEntryPoint (
@@ -538,14 +510,7 @@ ArmJunoEntryPoint (
   //
   // Try to install the ACPI Tables
   //
-  if (JunoRevision == JUNO_REVISION_R0) {
-    Status = LocateAndInstallAcpiFromFvConditional (&mJunoAcpiTableFile, AcpiTableJunoR0Check);
-  } else if (JunoRevision == JUNO_REVISION_R1) {
-    Status = LocateAndInstallAcpiFromFvConditional (&mJunoAcpiTableFile, AcpiTableJunoR1Check);
-  } else if (JunoRevision == JUNO_REVISION_R2) {
-    Status = LocateAndInstallAcpiFromFvConditional (&mJunoAcpiTableFile, AcpiTableJunoR2Check);
-  }
-
+  Status = LocateAndInstallAcpiFromFv (&mJunoAcpiTableFile);
   ASSERT_EFI_ERROR (Status);
 
   //
-- 
2.9.3

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel