diff mbox

IOMMU/PCI: make a few functions static

Message ID 5968EBB1020000780016ABD5@prv-mh.provo.novell.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jan Beulich July 14, 2017, 2:05 p.m. UTC
Add forward declarations in order to not move things around.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Wei Liu July 14, 2017, 9:23 p.m. UTC | #1
On Fri, Jul 14, 2017 at 08:05:05AM -0600, Jan Beulich wrote:
> Add forward declarations in order to not move things around.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Roger Pau Monné July 17, 2017, 11:07 a.m. UTC | #2
On Fri, Jul 14, 2017 at 08:05:05AM -0600, Jan Beulich wrote:
> Add forward declarations in order to not move things around.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
diff mbox

Patch

--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -587,6 +587,10 @@  static void pci_enable_acs(struct pci_de
     pci_conf_write16(seg, bus, dev, func, pos + PCI_ACS_CTRL, ctrl);
 }
 
+static int iommu_add_device(struct pci_dev *pdev);
+static int iommu_enable_device(struct pci_dev *pdev);
+static int iommu_remove_device(struct pci_dev *pdev);
+
 int pci_add_device(u16 seg, u8 bus, u8 devfn,
                    const struct pci_dev_info *info, nodeid_t node)
 {
@@ -1254,7 +1258,7 @@  void iommu_read_msi_from_ire(
         iommu_get_ops()->read_msi_from_ire(msi_desc, msg);
 }
 
-int iommu_add_device(struct pci_dev *pdev)
+static int iommu_add_device(struct pci_dev *pdev)
 {
     const struct domain_iommu *hd;
     int rc;
@@ -1285,7 +1289,7 @@  int iommu_add_device(struct pci_dev *pde
     }
 }
 
-int iommu_enable_device(struct pci_dev *pdev)
+static int iommu_enable_device(struct pci_dev *pdev)
 {
     const struct domain_iommu *hd;
 
@@ -1302,7 +1306,7 @@  int iommu_enable_device(struct pci_dev *
     return hd->platform_ops->enable_device(pci_to_dev(pdev));
 }
 
-int iommu_remove_device(struct pci_dev *pdev)
+static int iommu_remove_device(struct pci_dev *pdev)
 {
     const struct domain_iommu *hd;
     u8 devfn;
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -53,9 +53,6 @@  extern unsigned int iommu_dev_iotlb_time
 
 int iommu_setup(void);
 
-int iommu_add_device(struct pci_dev *pdev);
-int iommu_enable_device(struct pci_dev *pdev);
-int iommu_remove_device(struct pci_dev *pdev);
 int iommu_domain_init(struct domain *d);
 void iommu_hwdom_init(struct domain *d);
 void iommu_domain_destroy(struct domain *d);