linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* return value for "if (!dev->is_physfn)"
@ 2013-07-26  9:55 Stefan Assmann
  2013-07-26 16:43 ` Alexander Duyck
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Assmann @ 2013-07-26  9:55 UTC (permalink / raw)
  To: linux-pci; +Cc: bhelgaas, yu.zhao, Duyck, Alexander H

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-29 21:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-26  9:55 return value for "if (!dev->is_physfn)" Stefan Assmann
2013-07-26 16:43 ` Alexander Duyck
2013-07-29 20:48   ` Don Dutile
2013-07-29 21:40     ` Alexander Duyck
2013-07-29 21:47       ` Don Dutile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).