summaryrefslogtreecommitdiff
path: root/drivers/pci/iov.c
diff options
context:
space:
mode:
authorMyron Stowe <myron.stowe@redhat.com>2014-11-11 08:04:50 -0700
committerBjorn Helgaas <bhelgaas@google.com>2014-11-19 15:07:43 -0700
commit26ff46c6f23bb1497aaa1364a5c73a109493b653 (patch)
tree27c28c889186f055f298bcf440cd733cf19eb741 /drivers/pci/iov.c
parent7e79c5f8cad2ac1dc26c03e1aa16216391a04dad (diff)
PCI: Remove fixed parameter in pci_iov_resource_bar()
pci_iov_resource_bar() always sets its 'pci_bar_type' parameter to 'pci_bar_unknown'. Drop the parameter and just use 'pci_bar_unknown' directly in the callers. No functional change intended. Signed-off-by: Myron Stowe <myron.stowe@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Chris Wright <chrisw@sous-sol.org> CC: Yu Zhao <yuzhao@google.com>
Diffstat (limited to 'drivers/pci/iov.c')
-rw-r--r--drivers/pci/iov.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 4d109c07294a..4b3a4eaad996 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -479,20 +479,16 @@ void pci_iov_release(struct pci_dev *dev)
* pci_iov_resource_bar - get position of the SR-IOV BAR
* @dev: the PCI device
* @resno: the resource number
- * @type: the BAR type to be filled in
*
* Returns position of the BAR encapsulated in the SR-IOV capability.
*/
-int pci_iov_resource_bar(struct pci_dev *dev, int resno,
- enum pci_bar_type *type)
+int pci_iov_resource_bar(struct pci_dev *dev, int resno)
{
if (resno < PCI_IOV_RESOURCES || resno > PCI_IOV_RESOURCE_END)
return 0;
BUG_ON(!dev->is_physfn);
- *type = pci_bar_unknown;
-
return dev->sriov->pos + PCI_SRIOV_BAR +
4 * (resno - PCI_IOV_RESOURCES);
}
@@ -510,13 +506,12 @@ int pci_iov_resource_bar(struct pci_dev *dev, int resno,
resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev, int resno)
{
struct resource tmp;
- enum pci_bar_type type;
- int reg = pci_iov_resource_bar(dev, resno, &type);
+ int reg = pci_iov_resource_bar(dev, resno);
if (!reg)
return 0;
- __pci_read_base(dev, type, &tmp, reg);
+ __pci_read_base(dev, pci_bar_unknown, &tmp, reg);
return resource_alignment(&tmp);
}