Am 08.01.2013 16:57, schrieb Alberto Garcia: > On Tue, Jan 08, 2013 at 02:55:56PM +0100, Andreas Färber wrote: > >> IPACK_DEVICE() >> >> You have them defined in the header, please use them consistently. >> >> Also, please avoid accessing internals like &s->bus.qbus >> (BUS(s->bus)) or &s->dev.qdev (DEVICE(s->dev)). > > Ok, I'm using all the defined macros and replaced all instances of > DO_UPCAST() with their checked equivalents. > > I also removed all accesses to internals.
qdev->parent_bus is not supposed to be accessed either, there is qdev_get_parent_bus() as accessor function. > And I defined ipack_bus_new_inplace() (in the spirit of > pci_bus_new_inplace()) and updated tpci200_initfn(). Note that Paolo has a series refactoring the in-place bus init (either for qdev reset or for QOM reference counting) that you may want to take into account then. Having the IPackBus not be a pointer but part of the exposing device initialized in-place would be desirable long-term but, like some other issues raised, not a criteria for initial patch acceptance IMO. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg