From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@amazon.com>, stefanb@linux.vnet.ibm.com
Subject: [Qemu-devel] [PATCH 2/2] acpi: cleanups tcpa table generation
Date: Wed, 30 Jul 2014 13:34:42 +0200 [thread overview]
Message-ID: <1406720068-16482-3-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1406720068-16482-1-git-send-email-mst@redhat.com>
Improve readability, no functional changes.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/i386/acpi-build.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 66cde2b..6ae3a9e 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1209,17 +1209,13 @@ build_hpet(GArray *table_data, GArray *linker)
static void
build_tpm_tcpa(GArray *table_data, GArray *linker)
{
- Acpi20Tcpa *tcpa;
- uint32_t log_area_minimum_length = TPM_LOG_AREA_MINIMUM_SIZE;
- uint64_t log_area_start_address;
- size_t len = log_area_minimum_length + sizeof(*tcpa);
+ Acpi20Tcpa *tcpa = acpi_data_push(table_data, sizeof *tcpa);
+ uint64_t log_area_start_address = acpi_data_len(table_data);
- log_area_start_address = table_data->len + sizeof(*tcpa);
-
- tcpa = acpi_data_push(table_data, len);
+ acpi_data_push(table_data, TPM_LOG_AREA_MINIMUM_SIZE);
tcpa->platform_class = cpu_to_le16(TPM_TCPA_ACPI_CLASS_CLIENT);
- tcpa->log_area_minimum_length = cpu_to_le32(log_area_minimum_length);
+ tcpa->log_area_minimum_length = cpu_to_le32(TPM_LOG_AREA_MINIMUM_SIZE);
tcpa->log_area_start_address = cpu_to_le64(log_area_start_address);
/* LASA address to be filled by Guest linker */
--
MST
next prev parent reply other threads:[~2014-07-30 11:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 11:34 [Qemu-devel] [PATCH 0/2] tpm: acpi generation tweaks Michael S. Tsirkin
2014-07-30 11:34 ` [Qemu-devel] [PATCH 1/2] tpm: remove code duplication Michael S. Tsirkin
2014-07-30 13:37 ` Stefan Berger
2014-07-30 11:34 ` Michael S. Tsirkin [this message]
2014-07-30 13:38 ` [Qemu-devel] [PATCH 2/2] acpi: cleanups tcpa table generation Stefan Berger
2014-08-11 12:49 ` Stefan Berger
2014-08-08 19:25 ` [Qemu-devel] [PATCH 0/2] tpm: acpi generation tweaks Stefan Berger
2014-08-10 20:04 ` Michael S. Tsirkin
2014-08-11 11:35 ` Stefan Berger
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-all 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=1406720068-16482-3-git-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=aliguori@amazon.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanb@linux.vnet.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).