Re: [PATCH 4/6] pci/dmar/sriov: use physfn to search drhd for VF

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 > +#ifdef CONFIG_PCI_IOV
 > +	if (dev->is_virtfn)
 > +		dev = dev->physfn;
 > +#endif

Seems we would prefer to avoid this ifdef... if we had a function like

	struct pci_dev *pci_physfn(struct pci_dev *virtfn)

as an inline in <linux/pci.h> that just returns NULL if PCI_IOV is not
enabled, then we could write this as

	if (dev->is_virtfn)
		dev = pci_physfn(dev)

without any #ifdef.
-- 
Roland Dreier <rolandd@xxxxxxxxx> || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux