arm: make unexported items static
Subsystems (3)
PATCH 1/4 arm: make unexported items static
Fixup the following sparse warnings by making the functions and structures static.
arch/arm/mm/dma-mapping.c:1562:6: warning: symbol '__arm_iommu_free_attrs' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1586:6: warning: symbol 'arm_iommu_free_attrs' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1592:6: warning: symbol 'arm_coherent_iommu_free_attrs' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1716:5: warning: symbol 'arm_coherent_iommu_map_sg' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1734:5: warning: symbol 'arm_iommu_map_sg' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1767:6: warning: symbol 'arm_coherent_iommu_unmap_sg' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1784:6: warning: symbol 'arm_iommu_unmap_sg' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1798:6: warning: symbol 'arm_iommu_sync_sg_for_cpu' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:1816:6: warning: symbol 'arm_iommu_sync_sg_for_device' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:2018:26: warning: symbol 'iommu_ops' was not declared. Should it be static? arch/arm/mm/dma-mapping.c:2040:26: warning: symbol 'iommu_coherent_ops' was not declared. Should it be static?
--- arch/arm/mm/dma-mapping.c | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-)
arch/arm/mm/dma-mapping.c +19 -15
@@ -1559,7 +1559,7 @@ 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, +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;
@@ -1583,13 +1583,14 @@ 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, -void *cpu_addr,dma_addr_t handle,unsigned long attrs) +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 );
@@ -1713,7 +1714,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);
@@ -1731,7 +1732,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);
@@ -1764,8 +1765,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);
@@ -1781,9 +1782,10 @@ 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); }
@@ -1795,7 +1797,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, +static void arm_iommu_sync_sg_for_cpu (struct device *dev, +struct scatterlist *sg,int nents,enum dma_data_direction dir) {struct scatterlist *s;
@@ -1813,7 +1816,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, +static void arm_iommu_sync_sg_for_device (struct device *dev, +struct scatterlist *sg,int nents,enum dma_data_direction dir) {struct scatterlist *s;
@@ -2015,7 +2019,7 @@ static void arm_iommu_sync_single_for_device(struct device *dev,__dma_page_cpu_to_dev (page, offset, size, dir); } -const struct dma_map_ops iommu_ops = { +static const struct dma_map_ops iommu_ops = { .alloc = arm_iommu_alloc_attrs, .free = arm_iommu_free_attrs, .mmap = arm_iommu_mmap_attrs,
@@ -2037,7 +2041,7 @@ const struct dma_map_ops iommu_ops = { .dma_supported = arm_dma_supported, }; -const struct dma_map_ops iommu_coherent_ops = { +static const struct dma_map_ops iommu_coherent_ops = { .alloc = arm_coherent_iommu_alloc_attrs, .free = arm_coherent_iommu_free_attrs, .mmap = arm_coherent_iommu_mmap_attrs,
Signature · 1 line
2.23.0
PATCH 2/4 arm: fix missing declartion of module_frob_arch_sections
The module_frob_arch_sections function is missing the header declaration which is in <linux/moduleloader.h> so include that to fix the following sparse warning:
arch/arm/kernel/module-plts.c:188:5: warning: symbol 'module_frob_arch_sections' was not declared. Should it be static?
--- arch/arm/kernel/module-plts.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/kernel/module-plts.c +1 -0
@@ -7,6 +7,7 @@#include <linux/kernel.h> #include <linux/module.h> #include <linux/sort.h> +#include <linux/moduleloader.h> #include <asm/cache.h> #include <asm/opcodes.h>
Signature · 1 line
2.23.0
PATCH 3/4 arm: move pcibios_report_status to <asm/pci.h>
In reply to Ben DooksMove the pcibios_report_status to <asm/pci.h> include to remove the following sparse warning and to remove the extra definition in the footbrdige dc21285.c driver:
arch/arm/kernel/bios32.c:59:6: warning: symbol 'pcibios_report_status' was not declared. Should it be static?
--- arch/arm/include/asm/pci.h | 2 ++ arch/arm/mach-footbridge/dc21285.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
arch/arm/include/asm/pci.h +2 -0
@@ -27,5 +27,7 @@ static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel)return channel ?15 :14 ; } +extern void pcibios_report_status (unsigned int status_mask,int warn); +#endif /* __KERNEL__ */ #endif
arch/arm/mach-footbridge/dc21285.c +0 -1
@@ -31,7 +31,6 @@ PCI_STATUS_PARITY) << 16)extern int setup_arm_irq (int ,struct irqaction *); -extern void pcibios_report_status (u_int status_mask,int warn);static unsigned long dc21285_base_address (struct pci_bus *bus,unsigned int devfn)
Signature · 1 line
2.23.0
PATCH 4/4 arm: arch_timer: include <asm/arch_timer.h>
In reply to Ben DooksThe arch_timer_arch_init is defined in <asm/arch_timer.h> so include that to fix the following sparse error:
arch/arm/kernel/arch_timer.c:31:12: warning: symbol 'arch_timer_arch_init' was not declared. Should it be static?
--- arch/arm/kernel/arch_timer.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/kernel/arch_timer.c +1 -0
@@ -10,6 +10,7 @@#include <linux/errno.h> #include <asm/delay.h> +#include <asm/arch_timer.h> #include <clocksource/arm_arch_timer.h>
Signature · 1 line
2.23.0