aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/pc_piix.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2019-01-07 17:30:19 -0200
committerEduardo Habkost <ehabkost@redhat.com>2019-01-09 22:10:00 -0200
commite0985450e134db99e2ee167e9cd0087a51220d8f (patch)
treef529184bd63808f5824b2512ec05f312c503f280 /hw/i386/pc_piix.c
parentb3bcb3cedf58cb3c64a20712861ed9382773fd6b (diff)
downloadqemu-e0985450e134db99e2ee167e9cd0087a51220d8f.zip
qemu-e0985450e134db99e2ee167e9cd0087a51220d8f.tar.gz
qemu-e0985450e134db99e2ee167e9cd0087a51220d8f.tar.bz2
machine: Eliminate unnecessary stringify() usage
stringify() is useful when we need to use macros in compat_props (like when we set virtio-baloon-pci.class=PCI_CLASS_MEMORY_RAM at pc_i440fx_1_0_machine_options()), but it is pointless when we are already providing a number literal. Replace stringify() with string literals when appropriate. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190107193020.21744-3-ehabkost@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'hw/i386/pc_piix.c')
-rw-r--r--hw/i386/pc_piix.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index ed69846..fd20227 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -697,7 +697,7 @@ static void pc_i440fx_1_3_machine_options(MachineClass *m)
{
.driver = "usb-tablet",
.property = "usb_version",
- .value = stringify(1),
+ .value = "1",
},{
.driver = "virtio-net-pci",
.property = "ctrl_mac_addr",
@@ -741,11 +741,11 @@ static void pc_i440fx_1_2_machine_options(MachineClass *m)
},{
.driver = "qxl",
.property = "revision",
- .value = stringify(3),
+ .value = "3",
},{
.driver = "qxl-vga",
.property = "revision",
- .value = stringify(3),
+ .value = "3",
},{
.driver = "VGA",
.property = "mmio",
@@ -777,19 +777,19 @@ static void pc_i440fx_1_1_machine_options(MachineClass *m)
},{
.driver = "VGA",
.property = "vgamem_mb",
- .value = stringify(8),
+ .value = "8",
},{
.driver = "vmware-svga",
.property = "vgamem_mb",
- .value = stringify(8),
+ .value = "8",
},{
.driver = "qxl-vga",
.property = "vgamem_mb",
- .value = stringify(8),
+ .value = "8",
},{
.driver = "qxl",
.property = "vgamem_mb",
- .value = stringify(8),
+ .value = "8",
},{
.driver = "virtio-blk-pci",
.property = "config-wce",
@@ -876,11 +876,11 @@ static void pc_i440fx_0_14_machine_options(MachineClass *m)
},{
.driver = "qxl",
.property = "revision",
- .value = stringify(2),
+ .value = "2",
},{
.driver = "qxl-vga",
.property = "revision",
- .value = stringify(2),
+ .value = "2",
},
};
@@ -904,19 +904,19 @@ static void pc_i440fx_0_13_machine_options(MachineClass *m)
},{
.driver = "AC97",
.property = "use_broken_id",
- .value = stringify(1),
+ .value = "1",
},{
.driver = "virtio-9p-pci",
.property = "vectors",
- .value = stringify(0),
+ .value = "0",
},{
.driver = "VGA",
.property = "rombar",
- .value = stringify(0),
+ .value = "0",
},{
.driver = "vmware-svga",
.property = "rombar",
- .value = stringify(0),
+ .value = "0",
},
};
@@ -936,11 +936,11 @@ static void pc_i440fx_0_12_machine_options(MachineClass *m)
{
.driver = "virtio-serial-pci",
.property = "max_ports",
- .value = stringify(1),
+ .value = "1",
},{
.driver = "virtio-serial-pci",
.property = "vectors",
- .value = stringify(0),
+ .value = "0",
},{
.driver = "usb-mouse",
.property = "serial",