Hi,

On Wed, 2 Dec 2015 16:00:41 +0200, mar...@redhat.com wrote:
> > As I can't decide what's better, I'm following your initial suggestion
> > and submit for maintainers to review.
> 
> Sure, and thanks for the patience to get to the bottom of it.

Sorry, your initial suggestion testing 'pci_bus_is_express() &&
!pci_bus_is_root()' within 'virtio_pci_dc_realize' will not do the job
as in that place pci_dev->bus is still NULL...
It's only assigned at pci_qdev_realize.

I think this is the main reason for separation.

The classes themselves describe the type of the device, which is either
pci or pcie, using k->is_express.

The class code can't tell whether the actual device instance gets
attached to a pci or pcie bus.

So yes, 'pci_is_express' really states whether device instance *can* be
an pcie device.

Thus, I'm going with my initial suggestion, plus minor naming changes.

Many thanks!

Reply via email to