From e0985450e134db99e2ee167e9cd0087a51220d8f Mon Sep 17 00:00:00 2001 From: Eduardo Habkost Date: Mon, 7 Jan 2019 17:30:19 -0200 Subject: machine: Eliminate unnecessary stringify() usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Message-Id: <20190107193020.21744-3-ehabkost@redhat.com> Reviewed-by: Marc-André Lureau Reviewed-by: David Gibson Reviewed-by: Cornelia Huck Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Eduardo Habkost --- hw/core/machine.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hw/core/machine.c') 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", -- cgit 1.4.1