[PATCH] dma-mapping.c: local variables should not be exposed globaly

H Hartley Sweeten hartleys at visionengravers.com
Thu Apr 12 13:56:39 EDT 2012


The variable 'consistent_base' is only referenced in this file and
should be marked static to prevent it from being exposed globably.

This quiets the sparse warning:

warning: symbol 'consistent_base' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>

---

diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index db23ae4..3d368d3 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -130,7 +130,7 @@ static pte_t **consistent_pte;
 
 #define DEFAULT_CONSISTENT_DMA_SIZE SZ_2M
 
-unsigned long consistent_base = CONSISTENT_END - DEFAULT_CONSISTENT_DMA_SIZE;
+static unsigned long consistent_base = CONSISTENT_END - DEFAULT_CONSISTENT_DMA_SIZE;
 
 void __init init_consistent_dma_size(unsigned long size)
 {



More information about the linux-arm-kernel mailing list