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 <ahs3@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Leo Duran <leo.duran@amd.com>
Cc: Michael Tsirkin <mtsirkin@redhat.com>
Cc: Phil Dennis-Jordan <phil@philjordan.eu>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
Notes:
NOTE for people on the CC list:
If you are not presently subscribed to edk2-devel and wish to comment on
this patch publicly, you need to subscribe first, and wait for the
subscription request to *complete* (see your inbox), *before* sending
your followup. This is not ideal, but edk2-devel requires subscription
before reflecting messages from someone.
Subscribe at <https://lists.01.org/mailman/listinfo/edk2-devel>. Thanks.
MdeModulePkg/Universal/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 7f95b9dc709d..7795ff7269ca 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
--
2.9.3
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
On 01.02.2017 18:56, Laszlo Ersek wrote: > 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 <ahs3@redhat.com> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> > Cc: Feng Tian <feng.tian@intel.com> > Cc: Igor Mammedov <imammedo@redhat.com> > Cc: Leo Duran <leo.duran@amd.com> > Cc: Michael Tsirkin <mtsirkin@redhat.com> > Cc: Phil Dennis-Jordan <phil@philjordan.eu> > Cc: Star Zeng <star.zeng@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Reviewed-by: Feng Tian <feng.tian@intel.com> Thanks Feng -----Original Message----- From: Laszlo Ersek [mailto:lersek@redhat.com] Sent: Thursday, February 2, 2017 1:57 AM To: edk2-devel-01 <edk2-devel@lists.01.org> Cc: Al Stone <ahs3@redhat.com>; Ard Biesheuvel <ard.biesheuvel@linaro.org>; Tian, Feng <feng.tian@intel.com>; Igor Mammedov <imammedo@redhat.com>; Leo Duran <leo.duran@amd.com>; Michael Tsirkin <mtsirkin@redhat.com>; Phil Dennis-Jordan <phil@philjordan.eu>; Zeng, Star <star.zeng@intel.com> Subject: [PATCH 1/2] 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 <ahs3@redhat.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Feng Tian <feng.tian@intel.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Leo Duran <leo.duran@amd.com> Cc: Michael Tsirkin <mtsirkin@redhat.com> Cc: Phil Dennis-Jordan <phil@philjordan.eu> Cc: Star Zeng <star.zeng@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> --- Notes: NOTE for people on the CC list: If you are not presently subscribed to edk2-devel and wish to comment on this patch publicly, you need to subscribe first, and wait for the subscription request to *complete* (see your inbox), *before* sending your followup. This is not ideal, but edk2-devel requires subscription before reflecting messages from someone. Subscribe at <https://lists.01.org/mailman/listinfo/edk2-devel>. Thanks. MdeModulePkg/Universal/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 7f95b9dc709d..7795ff7269ca 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 -- 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
© 2016 - 2024 Red Hat, Inc.