Make functions __arm_iommu_free_attrs(), arm_iommu_free_attrs(),
arm_coherent_iommu_free_attrs(), arm_coherent_iommu_map_sg(),
arm_iommu_map_sg(), arm_coherent_iommu_unmap_sg(), arm_iommu_unmap_sg(),
arm_iommu_sync_sg_for_cpu() and arm_iommu_sync_sg_for_device() static,
as they are only referenced in this file.

../arch/arm/mm/dma-mapping.c:1616:6: warning: no previous prototype for 
‘__arm_iommu_free_attrs’ [-Wmissing-prototypes]
 void __arm_iommu_free_attrs(struct device *dev, size_t size, void *cpu_addr,
      ^~~~~~~~~~~~~~~~~~~~~~
../arch/arm/mm/dma-mapping.c:1642:6: warning: no previous prototype for 
‘arm_iommu_free_attrs’ [-Wmissing-prototypes]
 void arm_iommu_free_attrs(struct device *dev, size_t size,
      ^~~~~~~~~~~~~~~~~~~~
../arch/arm/mm/dma-mapping.c:1648:6: warning: no previous prototype for 
‘arm_coherent_iommu_free_attrs’ [-Wmissing-prototypes]
 void arm_coherent_iommu_free_attrs(struct device *dev, size_t size,
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../arch/arm/mm/dma-mapping.c:1772:5: warning: no previous prototype for 
‘arm_coherent_iommu_map_sg’ [-Wmissing-prototypes]
 int arm_coherent_iommu_map_sg(struct device *dev, struct scatterlist *sg,
     ^~~~~~~~~~~~~~~~~~~~~~~~~
../arch/arm/mm/dma-mapping.c:1790:5: warning: no previous prototype for 
‘arm_iommu_map_sg’ [-Wmissing-prototypes]
 int arm_iommu_map_sg(struct device *dev, struct scatterlist *sg,
     ^~~~~~~~~~~~~~~~
../arch/arm/mm/dma-mapping.c:1823:6: warning: no previous prototype for 
‘arm_coherent_iommu_unmap_sg’ [-Wmissing-prototypes]
 void arm_coherent_iommu_unmap_sg(struct device *dev, struct scatterlist *sg,
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../arch/arm/mm/dma-mapping.c:1840:6: warning: no previous prototype for 
‘arm_iommu_unmap_sg’ [-Wmissing-prototypes]
 void arm_iommu_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
      ^~~~~~~~~~~~~~~~~~
../arch/arm/mm/dma-mapping.c:1854:6: warning: no previous prototype for 
‘arm_iommu_sync_sg_for_cpu’ [-Wmissing-prototypes]
 void arm_iommu_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
      ^~~~~~~~~~~~~~~~~~~~~~~~~
../arch/arm/mm/dma-mapping.c:1872:6: warning: no previous prototype for 
‘arm_iommu_sync_sg_for_device’ [-Wmissing-prototypes]
 void arm_iommu_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Philippe Mazenauer <philippe.mazena...@outlook.de>
---
 arch/arm/mm/dma-mapping.c | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index 0a75058c11f3..530b6235a270 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -1613,8 +1613,9 @@ static int arm_coherent_iommu_mmap_attrs(struct device 
*dev,
  * free a page as defined by the above mapping.
  * Must not be called with IRQs disabled.
  */
-void __arm_iommu_free_attrs(struct device *dev, size_t size, void *cpu_addr,
-       dma_addr_t handle, unsigned long attrs, int coherent_flag)
+static void __arm_iommu_free_attrs(struct device *dev, size_t size,
+               void *cpu_addr, dma_addr_t handle, unsigned long attrs,
+               int coherent_flag)
 {
        struct page **pages;
        size = PAGE_ALIGN(size);
@@ -1639,13 +1640,13 @@ void __arm_iommu_free_attrs(struct device *dev, size_t 
size, void *cpu_addr,
        __iommu_free_buffer(dev, pages, size, attrs);
 }
 
-void arm_iommu_free_attrs(struct device *dev, size_t size,
+static void arm_iommu_free_attrs(struct device *dev, size_t size,
                    void *cpu_addr, dma_addr_t handle, unsigned long attrs)
 {
        __arm_iommu_free_attrs(dev, size, cpu_addr, handle, attrs, NORMAL);
 }
 
-void arm_coherent_iommu_free_attrs(struct device *dev, size_t size,
+static void arm_coherent_iommu_free_attrs(struct device *dev, size_t size,
                    void *cpu_addr, dma_addr_t handle, unsigned long attrs)
 {
        __arm_iommu_free_attrs(dev, size, cpu_addr, handle, attrs, COHERENT);
@@ -1769,7 +1770,7 @@ static int __iommu_map_sg(struct device *dev, struct 
scatterlist *sg, int nents,
  * possible) and tagged with the appropriate dma address and length. They are
  * obtained via sg_dma_{address,length}.
  */
-int arm_coherent_iommu_map_sg(struct device *dev, struct scatterlist *sg,
+static int arm_coherent_iommu_map_sg(struct device *dev, struct scatterlist 
*sg,
                int nents, enum dma_data_direction dir, unsigned long attrs)
 {
        return __iommu_map_sg(dev, sg, nents, dir, attrs, true);
@@ -1787,7 +1788,7 @@ int arm_coherent_iommu_map_sg(struct device *dev, struct 
scatterlist *sg,
  * tagged with the appropriate dma address and length. They are obtained via
  * sg_dma_{address,length}.
  */
-int arm_iommu_map_sg(struct device *dev, struct scatterlist *sg,
+static int arm_iommu_map_sg(struct device *dev, struct scatterlist *sg,
                int nents, enum dma_data_direction dir, unsigned long attrs)
 {
        return __iommu_map_sg(dev, sg, nents, dir, attrs, false);
@@ -1820,8 +1821,8 @@ static void __iommu_unmap_sg(struct device *dev, struct 
scatterlist *sg,
  * Unmap a set of streaming mode DMA translations.  Again, CPU access
  * rules concerning calls here are the same as for dma_unmap_single().
  */
-void arm_coherent_iommu_unmap_sg(struct device *dev, struct scatterlist *sg,
-               int nents, enum dma_data_direction dir,
+static void arm_coherent_iommu_unmap_sg(struct device *dev,
+               struct scatterlist *sg, int nents, enum dma_data_direction dir,
                unsigned long attrs)
 {
        __iommu_unmap_sg(dev, sg, nents, dir, attrs, true);
@@ -1837,9 +1838,8 @@ void arm_coherent_iommu_unmap_sg(struct device *dev, 
struct scatterlist *sg,
  * Unmap a set of streaming mode DMA translations.  Again, CPU access
  * rules concerning calls here are the same as for dma_unmap_single().
  */
-void arm_iommu_unmap_sg(struct device *dev, struct scatterlist *sg, int nents,
-                       enum dma_data_direction dir,
-                       unsigned long attrs)
+static void arm_iommu_unmap_sg(struct device *dev, struct scatterlist *sg,
+               int nents, enum dma_data_direction dir, unsigned long attrs)
 {
        __iommu_unmap_sg(dev, sg, nents, dir, attrs, false);
 }
@@ -1851,8 +1851,8 @@ void arm_iommu_unmap_sg(struct device *dev, struct 
scatterlist *sg, int nents,
  * @nents: number of buffers to map (returned from dma_map_sg)
  * @dir: DMA transfer direction (same as was passed to dma_map_sg)
  */
-void arm_iommu_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
-                       int nents, enum dma_data_direction dir)
+static void arm_iommu_sync_sg_for_cpu(struct device *dev,
+               struct scatterlist *sg, int nents, enum dma_data_direction dir)
 {
        struct scatterlist *s;
        int i;
@@ -1869,8 +1869,8 @@ void arm_iommu_sync_sg_for_cpu(struct device *dev, struct 
scatterlist *sg,
  * @nents: number of buffers to map (returned from dma_map_sg)
  * @dir: DMA transfer direction (same as was passed to dma_map_sg)
  */
-void arm_iommu_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
-                       int nents, enum dma_data_direction dir)
+static void arm_iommu_sync_sg_for_device(struct device *dev,
+               struct scatterlist *sg, int nents, enum dma_data_direction dir)
 {
        struct scatterlist *s;
        int i;
-- 
2.17.1

Reply via email to