Re: [PATCH 2/2] nvme/pci: Enable SR-IOV capabilities

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

 



On Mon, May 23, 2016 at 01:21:44PM -0400, Keith Busch wrote:
> 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.

Oops, sorry, excuse me while I wipe the egg off my face :)
--
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