[PATCH 2/2] nvme/pci: Enable SR-IOV capabilities
Keith Busch
keith.busch at intel.com
Mon May 23 10:21:44 PDT 2016
On Mon, May 23, 2016 at 12:06:52PM -0500, Bjorn Helgaas wrote:
> I do not subscribe to the belief that every function should have a
> single exit. In this case, I think it makes the function much harder
> to understand than this:
No problem with multiple exists.
> if (numvfs == 0)
> pci_disable_sriov(pdev);
> return 0;
> }
>
> return pci_enable_sriov(pdev, numvfs);
Slight change to the above: pci_enable_sriov returns 0 on success,
but a driver's .sriov_configure is supposed to return the number of
VF's successfully configured, so need to return 'numvfs' on success.
More information about the Linux-nvme
mailing list