Skip to contentSkip to conversation

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

PATCH New H Hartley Sweeten 1 participant 1 message Apr 12, 2012 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dma-mapping.c: local variables should not be exposed globaly

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?

---

arch/arm/mm/dma-mapping.c +1 -1
index db23ae4..3d368d3 100644
@@ -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)
 {