Re: [PATCH v2 1/6] PCI: Expose reset_type to users of __pci_reset_function_locked()

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

 



On 9/14/2018 6:27 PM, Alex Williamson wrote:
+int __pci_reset_function_locked(struct pci_dev *dev, u32 reset_type)
  {
-	int rc;
+	int rc = 0;
What's the proper return value when a user passes zero for reset_type?
It seems to currently be: user provided no options, therefore we tried
none, therefore success.  I'm torn whether that's entirely bogus to the
point of that we should WARN_ON (ie. caller bug), or simply return
-EINVAL, which the caller can ignore, or if there's some value to allow
the behavior here. Thanks,

Yeah, even I'm inconsistent in this series. I return -EINVAL on pci_reset_bus()
as an example. Maybe, I'll just return -EINVAL here too.

WARN_ON would be too much IMO.



[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