From: Stefan Assmann <sassmann@kpanic.de>
To: linux-pci@vger.kernel.org
Cc: bhelgaas@google.com, yu.zhao@intel.com, "Duyck,
Alexander H" <alexander.h.duyck@intel.com>
Subject: return value for "if (!dev->is_physfn)"
Date: Fri, 26 Jul 2013 11:55:20 +0200 [thread overview]
Message-ID: <51F24788.6010505@kpanic.de> (raw)
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
next reply other threads:[~2013-07-26 10:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-26 9:55 Stefan Assmann [this message]
2013-07-26 16:43 ` return value for "if (!dev->is_physfn)" Alexander Duyck
2013-07-29 20:48 ` Don Dutile
2013-07-29 21:40 ` Alexander Duyck
2013-07-29 21:47 ` Don Dutile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51F24788.6010505@kpanic.de \
--to=sassmann@kpanic.de \
--cc=alexander.h.duyck@intel.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=yu.zhao@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).