提交 a7cde24d 编写于 作者: E Eduardo Habkost 提交者: Michael S. Tsirkin

pc: Move commas inside PC_COMPAT_* macros

Changing the convention to include commas inside the macros will allow
macros containing empty lists to be defined and used without compilation
errors.
Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 f27086a7
...@@ -574,7 +574,7 @@ static QEMUMachine pc_i440fx_machine_v2_0 = { ...@@ -574,7 +574,7 @@ static QEMUMachine pc_i440fx_machine_v2_0 = {
.name = "pc-i440fx-2.0", .name = "pc-i440fx-2.0",
.init = pc_init_pci_2_0, .init = pc_init_pci_2_0,
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_2_0, PC_COMPAT_2_0
{ /* end of list */ } { /* end of list */ }
}, },
}; };
...@@ -586,7 +586,7 @@ static QEMUMachine pc_i440fx_machine_v1_7 = { ...@@ -586,7 +586,7 @@ static QEMUMachine pc_i440fx_machine_v1_7 = {
.name = "pc-i440fx-1.7", .name = "pc-i440fx-1.7",
.init = pc_init_pci_1_7, .init = pc_init_pci_1_7,
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_1_7, PC_COMPAT_1_7
{ /* end of list */ } { /* end of list */ }
}, },
}; };
...@@ -598,7 +598,7 @@ static QEMUMachine pc_i440fx_machine_v1_6 = { ...@@ -598,7 +598,7 @@ static QEMUMachine pc_i440fx_machine_v1_6 = {
.name = "pc-i440fx-1.6", .name = "pc-i440fx-1.6",
.init = pc_init_pci_1_6, .init = pc_init_pci_1_6,
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_1_6, PC_COMPAT_1_6
{ /* end of list */ } { /* end of list */ }
}, },
}; };
...@@ -608,7 +608,7 @@ static QEMUMachine pc_i440fx_machine_v1_5 = { ...@@ -608,7 +608,7 @@ static QEMUMachine pc_i440fx_machine_v1_5 = {
.name = "pc-i440fx-1.5", .name = "pc-i440fx-1.5",
.init = pc_init_pci_1_5, .init = pc_init_pci_1_5,
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_1_5, PC_COMPAT_1_5
{ /* end of list */ } { /* end of list */ }
}, },
}; };
...@@ -622,13 +622,13 @@ static QEMUMachine pc_i440fx_machine_v1_4 = { ...@@ -622,13 +622,13 @@ static QEMUMachine pc_i440fx_machine_v1_4 = {
.name = "pc-i440fx-1.4", .name = "pc-i440fx-1.4",
.init = pc_init_pci_1_4, .init = pc_init_pci_1_4,
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_1_4, PC_COMPAT_1_4
{ /* end of list */ } { /* end of list */ }
}, },
}; };
#define PC_COMPAT_1_3 \ #define PC_COMPAT_1_3 \
PC_COMPAT_1_4, \ PC_COMPAT_1_4 \
{\ {\
.driver = "usb-tablet",\ .driver = "usb-tablet",\
.property = "usb_version",\ .property = "usb_version",\
...@@ -645,20 +645,20 @@ static QEMUMachine pc_i440fx_machine_v1_4 = { ...@@ -645,20 +645,20 @@ static QEMUMachine pc_i440fx_machine_v1_4 = {
.driver = "e1000",\ .driver = "e1000",\
.property = "autonegotiation",\ .property = "autonegotiation",\
.value = "off",\ .value = "off",\
} },
static QEMUMachine pc_machine_v1_3 = { static QEMUMachine pc_machine_v1_3 = {
PC_I440FX_1_4_MACHINE_OPTIONS, PC_I440FX_1_4_MACHINE_OPTIONS,
.name = "pc-1.3", .name = "pc-1.3",
.init = pc_init_pci_1_3, .init = pc_init_pci_1_3,
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_1_3, PC_COMPAT_1_3
{ /* end of list */ } { /* end of list */ }
}, },
}; };
#define PC_COMPAT_1_2 \ #define PC_COMPAT_1_2 \
PC_COMPAT_1_3,\ PC_COMPAT_1_3 \
{\ {\
.driver = "nec-usb-xhci",\ .driver = "nec-usb-xhci",\
.property = "msi",\ .property = "msi",\
...@@ -683,7 +683,7 @@ static QEMUMachine pc_machine_v1_3 = { ...@@ -683,7 +683,7 @@ static QEMUMachine pc_machine_v1_3 = {
.driver = "VGA",\ .driver = "VGA",\
.property = "mmio",\ .property = "mmio",\
.value = "off",\ .value = "off",\
} },
#define PC_I440FX_1_2_MACHINE_OPTIONS \ #define PC_I440FX_1_2_MACHINE_OPTIONS \
PC_I440FX_1_4_MACHINE_OPTIONS, \ PC_I440FX_1_4_MACHINE_OPTIONS, \
...@@ -693,13 +693,13 @@ static QEMUMachine pc_machine_v1_2 = { ...@@ -693,13 +693,13 @@ static QEMUMachine pc_machine_v1_2 = {
PC_I440FX_1_2_MACHINE_OPTIONS, PC_I440FX_1_2_MACHINE_OPTIONS,
.name = "pc-1.2", .name = "pc-1.2",
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_1_2, PC_COMPAT_1_2
{ /* end of list */ } { /* end of list */ }
}, },
}; };
#define PC_COMPAT_1_1 \ #define PC_COMPAT_1_1 \
PC_COMPAT_1_2,\ PC_COMPAT_1_2 \
{\ {\
.driver = "virtio-scsi-pci",\ .driver = "virtio-scsi-pci",\
.property = "hotplug",\ .property = "hotplug",\
...@@ -728,19 +728,19 @@ static QEMUMachine pc_machine_v1_2 = { ...@@ -728,19 +728,19 @@ static QEMUMachine pc_machine_v1_2 = {
.driver = "virtio-blk-pci",\ .driver = "virtio-blk-pci",\
.property = "config-wce",\ .property = "config-wce",\
.value = "off",\ .value = "off",\
} },
static QEMUMachine pc_machine_v1_1 = { static QEMUMachine pc_machine_v1_1 = {
PC_I440FX_1_2_MACHINE_OPTIONS, PC_I440FX_1_2_MACHINE_OPTIONS,
.name = "pc-1.1", .name = "pc-1.1",
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_1_1, PC_COMPAT_1_1
{ /* end of list */ } { /* end of list */ }
}, },
}; };
#define PC_COMPAT_1_0 \ #define PC_COMPAT_1_0 \
PC_COMPAT_1_1,\ PC_COMPAT_1_1 \
{\ {\
.driver = TYPE_ISA_FDC,\ .driver = TYPE_ISA_FDC,\
.property = "check_media_rate",\ .property = "check_media_rate",\
...@@ -757,13 +757,13 @@ static QEMUMachine pc_machine_v1_1 = { ...@@ -757,13 +757,13 @@ static QEMUMachine pc_machine_v1_1 = {
.driver = TYPE_USB_DEVICE,\ .driver = TYPE_USB_DEVICE,\
.property = "full-path",\ .property = "full-path",\
.value = "no",\ .value = "no",\
} },
static QEMUMachine pc_machine_v1_0 = { static QEMUMachine pc_machine_v1_0 = {
PC_I440FX_1_2_MACHINE_OPTIONS, PC_I440FX_1_2_MACHINE_OPTIONS,
.name = "pc-1.0", .name = "pc-1.0",
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_1_0, PC_COMPAT_1_0
{ /* end of list */ } { /* end of list */ }
}, },
.hw_version = "1.0", .hw_version = "1.0",
...@@ -776,14 +776,14 @@ static QEMUMachine pc_machine_v0_15 = { ...@@ -776,14 +776,14 @@ static QEMUMachine pc_machine_v0_15 = {
PC_I440FX_1_2_MACHINE_OPTIONS, PC_I440FX_1_2_MACHINE_OPTIONS,
.name = "pc-0.15", .name = "pc-0.15",
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_0_15, PC_COMPAT_0_15
{ /* end of list */ } { /* end of list */ }
}, },
.hw_version = "0.15", .hw_version = "0.15",
}; };
#define PC_COMPAT_0_14 \ #define PC_COMPAT_0_14 \
PC_COMPAT_0_15,\ PC_COMPAT_0_15 \
{\ {\
.driver = "virtio-blk-pci",\ .driver = "virtio-blk-pci",\
.property = "event_idx",\ .property = "event_idx",\
...@@ -800,13 +800,13 @@ static QEMUMachine pc_machine_v0_15 = { ...@@ -800,13 +800,13 @@ static QEMUMachine pc_machine_v0_15 = {
.driver = "virtio-balloon-pci",\ .driver = "virtio-balloon-pci",\
.property = "event_idx",\ .property = "event_idx",\
.value = "off",\ .value = "off",\
} },
static QEMUMachine pc_machine_v0_14 = { static QEMUMachine pc_machine_v0_14 = {
PC_I440FX_1_2_MACHINE_OPTIONS, PC_I440FX_1_2_MACHINE_OPTIONS,
.name = "pc-0.14", .name = "pc-0.14",
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_0_14, PC_COMPAT_0_14
{ {
.driver = "qxl", .driver = "qxl",
.property = "revision", .property = "revision",
...@@ -822,7 +822,7 @@ static QEMUMachine pc_machine_v0_14 = { ...@@ -822,7 +822,7 @@ static QEMUMachine pc_machine_v0_14 = {
}; };
#define PC_COMPAT_0_13 \ #define PC_COMPAT_0_13 \
PC_COMPAT_0_14,\ PC_COMPAT_0_14 \
{\ {\
.driver = TYPE_PCI_DEVICE,\ .driver = TYPE_PCI_DEVICE,\
.property = "command_serr_enable",\ .property = "command_serr_enable",\
...@@ -831,7 +831,7 @@ static QEMUMachine pc_machine_v0_14 = { ...@@ -831,7 +831,7 @@ static QEMUMachine pc_machine_v0_14 = {
.driver = "AC97",\ .driver = "AC97",\
.property = "use_broken_id",\ .property = "use_broken_id",\
.value = stringify(1),\ .value = stringify(1),\
} },
#define PC_I440FX_0_13_MACHINE_OPTIONS \ #define PC_I440FX_0_13_MACHINE_OPTIONS \
PC_I440FX_1_2_MACHINE_OPTIONS, \ PC_I440FX_1_2_MACHINE_OPTIONS, \
...@@ -841,7 +841,7 @@ static QEMUMachine pc_machine_v0_13 = { ...@@ -841,7 +841,7 @@ static QEMUMachine pc_machine_v0_13 = {
PC_I440FX_0_13_MACHINE_OPTIONS, PC_I440FX_0_13_MACHINE_OPTIONS,
.name = "pc-0.13", .name = "pc-0.13",
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_0_13, PC_COMPAT_0_13
{ {
.driver = "virtio-9p-pci", .driver = "virtio-9p-pci",
.property = "vectors", .property = "vectors",
...@@ -861,7 +861,7 @@ static QEMUMachine pc_machine_v0_13 = { ...@@ -861,7 +861,7 @@ static QEMUMachine pc_machine_v0_13 = {
}; };
#define PC_COMPAT_0_12 \ #define PC_COMPAT_0_12 \
PC_COMPAT_0_13,\ PC_COMPAT_0_13 \
{\ {\
.driver = "virtio-serial-pci",\ .driver = "virtio-serial-pci",\
.property = "max_ports",\ .property = "max_ports",\
...@@ -882,13 +882,13 @@ static QEMUMachine pc_machine_v0_13 = { ...@@ -882,13 +882,13 @@ static QEMUMachine pc_machine_v0_13 = {
.driver = "usb-kbd",\ .driver = "usb-kbd",\
.property = "serial",\ .property = "serial",\
.value = "1",\ .value = "1",\
} },
static QEMUMachine pc_machine_v0_12 = { static QEMUMachine pc_machine_v0_12 = {
PC_I440FX_0_13_MACHINE_OPTIONS, PC_I440FX_0_13_MACHINE_OPTIONS,
.name = "pc-0.12", .name = "pc-0.12",
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_0_12, PC_COMPAT_0_12
{ {
.driver = "VGA", .driver = "VGA",
.property = "rombar", .property = "rombar",
...@@ -904,7 +904,7 @@ static QEMUMachine pc_machine_v0_12 = { ...@@ -904,7 +904,7 @@ static QEMUMachine pc_machine_v0_12 = {
}; };
#define PC_COMPAT_0_11 \ #define PC_COMPAT_0_11 \
PC_COMPAT_0_12,\ PC_COMPAT_0_12 \
{\ {\
.driver = "virtio-blk-pci",\ .driver = "virtio-blk-pci",\
.property = "vectors",\ .property = "vectors",\
...@@ -913,13 +913,13 @@ static QEMUMachine pc_machine_v0_12 = { ...@@ -913,13 +913,13 @@ static QEMUMachine pc_machine_v0_12 = {
.driver = TYPE_PCI_DEVICE,\ .driver = TYPE_PCI_DEVICE,\
.property = "rombar",\ .property = "rombar",\
.value = stringify(0),\ .value = stringify(0),\
} },
static QEMUMachine pc_machine_v0_11 = { static QEMUMachine pc_machine_v0_11 = {
PC_I440FX_0_13_MACHINE_OPTIONS, PC_I440FX_0_13_MACHINE_OPTIONS,
.name = "pc-0.11", .name = "pc-0.11",
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_0_11, PC_COMPAT_0_11
{ {
.driver = "ide-drive", .driver = "ide-drive",
.property = "ver", .property = "ver",
...@@ -938,7 +938,7 @@ static QEMUMachine pc_machine_v0_10 = { ...@@ -938,7 +938,7 @@ static QEMUMachine pc_machine_v0_10 = {
PC_I440FX_0_13_MACHINE_OPTIONS, PC_I440FX_0_13_MACHINE_OPTIONS,
.name = "pc-0.10", .name = "pc-0.10",
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_0_11, PC_COMPAT_0_11
{ {
.driver = "virtio-blk-pci", .driver = "virtio-blk-pci",
.property = "class", .property = "class",
......
...@@ -470,7 +470,7 @@ static QEMUMachine pc_q35_machine_v2_0 = { ...@@ -470,7 +470,7 @@ static QEMUMachine pc_q35_machine_v2_0 = {
.name = "pc-q35-2.0", .name = "pc-q35-2.0",
.init = pc_q35_init_2_0, .init = pc_q35_init_2_0,
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_2_0, PC_COMPAT_2_0
{ /* end of list */ } { /* end of list */ }
}, },
}; };
...@@ -482,7 +482,7 @@ static QEMUMachine pc_q35_machine_v1_7 = { ...@@ -482,7 +482,7 @@ static QEMUMachine pc_q35_machine_v1_7 = {
.name = "pc-q35-1.7", .name = "pc-q35-1.7",
.init = pc_q35_init_1_7, .init = pc_q35_init_1_7,
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_1_7, PC_COMPAT_1_7
{ /* end of list */ } { /* end of list */ }
}, },
}; };
...@@ -494,7 +494,7 @@ static QEMUMachine pc_q35_machine_v1_6 = { ...@@ -494,7 +494,7 @@ static QEMUMachine pc_q35_machine_v1_6 = {
.name = "pc-q35-1.6", .name = "pc-q35-1.6",
.init = pc_q35_init_1_6, .init = pc_q35_init_1_6,
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_1_6, PC_COMPAT_1_6
{ /* end of list */ } { /* end of list */ }
}, },
}; };
...@@ -504,7 +504,7 @@ static QEMUMachine pc_q35_machine_v1_5 = { ...@@ -504,7 +504,7 @@ static QEMUMachine pc_q35_machine_v1_5 = {
.name = "pc-q35-1.5", .name = "pc-q35-1.5",
.init = pc_q35_init_1_5, .init = pc_q35_init_1_5,
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_1_5, PC_COMPAT_1_5
{ /* end of list */ } { /* end of list */ }
}, },
}; };
...@@ -518,7 +518,7 @@ static QEMUMachine pc_q35_machine_v1_4 = { ...@@ -518,7 +518,7 @@ static QEMUMachine pc_q35_machine_v1_4 = {
.name = "pc-q35-1.4", .name = "pc-q35-1.4",
.init = pc_q35_init_1_4, .init = pc_q35_init_1_4,
.compat_props = (GlobalProperty[]) { .compat_props = (GlobalProperty[]) {
PC_COMPAT_1_4, PC_COMPAT_1_4
{ /* end of list */ } { /* end of list */ }
}, },
}; };
......
...@@ -353,10 +353,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); ...@@ -353,10 +353,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "ioh3420",\ .driver = "ioh3420",\
.property = COMPAT_PROP_PCP,\ .property = COMPAT_PROP_PCP,\
.value = "off",\ .value = "off",\
} },
#define PC_COMPAT_1_7 \ #define PC_COMPAT_1_7 \
PC_COMPAT_2_0, \ PC_COMPAT_2_0 \
{\ {\
.driver = TYPE_USB_DEVICE,\ .driver = TYPE_USB_DEVICE,\
.property = "msos-desc",\ .property = "msos-desc",\
...@@ -371,10 +371,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); ...@@ -371,10 +371,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "hpet",\ .driver = "hpet",\
.property = HPET_INTCAP,\ .property = HPET_INTCAP,\
.value = stringify(4),\ .value = stringify(4),\
} },
#define PC_COMPAT_1_6 \ #define PC_COMPAT_1_6 \
PC_COMPAT_1_7, \ PC_COMPAT_1_7 \
{\ {\
.driver = "e1000",\ .driver = "e1000",\
.property = "mitigation",\ .property = "mitigation",\
...@@ -395,10 +395,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); ...@@ -395,10 +395,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "q35-pcihost",\ .driver = "q35-pcihost",\
.property = "short_root_bus",\ .property = "short_root_bus",\
.value = stringify(1),\ .value = stringify(1),\
} },
#define PC_COMPAT_1_5 \ #define PC_COMPAT_1_5 \
PC_COMPAT_1_6, \ PC_COMPAT_1_6 \
{\ {\
.driver = "Conroe-" TYPE_X86_CPU,\ .driver = "Conroe-" TYPE_X86_CPU,\
.property = "model",\ .property = "model",\
...@@ -439,10 +439,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); ...@@ -439,10 +439,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "q35-pcihost",\ .driver = "q35-pcihost",\
.property = "short_root_bus",\ .property = "short_root_bus",\
.value = stringify(0),\ .value = stringify(0),\
} },
#define PC_COMPAT_1_4 \ #define PC_COMPAT_1_4 \
PC_COMPAT_1_5, \ PC_COMPAT_1_5 \
{\ {\
.driver = "scsi-hd",\ .driver = "scsi-hd",\
.property = "discard_granularity",\ .property = "discard_granularity",\
...@@ -504,7 +504,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); ...@@ -504,7 +504,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
.driver = "486-" TYPE_X86_CPU,\ .driver = "486-" TYPE_X86_CPU,\
.property = "model",\ .property = "model",\
.value = stringify(0),\ .value = stringify(0),\
} },
#define PC_COMMON_MACHINE_OPTIONS \ #define PC_COMMON_MACHINE_OPTIONS \
.default_boot_order = "cad" .default_boot_order = "cad"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册