From a7cde24dc2f104c8e5861df0e2938e79264e9d58 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Thu, 14 May 2015 15:53:00 -0300 Subject: [PATCH] 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: Eduardo Habkost Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/pc_piix.c | 62 ++++++++++++++++++++++---------------------- hw/i386/pc_q35.c | 10 +++---- include/hw/i386/pc.h | 18 ++++++------- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 608539d42f..25da8a5025 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -574,7 +574,7 @@ static QEMUMachine pc_i440fx_machine_v2_0 = { .name = "pc-i440fx-2.0", .init = pc_init_pci_2_0, .compat_props = (GlobalProperty[]) { - PC_COMPAT_2_0, + PC_COMPAT_2_0 { /* end of list */ } }, }; @@ -586,7 +586,7 @@ static QEMUMachine pc_i440fx_machine_v1_7 = { .name = "pc-i440fx-1.7", .init = pc_init_pci_1_7, .compat_props = (GlobalProperty[]) { - PC_COMPAT_1_7, + PC_COMPAT_1_7 { /* end of list */ } }, }; @@ -598,7 +598,7 @@ static QEMUMachine pc_i440fx_machine_v1_6 = { .name = "pc-i440fx-1.6", .init = pc_init_pci_1_6, .compat_props = (GlobalProperty[]) { - PC_COMPAT_1_6, + PC_COMPAT_1_6 { /* end of list */ } }, }; @@ -608,7 +608,7 @@ static QEMUMachine pc_i440fx_machine_v1_5 = { .name = "pc-i440fx-1.5", .init = pc_init_pci_1_5, .compat_props = (GlobalProperty[]) { - PC_COMPAT_1_5, + PC_COMPAT_1_5 { /* end of list */ } }, }; @@ -622,13 +622,13 @@ static QEMUMachine pc_i440fx_machine_v1_4 = { .name = "pc-i440fx-1.4", .init = pc_init_pci_1_4, .compat_props = (GlobalProperty[]) { - PC_COMPAT_1_4, + PC_COMPAT_1_4 { /* end of list */ } }, }; #define PC_COMPAT_1_3 \ - PC_COMPAT_1_4, \ + PC_COMPAT_1_4 \ {\ .driver = "usb-tablet",\ .property = "usb_version",\ @@ -645,20 +645,20 @@ static QEMUMachine pc_i440fx_machine_v1_4 = { .driver = "e1000",\ .property = "autonegotiation",\ .value = "off",\ - } + }, static QEMUMachine pc_machine_v1_3 = { PC_I440FX_1_4_MACHINE_OPTIONS, .name = "pc-1.3", .init = pc_init_pci_1_3, .compat_props = (GlobalProperty[]) { - PC_COMPAT_1_3, + PC_COMPAT_1_3 { /* end of list */ } }, }; #define PC_COMPAT_1_2 \ - PC_COMPAT_1_3,\ + PC_COMPAT_1_3 \ {\ .driver = "nec-usb-xhci",\ .property = "msi",\ @@ -683,7 +683,7 @@ static QEMUMachine pc_machine_v1_3 = { .driver = "VGA",\ .property = "mmio",\ .value = "off",\ - } + }, #define PC_I440FX_1_2_MACHINE_OPTIONS \ PC_I440FX_1_4_MACHINE_OPTIONS, \ @@ -693,13 +693,13 @@ static QEMUMachine pc_machine_v1_2 = { PC_I440FX_1_2_MACHINE_OPTIONS, .name = "pc-1.2", .compat_props = (GlobalProperty[]) { - PC_COMPAT_1_2, + PC_COMPAT_1_2 { /* end of list */ } }, }; #define PC_COMPAT_1_1 \ - PC_COMPAT_1_2,\ + PC_COMPAT_1_2 \ {\ .driver = "virtio-scsi-pci",\ .property = "hotplug",\ @@ -728,19 +728,19 @@ static QEMUMachine pc_machine_v1_2 = { .driver = "virtio-blk-pci",\ .property = "config-wce",\ .value = "off",\ - } + }, static QEMUMachine pc_machine_v1_1 = { PC_I440FX_1_2_MACHINE_OPTIONS, .name = "pc-1.1", .compat_props = (GlobalProperty[]) { - PC_COMPAT_1_1, + PC_COMPAT_1_1 { /* end of list */ } }, }; #define PC_COMPAT_1_0 \ - PC_COMPAT_1_1,\ + PC_COMPAT_1_1 \ {\ .driver = TYPE_ISA_FDC,\ .property = "check_media_rate",\ @@ -757,13 +757,13 @@ static QEMUMachine pc_machine_v1_1 = { .driver = TYPE_USB_DEVICE,\ .property = "full-path",\ .value = "no",\ - } + }, static QEMUMachine pc_machine_v1_0 = { PC_I440FX_1_2_MACHINE_OPTIONS, .name = "pc-1.0", .compat_props = (GlobalProperty[]) { - PC_COMPAT_1_0, + PC_COMPAT_1_0 { /* end of list */ } }, .hw_version = "1.0", @@ -776,14 +776,14 @@ static QEMUMachine pc_machine_v0_15 = { PC_I440FX_1_2_MACHINE_OPTIONS, .name = "pc-0.15", .compat_props = (GlobalProperty[]) { - PC_COMPAT_0_15, + PC_COMPAT_0_15 { /* end of list */ } }, .hw_version = "0.15", }; #define PC_COMPAT_0_14 \ - PC_COMPAT_0_15,\ + PC_COMPAT_0_15 \ {\ .driver = "virtio-blk-pci",\ .property = "event_idx",\ @@ -800,13 +800,13 @@ static QEMUMachine pc_machine_v0_15 = { .driver = "virtio-balloon-pci",\ .property = "event_idx",\ .value = "off",\ - } + }, static QEMUMachine pc_machine_v0_14 = { PC_I440FX_1_2_MACHINE_OPTIONS, .name = "pc-0.14", .compat_props = (GlobalProperty[]) { - PC_COMPAT_0_14, + PC_COMPAT_0_14 { .driver = "qxl", .property = "revision", @@ -822,7 +822,7 @@ static QEMUMachine pc_machine_v0_14 = { }; #define PC_COMPAT_0_13 \ - PC_COMPAT_0_14,\ + PC_COMPAT_0_14 \ {\ .driver = TYPE_PCI_DEVICE,\ .property = "command_serr_enable",\ @@ -831,7 +831,7 @@ static QEMUMachine pc_machine_v0_14 = { .driver = "AC97",\ .property = "use_broken_id",\ .value = stringify(1),\ - } + }, #define PC_I440FX_0_13_MACHINE_OPTIONS \ PC_I440FX_1_2_MACHINE_OPTIONS, \ @@ -841,7 +841,7 @@ static QEMUMachine pc_machine_v0_13 = { PC_I440FX_0_13_MACHINE_OPTIONS, .name = "pc-0.13", .compat_props = (GlobalProperty[]) { - PC_COMPAT_0_13, + PC_COMPAT_0_13 { .driver = "virtio-9p-pci", .property = "vectors", @@ -861,7 +861,7 @@ static QEMUMachine pc_machine_v0_13 = { }; #define PC_COMPAT_0_12 \ - PC_COMPAT_0_13,\ + PC_COMPAT_0_13 \ {\ .driver = "virtio-serial-pci",\ .property = "max_ports",\ @@ -882,13 +882,13 @@ static QEMUMachine pc_machine_v0_13 = { .driver = "usb-kbd",\ .property = "serial",\ .value = "1",\ - } + }, static QEMUMachine pc_machine_v0_12 = { PC_I440FX_0_13_MACHINE_OPTIONS, .name = "pc-0.12", .compat_props = (GlobalProperty[]) { - PC_COMPAT_0_12, + PC_COMPAT_0_12 { .driver = "VGA", .property = "rombar", @@ -904,7 +904,7 @@ static QEMUMachine pc_machine_v0_12 = { }; #define PC_COMPAT_0_11 \ - PC_COMPAT_0_12,\ + PC_COMPAT_0_12 \ {\ .driver = "virtio-blk-pci",\ .property = "vectors",\ @@ -913,13 +913,13 @@ static QEMUMachine pc_machine_v0_12 = { .driver = TYPE_PCI_DEVICE,\ .property = "rombar",\ .value = stringify(0),\ - } + }, static QEMUMachine pc_machine_v0_11 = { PC_I440FX_0_13_MACHINE_OPTIONS, .name = "pc-0.11", .compat_props = (GlobalProperty[]) { - PC_COMPAT_0_11, + PC_COMPAT_0_11 { .driver = "ide-drive", .property = "ver", @@ -938,7 +938,7 @@ static QEMUMachine pc_machine_v0_10 = { PC_I440FX_0_13_MACHINE_OPTIONS, .name = "pc-0.10", .compat_props = (GlobalProperty[]) { - PC_COMPAT_0_11, + PC_COMPAT_0_11 { .driver = "virtio-blk-pci", .property = "class", diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 36b8834925..d0d70e8b90 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -470,7 +470,7 @@ static QEMUMachine pc_q35_machine_v2_0 = { .name = "pc-q35-2.0", .init = pc_q35_init_2_0, .compat_props = (GlobalProperty[]) { - PC_COMPAT_2_0, + PC_COMPAT_2_0 { /* end of list */ } }, }; @@ -482,7 +482,7 @@ static QEMUMachine pc_q35_machine_v1_7 = { .name = "pc-q35-1.7", .init = pc_q35_init_1_7, .compat_props = (GlobalProperty[]) { - PC_COMPAT_1_7, + PC_COMPAT_1_7 { /* end of list */ } }, }; @@ -494,7 +494,7 @@ static QEMUMachine pc_q35_machine_v1_6 = { .name = "pc-q35-1.6", .init = pc_q35_init_1_6, .compat_props = (GlobalProperty[]) { - PC_COMPAT_1_6, + PC_COMPAT_1_6 { /* end of list */ } }, }; @@ -504,7 +504,7 @@ static QEMUMachine pc_q35_machine_v1_5 = { .name = "pc-q35-1.5", .init = pc_q35_init_1_5, .compat_props = (GlobalProperty[]) { - PC_COMPAT_1_5, + PC_COMPAT_1_5 { /* end of list */ } }, }; @@ -518,7 +518,7 @@ static QEMUMachine pc_q35_machine_v1_4 = { .name = "pc-q35-1.4", .init = pc_q35_init_1_4, .compat_props = (GlobalProperty[]) { - PC_COMPAT_1_4, + PC_COMPAT_1_4 { /* end of list */ } }, }; diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 7673a4dfce..ab862e3c6f 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -353,10 +353,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); .driver = "ioh3420",\ .property = COMPAT_PROP_PCP,\ .value = "off",\ - } + }, #define PC_COMPAT_1_7 \ - PC_COMPAT_2_0, \ + PC_COMPAT_2_0 \ {\ .driver = TYPE_USB_DEVICE,\ .property = "msos-desc",\ @@ -371,10 +371,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); .driver = "hpet",\ .property = HPET_INTCAP,\ .value = stringify(4),\ - } + }, #define PC_COMPAT_1_6 \ - PC_COMPAT_1_7, \ + PC_COMPAT_1_7 \ {\ .driver = "e1000",\ .property = "mitigation",\ @@ -395,10 +395,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); .driver = "q35-pcihost",\ .property = "short_root_bus",\ .value = stringify(1),\ - } + }, #define PC_COMPAT_1_5 \ - PC_COMPAT_1_6, \ + PC_COMPAT_1_6 \ {\ .driver = "Conroe-" TYPE_X86_CPU,\ .property = "model",\ @@ -439,10 +439,10 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); .driver = "q35-pcihost",\ .property = "short_root_bus",\ .value = stringify(0),\ - } + }, #define PC_COMPAT_1_4 \ - PC_COMPAT_1_5, \ + PC_COMPAT_1_5 \ {\ .driver = "scsi-hd",\ .property = "discard_granularity",\ @@ -504,7 +504,7 @@ bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *); .driver = "486-" TYPE_X86_CPU,\ .property = "model",\ .value = stringify(0),\ - } + }, #define PC_COMMON_MACHINE_OPTIONS \ .default_boot_order = "cad" -- GitLab