diff mbox

[FYI,03/13] hw/acpi: rename "AcpiBuildTables.table_data" to "main_blob"

Message ID 1442148227-17343-4-git-send-email-lersek@redhat.com
State New
Headers show

Commit Message

Laszlo Ersek Sept. 13, 2015, 12:43 p.m. UTC
The identifier "table_data" is used in wildly different name spaces and
scopes, which makes it practically impossible to grep for uses of
"AcpiBuildTables.table_data" specifically. Rename the field to "main_blob"
(which is a unique identifier across the tree), and update all references
with the help of the compiler.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gal Hammer <ghammer@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 include/hw/acpi/aml-build.h | 2 +-
 hw/acpi/aml-build.c         | 4 ++--
 hw/arm/virt-acpi-build.c    | 6 +++---
 hw/i386/acpi-build.c        | 6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)
diff mbox

Patch

diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index e3afa13..7d89c40 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -151,7 +151,7 @@  typedef enum {
 
 typedef
 struct AcpiBuildTables {
-    GArray *table_data;
+    GArray *main_blob;
     GArray *rsdp;
     GArray *tcpalog;
     GArray *linker;
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 0d4b324..2c7d59d 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -1178,7 +1178,7 @@  void acpi_add_table(GArray *table_offsets, GArray *table_data)
 void acpi_build_tables_init(AcpiBuildTables *tables)
 {
     tables->rsdp = g_array_new(false, true /* clear */, 1);
-    tables->table_data = g_array_new(false, true /* clear */, 1);
+    tables->main_blob = g_array_new(false, true /* clear */, 1);
     tables->tcpalog = g_array_new(false, true /* clear */, 1);
     tables->linker = bios_linker_loader_init();
 }
@@ -1188,7 +1188,7 @@  void acpi_build_tables_cleanup(AcpiBuildTables *tables, bool mfre)
     void *linker_data = bios_linker_loader_cleanup(tables->linker);
     g_free(linker_data);
     g_array_free(tables->rsdp, true);
-    g_array_free(tables->table_data, true);
+    g_array_free(tables->main_blob, true);
     g_array_free(tables->tcpalog, mfre);
 }
 
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index 9088248..fcbb2d7 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -552,7 +552,7 @@  void virt_acpi_build(VirtGuestInfo *guest_info, AcpiBuildTables *tables)
     GArray *table_offsets;
     unsigned dsdt, rsdt;
     VirtAcpiCpuInfo cpuinfo;
-    GArray *tables_blob = tables->table_data;
+    GArray *tables_blob = tables->main_blob;
 
     virt_acpi_get_cpu_info(&cpuinfo);
 
@@ -631,7 +631,7 @@  static void virt_acpi_build_update(void *build_opaque, uint32_t offset)
 
     virt_acpi_build(build_state->guest_info, &tables);
 
-    acpi_ram_update(build_state->table_mr, tables.table_data);
+    acpi_ram_update(build_state->table_mr, tables.main_blob);
     acpi_ram_update(build_state->rsdp_mr, tables.rsdp);
     acpi_ram_update(build_state->linker_mr, tables.linker);
 
@@ -685,7 +685,7 @@  void virt_acpi_setup(VirtGuestInfo *guest_info)
     virt_acpi_build(build_state->guest_info, &tables);
 
     /* Now expose it all to Guest */
-    build_state->table_mr = acpi_add_rom_blob(build_state, tables.table_data,
+    build_state->table_mr = acpi_add_rom_blob(build_state, tables.main_blob,
                                                ACPI_BUILD_TABLE_FILE,
                                                ACPI_BUILD_TABLE_MAX_SIZE);
     assert(build_state->table_mr != NULL);
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 95e0c65..2cd8891 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1670,7 +1670,7 @@  void acpi_build(PcGuestInfo *guest_info, AcpiBuildTables *tables)
     PcPciInfo pci;
     uint8_t *u;
     size_t aml_len = 0;
-    GArray *tables_blob = tables->table_data;
+    GArray *tables_blob = tables->main_blob;
 
     acpi_get_cpu_info(&cpu);
     acpi_get_pm_info(&pm);
@@ -1833,7 +1833,7 @@  static void acpi_build_update(void *build_opaque, uint32_t offset)
 
     acpi_build(build_state->guest_info, &tables);
 
-    acpi_ram_update(build_state->table_mr, tables.table_data);
+    acpi_ram_update(build_state->table_mr, tables.main_blob);
 
     if (build_state->rsdp) {
         memcpy(build_state->rsdp, tables.rsdp->data, acpi_data_len(tables.rsdp));
@@ -1899,7 +1899,7 @@  void acpi_setup(PcGuestInfo *guest_info)
     acpi_build(build_state->guest_info, &tables);
 
     /* Now expose it all to Guest */
-    build_state->table_mr = acpi_add_rom_blob(build_state, tables.table_data,
+    build_state->table_mr = acpi_add_rom_blob(build_state, tables.main_blob,
                                                ACPI_BUILD_TABLE_FILE,
                                                ACPI_BUILD_TABLE_MAX_SIZE);
     assert(build_state->table_mr != NULL);