[xen master] IOMMU/PCI: make a few functions static

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[xen master] IOMMU/PCI: make a few functions static

patchbot
commit fc15da466961bc97bd9e246dc08f0f541116144b
Author:     Jan Beulich <[hidden email]>
AuthorDate: Thu Aug 3 12:20:17 2017 +0200
Commit:     Jan Beulich <[hidden email]>
CommitDate: Thu Aug 3 12:20:17 2017 +0200

    IOMMU/PCI: make a few functions static
   
    Add forward declarations in order to not move things around.
   
    Signed-off-by: Jan Beulich <[hidden email]>
    Reviewed-by: Wei Liu <[hidden email]>
    Reviewed-by: Roger Pau Monné <[hidden email]>
---
 xen/drivers/passthrough/pci.c | 10 +++++++---
 xen/include/xen/iommu.h       |  3 ---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c
index 6e7126b..b02d489 100644
--- a/xen/drivers/passthrough/pci.c
+++ b/xen/drivers/passthrough/pci.c
@@ -587,6 +587,10 @@ static void pci_enable_acs(struct pci_dev *pdev)
     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 *pdev)
     }
 }
 
-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 *pdev)
     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;
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index 5803e3f..918ee99 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -53,9 +53,6 @@ extern unsigned int iommu_dev_iotlb_timeout;
 
 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);
--
generated by git-patchbot for /home/xen/git/xen.git#master


_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog
Loading...