diff options
author | Myron Stowe <myron.stowe@redhat.com> | 2014-11-11 10:04:50 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-11-19 17:07:43 -0500 |
commit | 26ff46c6f23bb1497aaa1364a5c73a109493b653 (patch) | |
tree | 27c28c889186f055f298bcf440cd733cf19eb741 /drivers/pci/iov.c | |
parent | 7e79c5f8cad2ac1dc26c03e1aa16216391a04dad (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.c | 11 |
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) | |||
479 | * pci_iov_resource_bar - get position of the SR-IOV BAR | 479 | * pci_iov_resource_bar - get position of the SR-IOV BAR |
480 | * @dev: the PCI device | 480 | * @dev: the PCI device |
481 | * @resno: the resource number | 481 | * @resno: the resource number |
482 | * @type: the BAR type to be filled in | ||
483 | * | 482 | * |
484 | * Returns position of the BAR encapsulated in the SR-IOV capability. | 483 | * Returns position of the BAR encapsulated in the SR-IOV capability. |
485 | */ | 484 | */ |
486 | int pci_iov_resource_bar(struct pci_dev *dev, int resno, | 485 | int pci_iov_resource_bar(struct pci_dev *dev, int resno) |
487 | enum pci_bar_type *type) | ||
488 | { | 486 | { |
489 | if (resno < PCI_IOV_RESOURCES || resno > PCI_IOV_RESOURCE_END) | 487 | if (resno < PCI_IOV_RESOURCES || resno > PCI_IOV_RESOURCE_END) |
490 | return 0; | 488 | return 0; |
491 | 489 | ||
492 | BUG_ON(!dev->is_physfn); | 490 | BUG_ON(!dev->is_physfn); |
493 | 491 | ||
494 | *type = pci_bar_unknown; | ||
495 | |||
496 | return dev->sriov->pos + PCI_SRIOV_BAR + | 492 | return dev->sriov->pos + PCI_SRIOV_BAR + |
497 | 4 * (resno - PCI_IOV_RESOURCES); | 493 | 4 * (resno - PCI_IOV_RESOURCES); |
498 | } | 494 | } |
@@ -510,13 +506,12 @@ int pci_iov_resource_bar(struct pci_dev *dev, int resno, | |||
510 | resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev, int resno) | 506 | resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev, int resno) |
511 | { | 507 | { |
512 | struct resource tmp; | 508 | struct resource tmp; |
513 | enum pci_bar_type type; | 509 | int reg = pci_iov_resource_bar(dev, resno); |
514 | int reg = pci_iov_resource_bar(dev, resno, &type); | ||
515 | 510 | ||
516 | if (!reg) | 511 | if (!reg) |
517 | return 0; | 512 | return 0; |
518 | 513 | ||
519 | __pci_read_base(dev, type, &tmp, reg); | 514 | __pci_read_base(dev, pci_bar_unknown, &tmp, reg); |
520 | return resource_alignment(&tmp); | 515 | return resource_alignment(&tmp); |
521 | } | 516 | } |
522 | 517 | ||