qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

sysbus: Remove ignored return value of FindSysbusDeviceFunc

Functions of type FindSysbusDeviceFunc currently return an integer.
However, this return value is always ignored by the caller in
find_sysbus_device().

This changes the function type to return void, to avoid confusion over
the function semantics.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

authored by

David Gibson and committed by
Eduardo Habkost
4f01a637 55c911a5

+8 -16
+2 -2
hw/arm/sysbus-fdt.c
··· 436 436 * are dynamically instantiable and if so call the node creation 437 437 * function. 438 438 */ 439 - static int add_fdt_node(SysBusDevice *sbdev, void *opaque) 439 + static void add_fdt_node(SysBusDevice *sbdev, void *opaque) 440 440 { 441 441 int i, ret; 442 442 ··· 445 445 add_fdt_node_functions[i].typename)) { 446 446 ret = add_fdt_node_functions[i].add_fdt_node_fn(sbdev, opaque); 447 447 assert(!ret); 448 - return 0; 448 + return; 449 449 } 450 450 } 451 451 error_report("Device %s can not be dynamically instantiated",
+1 -1
hw/core/machine.c
··· 332 332 return ms->enforce_config_section; 333 333 } 334 334 335 - static int error_on_sysbus_device(SysBusDevice *sbdev, void *opaque) 335 + static void error_on_sysbus_device(SysBusDevice *sbdev, void *opaque) 336 336 { 337 337 error_report("Option '-device %s' cannot be handled by this machine", 338 338 object_class_get_name(object_get_class(OBJECT(sbdev))));
+2 -6
hw/core/platform-bus.c
··· 74 74 return object_property_get_int(OBJECT(sbdev_mr), "addr", NULL); 75 75 } 76 76 77 - static int platform_bus_count_irqs(SysBusDevice *sbdev, void *opaque) 77 + static void platform_bus_count_irqs(SysBusDevice *sbdev, void *opaque) 78 78 { 79 79 PlatformBusDevice *pbus = opaque; 80 80 qemu_irq sbirq; ··· 93 93 } 94 94 } 95 95 } 96 - 97 - return 0; 98 96 } 99 97 100 98 /* ··· 168 166 * For each sysbus device, look for unassigned IRQ lines as well as 169 167 * unassociated MMIO regions. Connect them to the platform bus if available. 170 168 */ 171 - static int link_sysbus_device(SysBusDevice *sbdev, void *opaque) 169 + static void link_sysbus_device(SysBusDevice *sbdev, void *opaque) 172 170 { 173 171 PlatformBusDevice *pbus = opaque; 174 172 int i; ··· 180 178 for (i = 0; sysbus_has_mmio(sbdev, i); i++) { 181 179 platform_bus_map_mmio(pbus, sbdev, i); 182 180 } 183 - 184 - return 0; 185 181 } 186 182 187 183 static void platform_bus_init_notify(Notifier *notifier, void *data)
+1 -3
hw/ppc/e500.c
··· 196 196 return 0; 197 197 } 198 198 199 - static int sysbus_device_create_devtree(SysBusDevice *sbdev, void *opaque) 199 + static void sysbus_device_create_devtree(SysBusDevice *sbdev, void *opaque) 200 200 { 201 201 PlatformDevtreeData *data = opaque; 202 202 bool matched = false; ··· 211 211 qdev_fw_name(DEVICE(sbdev))); 212 212 exit(1); 213 213 } 214 - 215 - return 0; 216 214 } 217 215 218 216 static void platform_bus_create_devtree(PPCE500Params *params, void *fdt,
+1 -3
hw/ppc/spapr.c
··· 1110 1110 } 1111 1111 } 1112 1112 1113 - static int find_unknown_sysbus_device(SysBusDevice *sbdev, void *opaque) 1113 + static void find_unknown_sysbus_device(SysBusDevice *sbdev, void *opaque) 1114 1114 { 1115 1115 bool matched = false; 1116 1116 ··· 1123 1123 qdev_fw_name(DEVICE(sbdev))); 1124 1124 exit(1); 1125 1125 } 1126 - 1127 - return 0; 1128 1126 } 1129 1127 1130 1128 static void ppc_spapr_reset(void)
+1 -1
include/hw/sysbus.h
··· 75 75 uint32_t pio[QDEV_MAX_PIO]; 76 76 }; 77 77 78 - typedef int FindSysbusDeviceFunc(SysBusDevice *sbdev, void *opaque); 78 + typedef void FindSysbusDeviceFunc(SysBusDevice *sbdev, void *opaque); 79 79 80 80 void sysbus_init_mmio(SysBusDevice *dev, MemoryRegion *memory); 81 81 MemoryRegion *sysbus_mmio_get_region(SysBusDevice *dev, int n);