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>
This commit is contained in:
Eduardo Habkost 2019-01-07 17:30:19 -02:00
parent b3bcb3cedf
commit e0985450e1
4 changed files with 67 additions and 67 deletions

View file

@ -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",