[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 52/52] acpi: make build_*() routines static to am
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH v3 52/52] acpi: make build_*() routines static to aml-build.c |
Date: |
Mon, 9 Feb 2015 10:54:14 +0000 |
build_*() routines were used for composing AML
structures manually in acpi-build.c but after
conversion to AML API they are not used outside
of aml-build.c anymore, so hide them from external
users.
Signed-off-by: Igor Mammedov <address@hidden>
---
hw/acpi/aml-build.c | 22 +++++++++++-----------
include/hw/acpi/aml-build.h | 17 -----------------
2 files changed, 11 insertions(+), 28 deletions(-)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 3f87d51..8f06f56 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -28,27 +28,27 @@
#include "qemu/bswap.h"
#include "hw/acpi/bios-linker-loader.h"
-GArray *build_alloc_array(void)
+static GArray *build_alloc_array(void)
{
return g_array_new(false, true /* clear */, 1);
}
-void build_free_array(GArray *array)
+static void build_free_array(GArray *array)
{
g_array_free(array, true);
}
-void build_prepend_byte(GArray *array, uint8_t val)
+static void build_prepend_byte(GArray *array, uint8_t val)
{
g_array_prepend_val(array, val);
}
-void build_append_byte(GArray *array, uint8_t val)
+static void build_append_byte(GArray *array, uint8_t val)
{
g_array_append_val(array, val);
}
-void build_append_array(GArray *array, GArray *val)
+static void build_append_array(GArray *array, GArray *val)
{
g_array_append_vals(array, val->data, val->len);
}
@@ -142,7 +142,7 @@ build_append_namestringv(GArray *array, const char *format,
va_list ap)
g_strfreev(segs);
}
-void build_append_namestring(GArray *array, const char *format, ...)
+static void build_append_namestring(GArray *array, const char *format, ...)
{
va_list ap;
@@ -159,7 +159,7 @@ enum {
PACKAGE_LENGTH_4BYTE_SHIFT = 20,
};
-void
+static void
build_prepend_package_length(GArray *package, unsigned length, bool incl_self)
{
uint8_t byte;
@@ -227,19 +227,19 @@ build_append_pkg_length(GArray *array, unsigned length,
bool incl_self)
build_free_array(tmp);
}
-void build_package(GArray *package, uint8_t op)
+static void build_package(GArray *package, uint8_t op)
{
build_prepend_package_length(package, package->len, true);
build_prepend_byte(package, op);
}
-void build_extop_package(GArray *package, uint8_t op)
+static void build_extop_package(GArray *package, uint8_t op)
{
build_package(package, op);
build_prepend_byte(package, 0x5B); /* ExtOpPrefix */
}
-void build_append_value(GArray *table, uint64_t value, int size)
+static void build_append_value(GArray *table, uint64_t value, int size)
{
int i;
@@ -249,7 +249,7 @@ void build_append_value(GArray *table, uint64_t value, int
size)
}
}
-void build_append_int(GArray *table, uint64_t value)
+static void build_append_int(GArray *table, uint64_t value)
{
if (value == 0x00) {
build_append_byte(table, 0x00); /* ZeroOp */
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index 44cb7ea..7e9ce38 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -202,21 +202,4 @@ Aml *aml_resource_template(void);
Aml *aml_field(const char *name, AmlFieldFlags flags);
Aml *aml_varpackage(uint32_t num_elements);
-/* other helpers */
-GArray *build_alloc_array(void);
-void build_free_array(GArray *array);
-void build_prepend_byte(GArray *array, uint8_t val);
-void build_append_byte(GArray *array, uint8_t val);
-void build_append_array(GArray *array, GArray *val);
-
-void GCC_FMT_ATTR(2, 3)
-build_append_namestring(GArray *array, const char *format, ...);
-
-void
-build_prepend_package_length(GArray *package, unsigned length, bool incl_self);
-void build_package(GArray *package, uint8_t op);
-void build_append_value(GArray *table, uint64_t value, int size);
-void build_append_int(GArray *table, uint64_t value);
-void build_extop_package(GArray *package, uint8_t op);
-
#endif
--
1.8.3.1
- [Qemu-devel] [PATCH v3 37/52] acpi: add aml_eisaid() term, (continued)
- [Qemu-devel] [PATCH v3 37/52] acpi: add aml_eisaid() term, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 38/52] pc: acpi-build: drop template patching and CPU hotplug objects dynamically, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 40/52] acpi: add aml_reserved_field() term, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 41/52] pc: acpi-build: drop template patching and memory hotplug objects dynamically, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 43/52] acpi: add aml_word_bus_number(), aml_word_io(), aml_dword_memory(), aml_qword_memory() terms, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 32/52] acpi: add aml_string() term, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 44/52] pc: pcihp: expose MMIO base and len as properties, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 47/52] pc: acpi-build: drop remaining ssdt_misc template and use acpi_def_block(), Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 42/52] pc: acpi-build: create memory hotplug IO region dynamically, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 52/52] acpi: make build_*() routines static to aml-build.c,
Igor Mammedov <=
- [Qemu-devel] [PATCH v3 46/52] pc: acpi-build: create PCI0._CRS dynamically, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 33/52] pc: acpi-build: generate pvpanic device description dynamically, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 45/52] pc: acpi-build: reserve PCIHP MMIO resources, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 51/52] pc: acpi-build: update [q35-]acpi-dsdt.hex.generated due to moved SMC, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 39/52] pc: acpi-build: create CPU hotplug IO region dynamically, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 48/52] acpi: add acpi_irq_no_flags() term, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 49/52] pc: export applesmc IO port/len, Igor Mammedov, 2015/02/09
- [Qemu-devel] [PATCH v3 50/52] pc: acpi-build: drop template patching and create Device(SMC) dynamically, Igor Mammedov, 2015/02/09
- Re: [Qemu-devel] [PATCH v3 00/52] ACPI refactoring: replace template patching with C AML API, Michael S. Tsirkin, 2015/02/17