return value for "if (!dev->is_physfn)"

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

 



Looking at drivers/pci/iov.c I see at least 3 different return values
for if (!dev->is_physfn).

sriov_enable() and pci_enable_sriov()
[...]
	if (!dev->is_physfn)
		return -ENODEV;
pci_num_vf() and pci_vfs_assigned()
[...]
	if (!dev->is_physfn)
		return 0;
pci_sriov_set_totalvfs() and pci_sriov_get_totalvfs()
[...]
	if (!dev->is_physfn)
		return -EINVAL;

I'd like to make this consistently return one of the above. Question is,
which one should it be? I'd lean towards -ENODEV, other opinions?

  Stefan
--
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