Re: [PATCH kvm-unit-tests v6 11/14] pci: edu: introduce pci-edu helpers

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

 



On Wed, Nov 23, 2016 at 06:57:31PM +0800, Peter Xu wrote:
> +bool edu_init(struct pci_edu_dev *dev)
> +{
> +	pcidevaddr_t dev_addr;
> +
> +	dev_addr = pci_find_dev(PCI_VENDOR_ID_QEMU, PCI_DEVICE_ID_EDU);
> +	if (dev_addr == PCIDEVADDR_INVALID)
> +		return false;
> +
> +	pci_dev_init(&dev->pci_dev, dev_addr);
> +	pci_enable_defaults(&dev->pci_dev);
> +	assert(edu_check_alive(dev));

It is rather a question to Andrew.
Were not you opposed to placing function calls into asserts?

Thanks!

> +	return true;
> +}
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux