Am 25.01.2013 14:12, schrieb Paolo Bonzini: > Make it clear that no BUS() macro is needed in the callers (in fact it > wouldn't work because the object has not been initialized yet with the > right class). > > Suggested-by: Andreas Faerber <afaer...@suse.de> > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
Acked-by: Andreas Färber <afaer...@suse.de> But we should adjust most current callers then: hw/ide/qdev.c: qbus_create_inplace(&idebus->qbus, TYPE_IDE_BUS, dev, NULL); ..._inplace(idebus, ...) hw/intel-hda.c: qbus_create_inplace(&bus->qbus, TYPE_HDA_BUS, dev, NULL); hw/ipack.c: qbus_create_inplace(&bus->qbus, TYPE_IPACK_BUS, parent, name); hw/pci/pci.c: qbus_create_inplace(&bus->qbus, TYPE_PCI_BUS, parent, name); hw/pci/pci_bridge.c: qbus_create_inplace(&sec_bus->qbus, TYPE_PCI_BUS, &dev->qdev, hw/s390-virtio-bus.c: qbus_create_inplace((BusState *)bus, TYPE_VIRTIO_S390_BUS, qdev, NULL); ..._inplace(bus, ...) hw/s390x/event-facility.c: qbus_create_inplace(&event_facility->sbus.qbus, hw/scsi-bus.c: qbus_create_inplace(&bus->qbus, TYPE_SCSI_BUS, host, NULL); hw/usb/bus.c: qbus_create_inplace(&bus->qbus, TYPE_USB_BUS, host, NULL); hw/usb/dev-smartcard-reader.c: qbus_create_inplace(&s->bus.qbus, TYPE_CCID_BUS, &dev->qdev, NULL); hw/virtio-pci.c: qbus_create_inplace((BusState *)bus, TYPE_VIRTIO_PCI_BUS, qdev, NULL); hw/virtio-serial-bus.c: qbus_create_inplace(&vser->bus.qbus, TYPE_VIRTIO_SERIAL_BUS, dev, NULL); Should I send a follow-up patch for that or do you want to squash it into yours to show the utility of your change? Another caller with a cast is arriving in today's ppc pull (ADB in cuda.c - 10/21). Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg