public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: edk2-devel-01 <edk2-devel@ml01.01.org>
Cc: Al Stone <ahs3@redhat.com>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Feng Tian <feng.tian@intel.com>,
	Igor Mammedov <imammedo@redhat.com>,
	Jiewen Yao <jiewen.yao@intel.com>, Leo Duran <leo.duran@amd.com>,
	Michael Tsirkin <mtsirkin@redhat.com>,
	Phil Dennis-Jordan <phil@philjordan.eu>,
	Star Zeng <star.zeng@intel.com>
Subject: [PATCH v2 1/2] MdeModulePkg/AcpiTableDxe: condense whitespace around FADT.{DSDT, X_DSDT}
Date: Wed,  8 Mar 2017 20:58:38 +0100	[thread overview]
Message-ID: <20170308195839.18689-2-lersek@redhat.com> (raw)
In-Reply-To: <20170308195839.18689-1-lersek@redhat.com>

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: Jiewen Yao <jiewen.yao@intel.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>
Reviewed-by: Feng Tian <feng.tian@intel.com>
---

Notes:
    v2:
    - no changes
    - pick up R-b's from Thomas and Feng
    
    v1:
    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




  reply	other threads:[~2017-03-08 19:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08 19:58 [PATCH v2 0/2] MdeModulePkg/AcpiTableDxe: improve FADT.{DSDT, X_DSDT} mutual exclusion Laszlo Ersek
2017-03-08 19:58 ` Laszlo Ersek [this message]
2017-03-09  0:47   ` [PATCH v2 1/2] MdeModulePkg/AcpiTableDxe: condense whitespace around FADT.{DSDT, X_DSDT} Yao, Jiewen
2017-03-08 19:58 ` [PATCH v2 2/2] MdeModulePkg/AcpiTableDxe: improve FADT.{DSDT, X_DSDT} mutual exclusion Laszlo Ersek
2017-03-09  0:47   ` Yao, Jiewen
2017-03-13  3:07   ` Fan, Jeff
2017-03-13 14:44     ` Laszlo Ersek
2017-03-14  7:56       ` Fan, Jeff
2017-03-14  8:33         ` Zeng, Star
2017-03-14 13:13           ` Laszlo Ersek
2017-03-15  1:22             ` Zeng, Star
2017-03-15 15:10               ` Laszlo Ersek
2017-03-09  1:59 ` [PATCH v2 0/2] " Zeng, Star
2017-03-09 14:06 ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170308195839.18689-2-lersek@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox