[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges |
Date: |
Thu, 05 Jul 2012 12:15:04 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120601 Thunderbird/13.0 |
Am 05.07.2012 11:53, schrieb Paolo Bonzini:
> Il 05/07/2012 00:34, Andreas Färber ha scritto:
>>>> Just to clarify: replacing upcasts which are always safe
>>>> with downcasts which can fail is what I consider especially ugly.
>> As per Anthony the parent field in the QOM instance structs is not
>> supposed to be touched (cf. object.h). We mark it /*< private >*/ so
>> that it doesn't even show up in gtk-doc documentation. If it is unused,
>> its name becomes irrelevant and could even be "reserved" if we so
>> wanted. Renaming it to whatever proves that all old references are gone.
>
> I disagree with removing static checks whenever possible.
>
>> Background is that qdev and QOM work differently with regards to
>> inheritance: as mentioned in the preceding patch, for qdev the parent
>> was (had to be) identified by name and could be anywhere in the struct;
>
> Not entirely true, being at the beginning of the struct is already
> enforced by using DO_UPCAST (which is admittedly a strange name for a
> downcast macro) instead of container_of.
If you look at the patchset you will find that it was not properly enforced!
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH v3 11/14] unin_pci: QOM'ify UniNorth PCI host bridges, (continued)
- [Qemu-devel] [PATCH v3 11/14] unin_pci: QOM'ify UniNorth PCI host bridges, Andreas Färber, 2012/07/04
- [Qemu-devel] [PATCH v3 13/14] pci: Derive PCI host bridges from TYPE_PCI_HOST_BRIDGE, Andreas Färber, 2012/07/04
- [Qemu-devel] [PATCH v3 08/14] ppce500_pci: QOM'ify e500 PCI host bridge, Andreas Färber, 2012/07/04
- [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges, Andreas Färber, 2012/07/04
- Message not available
- Re: [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges, Paolo Bonzini, 2012/07/05
- Re: [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges,
Andreas Färber <=
- Re: [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges, Paolo Bonzini, 2012/07/05
- Re: [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges, Michael S. Tsirkin, 2012/07/05
- Message not available
- Re: [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges, Michael S. Tsirkin, 2012/07/05
- Re: [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges, Andreas Färber, 2012/07/05
- Re: [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges, Anthony Liguori, 2012/07/05
- Re: [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges, Michael S. Tsirkin, 2012/07/05
- Re: [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges, Andreas Färber, 2012/07/05
- Re: [Qemu-devel] [PATCH v3 14/14] pci: Tidy up PCI host bridges, Michael S. Tsirkin, 2012/07/05
[Qemu-devel] [PATCH v3 12/14] pci_host: Turn into SysBus-derived QOM type, Andreas Färber, 2012/07/04