* [Qemu-devel] [PATCH] acpi-defs: clean up open brace usage
@ 2017-05-09 18:12 Michael S. Tsirkin
2017-05-10 12:34 ` Igor Mammedov
0 siblings, 1 reply; 2+ messages in thread
From: Michael S. Tsirkin @ 2017-05-09 18:12 UTC (permalink / raw)
To: qemu-devel; +Cc: Igor Mammedov
patchew has been saying:
ERROR: open brace '{' following struct go on the same line
Fix up acpi-defs.h to follow this rule.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/acpi/acpi-defs.h | 37 +++++++++++++------------------------
1 file changed, 13 insertions(+), 24 deletions(-)
diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h
index dff6d4f..7316a02 100644
--- a/include/hw/acpi/acpi-defs.h
+++ b/include/hw/acpi/acpi-defs.h
@@ -81,8 +81,8 @@ typedef struct AcpiRsdpDescriptor AcpiRsdpDescriptor;
uint32_t asl_compiler_revision; /* ASL compiler revision number */
-struct AcpiTableHeader /* ACPI common table header */
-{
+/* ACPI common table header */
+struct AcpiTableHeader {
ACPI_TABLE_HEADER_DEF
} QEMU_PACKED;
typedef struct AcpiTableHeader AcpiTableHeader;
@@ -133,8 +133,7 @@ typedef struct AcpiTableHeader AcpiTableHeader;
uint8_t mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */ \
uint8_t century; /* Index to century in RTC CMOS RAM */
-struct AcpiFadtDescriptorRev1
-{
+struct AcpiFadtDescriptorRev1 {
ACPI_FADT_COMMON_DEF
uint8_t reserved4; /* Reserved */
uint8_t reserved4a; /* Reserved */
@@ -229,8 +228,7 @@ typedef struct AcpiSerialPortConsoleRedirection
/*
* ACPI 1.0 Root System Description Table (RSDT)
*/
-struct AcpiRsdtDescriptorRev1
-{
+struct AcpiRsdtDescriptorRev1 {
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
uint32_t table_offset_entry[0]; /* Array of pointers to other */
/* ACPI tables */
@@ -240,8 +238,7 @@ typedef struct AcpiRsdtDescriptorRev1 AcpiRsdtDescriptorRev1;
/*
* ACPI 2.0 eXtended System Description Table (XSDT)
*/
-struct AcpiXsdtDescriptorRev2
-{
+struct AcpiXsdtDescriptorRev2 {
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
uint64_t table_offset_entry[0]; /* Array of pointers to other */
/* ACPI tables */
@@ -251,8 +248,7 @@ typedef struct AcpiXsdtDescriptorRev2 AcpiXsdtDescriptorRev2;
/*
* ACPI 1.0 Firmware ACPI Control Structure (FACS)
*/
-struct AcpiFacsDescriptorRev1
-{
+struct AcpiFacsDescriptorRev1 {
uint32_t signature; /* ACPI Signature */
uint32_t length; /* Length of structure, in bytes */
uint32_t hardware_signature; /* Hardware configuration signature */
@@ -278,8 +274,7 @@ typedef struct AcpiFacsDescriptorRev1 AcpiFacsDescriptorRev1;
/* Master MADT */
-struct AcpiMultipleApicTable
-{
+struct AcpiMultipleApicTable {
ACPI_TABLE_HEADER_DEF /* ACPI common table header */
uint32_t local_apic_address; /* Physical address of local APIC */
uint32_t flags;
@@ -315,8 +310,7 @@ typedef struct AcpiMultipleApicTable AcpiMultipleApicTable;
/* Sub-structures for MADT */
-struct AcpiMadtProcessorApic
-{
+struct AcpiMadtProcessorApic {
ACPI_SUB_HEADER_DEF
uint8_t processor_id; /* ACPI processor id */
uint8_t local_apic_id; /* Processor's local APIC id */
@@ -324,8 +318,7 @@ struct AcpiMadtProcessorApic
} QEMU_PACKED;
typedef struct AcpiMadtProcessorApic AcpiMadtProcessorApic;
-struct AcpiMadtIoApic
-{
+struct AcpiMadtIoApic {
ACPI_SUB_HEADER_DEF
uint8_t io_apic_id; /* I/O APIC ID */
uint8_t reserved; /* Reserved - must be zero */
@@ -478,8 +471,7 @@ typedef struct Acpi20Hpet Acpi20Hpet;
* SRAT (NUMA topology description) table
*/
-struct AcpiSystemResourceAffinityTable
-{
+struct AcpiSystemResourceAffinityTable {
ACPI_TABLE_HEADER_DEF
uint32_t reserved1;
uint32_t reserved2[2];
@@ -491,8 +483,7 @@ typedef struct AcpiSystemResourceAffinityTable AcpiSystemResourceAffinityTable;
#define ACPI_SRAT_PROCESSOR_x2APIC 2
#define ACPI_SRAT_PROCESSOR_GICC 3
-struct AcpiSratProcessorAffinity
-{
+struct AcpiSratProcessorAffinity {
ACPI_SUB_HEADER_DEF
uint8_t proximity_lo;
uint8_t local_apic_id;
@@ -514,8 +505,7 @@ struct AcpiSratProcessorX2ApicAffinity {
} QEMU_PACKED;
typedef struct AcpiSratProcessorX2ApicAffinity AcpiSratProcessorX2ApicAffinity;
-struct AcpiSratMemoryAffinity
-{
+struct AcpiSratMemoryAffinity {
ACPI_SUB_HEADER_DEF
uint32_t proximity;
uint16_t reserved1;
@@ -527,8 +517,7 @@ struct AcpiSratMemoryAffinity
} QEMU_PACKED;
typedef struct AcpiSratMemoryAffinity AcpiSratMemoryAffinity;
-struct AcpiSratProcessorGiccAffinity
-{
+struct AcpiSratProcessorGiccAffinity {
ACPI_SUB_HEADER_DEF
uint32_t proximity;
uint32_t acpi_processor_uid;
--
MST
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] acpi-defs: clean up open brace usage
2017-05-09 18:12 [Qemu-devel] [PATCH] acpi-defs: clean up open brace usage Michael S. Tsirkin
@ 2017-05-10 12:34 ` Igor Mammedov
0 siblings, 0 replies; 2+ messages in thread
From: Igor Mammedov @ 2017-05-10 12:34 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
On Tue, 9 May 2017 21:12:09 +0300
"Michael S. Tsirkin" <mst@redhat.com> wrote:
> patchew has been saying:
> ERROR: open brace '{' following struct go on the same line
>
> Fix up acpi-defs.h to follow this rule.
>
> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: "Michael S. Tsirkin" <mst@redhat.com>
> ---
> include/hw/acpi/acpi-defs.h | 37 +++++++++++++------------------------
> 1 file changed, 13 insertions(+), 24 deletions(-)
>
> diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h
> index dff6d4f..7316a02 100644
> --- a/include/hw/acpi/acpi-defs.h
> +++ b/include/hw/acpi/acpi-defs.h
> @@ -81,8 +81,8 @@ typedef struct AcpiRsdpDescriptor AcpiRsdpDescriptor;
> uint32_t asl_compiler_revision; /* ASL compiler revision number */
>
>
> -struct AcpiTableHeader /* ACPI common table header */
> -{
> +/* ACPI common table header */
> +struct AcpiTableHeader {
> ACPI_TABLE_HEADER_DEF
> } QEMU_PACKED;
> typedef struct AcpiTableHeader AcpiTableHeader;
> @@ -133,8 +133,7 @@ typedef struct AcpiTableHeader AcpiTableHeader;
> uint8_t mon_alrm; /* Index to month-of-year alarm in RTC CMOS RAM */ \
> uint8_t century; /* Index to century in RTC CMOS RAM */
>
> -struct AcpiFadtDescriptorRev1
> -{
> +struct AcpiFadtDescriptorRev1 {
> ACPI_FADT_COMMON_DEF
> uint8_t reserved4; /* Reserved */
> uint8_t reserved4a; /* Reserved */
> @@ -229,8 +228,7 @@ typedef struct AcpiSerialPortConsoleRedirection
> /*
> * ACPI 1.0 Root System Description Table (RSDT)
> */
> -struct AcpiRsdtDescriptorRev1
> -{
> +struct AcpiRsdtDescriptorRev1 {
> ACPI_TABLE_HEADER_DEF /* ACPI common table header */
> uint32_t table_offset_entry[0]; /* Array of pointers to other */
> /* ACPI tables */
> @@ -240,8 +238,7 @@ typedef struct AcpiRsdtDescriptorRev1 AcpiRsdtDescriptorRev1;
> /*
> * ACPI 2.0 eXtended System Description Table (XSDT)
> */
> -struct AcpiXsdtDescriptorRev2
> -{
> +struct AcpiXsdtDescriptorRev2 {
> ACPI_TABLE_HEADER_DEF /* ACPI common table header */
> uint64_t table_offset_entry[0]; /* Array of pointers to other */
> /* ACPI tables */
> @@ -251,8 +248,7 @@ typedef struct AcpiXsdtDescriptorRev2 AcpiXsdtDescriptorRev2;
> /*
> * ACPI 1.0 Firmware ACPI Control Structure (FACS)
> */
> -struct AcpiFacsDescriptorRev1
> -{
> +struct AcpiFacsDescriptorRev1 {
> uint32_t signature; /* ACPI Signature */
> uint32_t length; /* Length of structure, in bytes */
> uint32_t hardware_signature; /* Hardware configuration signature */
> @@ -278,8 +274,7 @@ typedef struct AcpiFacsDescriptorRev1 AcpiFacsDescriptorRev1;
>
> /* Master MADT */
>
> -struct AcpiMultipleApicTable
> -{
> +struct AcpiMultipleApicTable {
> ACPI_TABLE_HEADER_DEF /* ACPI common table header */
> uint32_t local_apic_address; /* Physical address of local APIC */
> uint32_t flags;
> @@ -315,8 +310,7 @@ typedef struct AcpiMultipleApicTable AcpiMultipleApicTable;
>
> /* Sub-structures for MADT */
>
> -struct AcpiMadtProcessorApic
> -{
> +struct AcpiMadtProcessorApic {
> ACPI_SUB_HEADER_DEF
> uint8_t processor_id; /* ACPI processor id */
> uint8_t local_apic_id; /* Processor's local APIC id */
> @@ -324,8 +318,7 @@ struct AcpiMadtProcessorApic
> } QEMU_PACKED;
> typedef struct AcpiMadtProcessorApic AcpiMadtProcessorApic;
>
> -struct AcpiMadtIoApic
> -{
> +struct AcpiMadtIoApic {
> ACPI_SUB_HEADER_DEF
> uint8_t io_apic_id; /* I/O APIC ID */
> uint8_t reserved; /* Reserved - must be zero */
> @@ -478,8 +471,7 @@ typedef struct Acpi20Hpet Acpi20Hpet;
> * SRAT (NUMA topology description) table
> */
>
> -struct AcpiSystemResourceAffinityTable
> -{
> +struct AcpiSystemResourceAffinityTable {
> ACPI_TABLE_HEADER_DEF
> uint32_t reserved1;
> uint32_t reserved2[2];
> @@ -491,8 +483,7 @@ typedef struct AcpiSystemResourceAffinityTable AcpiSystemResourceAffinityTable;
> #define ACPI_SRAT_PROCESSOR_x2APIC 2
> #define ACPI_SRAT_PROCESSOR_GICC 3
>
> -struct AcpiSratProcessorAffinity
> -{
> +struct AcpiSratProcessorAffinity {
> ACPI_SUB_HEADER_DEF
> uint8_t proximity_lo;
> uint8_t local_apic_id;
> @@ -514,8 +505,7 @@ struct AcpiSratProcessorX2ApicAffinity {
> } QEMU_PACKED;
> typedef struct AcpiSratProcessorX2ApicAffinity AcpiSratProcessorX2ApicAffinity;
>
> -struct AcpiSratMemoryAffinity
> -{
> +struct AcpiSratMemoryAffinity {
> ACPI_SUB_HEADER_DEF
> uint32_t proximity;
> uint16_t reserved1;
> @@ -527,8 +517,7 @@ struct AcpiSratMemoryAffinity
> } QEMU_PACKED;
> typedef struct AcpiSratMemoryAffinity AcpiSratMemoryAffinity;
>
> -struct AcpiSratProcessorGiccAffinity
> -{
> +struct AcpiSratProcessorGiccAffinity {
> ACPI_SUB_HEADER_DEF
> uint32_t proximity;
> uint32_t acpi_processor_uid;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-10 12:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-09 18:12 [Qemu-devel] [PATCH] acpi-defs: clean up open brace usage Michael S. Tsirkin
2017-05-10 12:34 ` Igor Mammedov
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).