summary refs log tree commit diff stats
path: root/hw/core/machine.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/core/machine.c
parentb3bcb3cedf58cb3c64a20712861ed9382773fd6b (diff)
downloadfocaccia-qemu-e0985450e134db99e2ee167e9cd0087a51220d8f.tar.gz
focaccia-qemu-e0985450e134db99e2ee167e9cd0087a51220d8f.zip
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/core/machine.c')
-rw-r--r--hw/core/machine.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/core/machine.c b/hw/core/machine.c
index f8563efb86..4b4d6c23de 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -135,11 +135,11 @@ GlobalProperty hw_compat_2_8[] = {
     {
         .driver   = "fw_cfg_mem",
         .property = "x-file-slots",
-        .value    = stringify(0x10),
+        .value    = "0x10",
     },{
         .driver   = "fw_cfg_io",
         .property = "x-file-slots",
-        .value    = stringify(0x10),
+        .value    = "0x10",
     },{
         .driver   = "pflash_cfi01",
         .property = "old-multiple-chip-handling",
@@ -337,11 +337,11 @@ GlobalProperty hw_compat_2_1[] = {
     },{
         .driver   = "usb-mouse",
         .property = "usb_version",
-        .value    = stringify(1),
+        .value    = "1",
     },{
         .driver   = "usb-kbd",
         .property = "usb_version",
-        .value    = stringify(1),
+        .value    = "1",
     },{
         .driver   = "virtio-pci",
         .property = "virtio-pci-bus-master-bug-migration",