[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 22/26] acpi: make build_*() routines static to aml
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v3 22/26] acpi: make build_*() routines static to aml-build.c |
Date: |
Mon, 2 Mar 2015 12:00:11 +0100 |
From: Igor Mammedov <address@hidden>
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>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
include/hw/acpi/aml-build.h | 16 ----------------
hw/acpi/aml-build.c | 20 ++++++++++----------
2 files changed, 10 insertions(+), 26 deletions(-)
diff --git a/include/hw/acpi/aml-build.h b/include/hw/acpi/aml-build.h
index 1187197..f6735ea 100644
--- a/include/hw/acpi/aml-build.h
+++ b/include/hw/acpi/aml-build.h
@@ -188,20 +188,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_int(GArray *table, uint64_t value);
-void build_extop_package(GArray *package, uint8_t op);
-
#endif
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index 60245e7..3e5949b 100644
--- a/hw/acpi/aml-build.c
+++ b/hw/acpi/aml-build.c
@@ -27,27 +27,27 @@
#include "hw/acpi/aml-build.h"
#include "qemu/bswap.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);
}
@@ -141,7 +141,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;
@@ -158,7 +158,7 @@ enum {
PACKAGE_LENGTH_4BYTE_SHIFT = 20,
};
-void
+static void
build_prepend_package_length(GArray *package, unsigned length, bool incl_self)
{
uint8_t byte;
@@ -226,13 +226,13 @@ 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 */
@@ -248,7 +248,7 @@ static void build_append_int_noprefix(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 */
--
MST
- [Qemu-devel] [PULL v3 13/26] pc: export applesmc IO port/len, (continued)
- [Qemu-devel] [PULL v3 13/26] pc: export applesmc IO port/len, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 14/26] pc: acpi-build: drop template patching and create Device(SMC) dynamically, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 15/26] tests: ACPI test blobs update due to PCI0._CRS changes, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 16/26] tests: bios-tables-test: add support for testing bridges, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 17/26] tests: add ACPI blobs for qemu with bridge cases, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 18/26] pc: acpi-build: simplify PCI bus tree generation, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 19/26] tests: ACPI: update pc/SSDT.bridge due to new alg of PCI tree creation, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 20/26] pc: acpi-build: drop template patching and create PCI bus tree dynamically, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 21/26] pc: acpi: remove not used anymore ssdt-[misc|pcihp].hex.generated blobs, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 23/26] pci: Give a few helpers internal linkage, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 22/26] acpi: make build_*() routines static to aml-build.c,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v3 25/26] acpi, mem-hotplug: use PC_DIMM_SLOT_PROP in acpi_memory_plug_cb()., Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 24/26] pci-hotplug-old: Has been dead for five major releases, bury, Michael S. Tsirkin, 2015/03/02
- [Qemu-devel] [PULL v3 26/26] acpi-test-data: update after pci rewrite, Michael S. Tsirkin, 2015/03/02
- Re: [Qemu-devel] [PULL v3 00/26] pci, pc, virtio fixes and cleanups, Michael S. Tsirkin, 2015/03/02