Skip to contentSkip to conversation

ARM: DMA: Silence declared inside parameter list warning for !CONFIG_MMU

PATCH In review Axel Lin 2 participants 2 messages Jul 4, 2011 – Jul 6, 2011 Arm (32-bit)

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ARM: DMA: Silence declared inside parameter list warning for !CONFIG_MMU

Fix below warning, the struct dma_coherent_area takes no space if !CONFIG_MMU.

CC arch/arm/mm/dma-mapping.o
arch/arm/mm/dma-mapping.c:309: warning: 'struct dma_coherent_area' declared inside parameter list arch/arm/mm/dma-mapping.c:309: warning: its scope is only this definition or declaration, which is probably not what you want arch/arm/mm/dma-mapping.c:334: warning: 'struct dma_coherent_area' declared inside parameter list arch/arm/mm/dma-mapping.c:374: warning: 'struct dma_coherent_area' declared inside parameter list

---
 arch/arm/mm/dma-mapping.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mm/dma-mapping.c +2 -0
index 8089499..da3b33a 100644
@@ -297,6 +297,8 @@ static void dma_free_area(void *cpu_addr, size_t size, struct dma_coherent_area
 #define coherent_wc_area NULL
 #define coherent_dma_area NULL
 
+struct dma_coherent_area { };
+
 void dma_coherent_reserve(void)
 {
 }
Signature · 1 line
1.7.4.1
#1 lore raw
Quoted 9 lines · Axel Lin

Fix below warning, the struct dma_coherent_area takes no space if !CONFIG_MMU.

CC arch/arm/mm/dma-mapping.o
arch/arm/mm/dma-mapping.c:309: warning: 'struct dma_coherent_area' declared inside parameter list arch/arm/mm/dma-mapping.c:309: warning: its scope is only this definition or declaration, which is probably not what you want arch/arm/mm/dma-mapping.c:334: warning: 'struct dma_coherent_area' declared inside parameter list arch/arm/mm/dma-mapping.c:374: warning: 'struct dma_coherent_area' declared inside parameter list

Ok, can you put this in the patch system please?

Thanks.

Quoted 22 lines
---
 arch/arm/mm/dma-mapping.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mm/dma-mapping.c +2 -0
index 8089499..da3b33a 100644
@@ -297,6 +297,8 @@ static void dma_free_area(void *cpu_addr, size_t size, struct dma_coherent_area
 #define coherent_wc_area NULL
 #define coherent_dma_area NULL
 
+struct dma_coherent_area { };
+
 void dma_coherent_reserve(void)
 {
 }
Signature · 1 line
1.7.4.1