Am 25.06.2013 16:15, schrieb Paolo Bonzini: > Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> > --- > hw/usb/hcd-ehci-sysbus.c | 2 +- > hw/usb/hcd-ehci.c | 8 ++++---- > hw/usb/hcd-ohci.c | 3 ++- > hw/usb/hcd-uhci.c | 4 +++- > hw/usb/hcd-xhci.c | 12 ++++++------ > hw/virtio/virtio-pci.c | 4 ++-- > hw/watchdog/wdt_i6300esb.c | 3 ++- > hw/xen/xen_apic.c | 4 ++-- > hw/xen/xen_platform.c | 7 ++++--- > hw/xen/xen_pt.c | 4 ++-- > hw/xen/xen_pt_msi.c | 3 ++- > hw/xtensa/xtensa_lx60.c | 2 +- > 12 files changed, 31 insertions(+), 25 deletions(-) > > diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c > index 76b4c05..54147b5 100644 > --- a/hw/usb/hcd-ehci-sysbus.c > +++ b/hw/usb/hcd-ehci-sysbus.c > @@ -173,7 +173,7 @@ static void fusbh200_ehci_init(Object *obj) > FUSBH200EHCIState *f = FUSBH200_EHCI(obj); > EHCIState *s = &i->ehci; > > - memory_region_init_io(&f->mem_vendor, NULL, &fusbh200_ehci_mmio_ops, s, > + memory_region_init_io(&f->mem_vendor, OBJECT(f), > &fusbh200_ehci_mmio_ops, s, > "fusbh200", 0x4c); > memory_region_add_subregion(&s->mem, > s->opregbase + s->portscbase + 4 * s->portnr, [snip]
I happened to notice that the scripted approach you describe in the cover letter causes some unnecessary indirection here: In this hunk a human could've just supplied the function argument obj. But since OBJECT() is not a dynamic cast and f is referenced on the same line for the MemoryRegion itself, I guess there is no harm in always using OBJECT(f) for simplicity. Regards, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg