From 9886ebfe43d5dfadb97657b4df6ada40d46fb9e8 Mon Sep 17 00:00:00 2001 From: Laszlo Ersek Date: Wed, 1 Feb 2017 15:10:02 +0100 Subject: [PATCH] MdeModulePkg/AcpiTableDxe: condense whitespace around FADT.{DSDT,X_DSDT} This patch incurs no functional changes, it just removes some whitespace, and also makes sure we always assign AcpiTableInstance->Fadt3->Dsdt first, and AcpiTableInstance->Fadt3->XDsdt second. The goal is to separate the syntactic changes from the functional changes implemented by the next patch. Cc: Al Stone Cc: Ard Biesheuvel Cc: Feng Tian Cc: Igor Mammedov Cc: Jiewen Yao Cc: Leo Duran Cc: Michael Tsirkin Cc: Phil Dennis-Jordan Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Thomas Huth Reviewed-by: Feng Tian Reviewed-by: Jiewen Yao Reviewed-by: Star Zeng --- .../Acpi/AcpiTableDxe/AcpiTableProtocol.c | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c index 7f95b9dc70..7795ff7269 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c @@ -646,16 +646,12 @@ AddTableToList ( AcpiTableInstance->Fadt3->FirmwareCtrl = 0; } if ((UINT64)(UINTN)AcpiTableInstance->Dsdt3 < BASE_4GB) { - AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3; + AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3; ZeroMem (&AcpiTableInstance->Fadt3->XDsdt, sizeof (UINT64)); } else { - Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3; - CopyMem ( - &AcpiTableInstance->Fadt3->XDsdt, - &Buffer64, - sizeof (UINT64) - ); AcpiTableInstance->Fadt3->Dsdt = 0; + Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3; + CopyMem (&AcpiTableInstance->Fadt3->XDsdt, &Buffer64, sizeof (UINT64)); } // @@ -850,14 +846,10 @@ AddTableToList ( // if (AcpiTableInstance->Fadt3 != NULL) { if ((UINT64)(UINTN)AcpiTableInstance->Dsdt3 < BASE_4GB) { - AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3; + AcpiTableInstance->Fadt3->Dsdt = (UINT32) (UINTN) AcpiTableInstance->Dsdt3; } - Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3; - CopyMem ( - &AcpiTableInstance->Fadt3->XDsdt, - &Buffer64, - sizeof (UINT64) - ); + Buffer64 = (UINT64) (UINTN) AcpiTableInstance->Dsdt3; + CopyMem (&AcpiTableInstance->Fadt3->XDsdt, &Buffer64, sizeof (UINT64)); // // Checksum FADT table