arm: dma-mapping: fix potential build error under !CMA
Subsystems (2)
PATCH 1/1 arm: dma-mapping: fix potential build error under !CMA
This patch fixes build error under !CONFIG_CMA. dev_get_cma_area can be used when CMA is disabled when the bellow patch is appied.
"arm: dma-mapping: add checking cma area initialized"
https://lkml.org/lkml/2014/5/22/35
arch/arm/mm/dma-mapping.c: In function 'atomic_pool_init':arch/arm/mm/dma-mapping.c:361:2: error: implicit declaration of function
'dev_get_cma_area' [-Werror=implicit-function-declaration]
--- arch/arm/include/asm/dma-contiguous.h | 2 +- include/asm-generic/dma-contiguous.h | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-)
arch/arm/include/asm/dma-contiguous.h +1 -1
@@ -2,11 +2,11 @@#define ASMARM_DMA_CONTIGUOUS_H #ifdef __KERNEL__ -#ifdef CONFIG_CMA #include <linux/types.h> #include <asm-generic/dma-contiguous.h> +#ifdef CONFIG_CMA void dma_contiguous_early_fixup (phys_addr_t base,unsigned long size);#endif
include/asm-generic/dma-contiguous.h +11 -2
@@ -2,11 +2,11 @@#define ASM_DMA_CONTIGUOUS_H #ifdef __KERNEL__ -#ifdef CONFIG_CMA #include <linux/device.h> #include <linux/dma-contiguous.h> +#ifdef CONFIG_CMA static inline struct cma *dev_get_cma_area(struct device *dev) { if (dev && dev->cma_area)
@@ -22,7 +22,16 @@ static inline void dev_set_cma_area(struct device *dev, struct cma *cma) dma_contiguous_default_area = cma; } -#endif +#else +static inline struct cma *dev_get_cma_area (struct device *dev) +{ +return NULL ; +} + +static inline void dev_set_cma_area (struct device *dev,struct cma *cma) +{ +}#endif #endif +#endif
Signature · 1 line
1.7.9.5
Please ignore this patch. It was fixed on v3.15.
Sorry for the noise.
Chanho
Quoted 77 lines
From: Chanho Min [mailto:[email protected]]
Sent: Monday, June 02, 2014 10:45 AM
To: Russell King; Michal Nazarewicz; Marek Szyprowski
Cc: Gioh Kim; Joonsoo Kim; HyoJun Im; [email protected]; linux- [email protected]; [email protected]; Chanho Min
Subject: [PATCH] arm: dma-mapping: fix potential build error under !CMAThis patch fixes build error under !CONFIG_CMA.
dev_get_cma_areacan be used when CMA is disabled when the bellow patch is appied."arm: dma-mapping: add checking cma area initialized"
https://lkml.org/lkml/2014/5/22/35
arch/arm/mm/dma-mapping.c: In function 'atomic_pool_init':arch/arm/mm/dma-mapping.c:361:2: error: implicit declaration of function
'dev_get_cma_area' [-Werror=implicit-function-declaration]Signed-off-by Chanho Min <[email protected]>--- arch/arm/include/asm/dma-contiguous.h | 2 +- include/asm-generic/dma-contiguous.h | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-)arch/arm/include/asm/dma-contiguous.h +1
-1@@ -2,11 +2,11 @@#define ASMARM_DMA_CONTIGUOUS_H #ifdef __KERNEL__ -#ifdef CONFIG_CMA #include <linux/types.h> #include <asm-generic/dma-contiguous.h> +#ifdef CONFIG_CMA void dma_contiguous_early_fixup (phys_addr_t base,unsigned long size);#endif include/asm-generic/dma-contiguous.h +11
-3@@ -2,11 +2,11 @@#define ASM_DMA_CONTIGUOUS_H #ifdef __KERNEL__ -#ifdef CONFIG_CMA #include <linux/device.h> #include <linux/dma-contiguous.h> +#ifdef CONFIG_CMA static inline struct cma *dev_get_cma_area(struct device *dev) { if (dev && dev->cma_area)@@ -22,7 +22,16 @@ static inline void dev_set_cma_area(struct device *dev, struct cma *cma) dma_contiguous_default_area = cma; } -#endif +#else +static inline struct cma *dev_get_cma_area (struct device *dev) +{ +return NULL ; +} + +static inline void dev_set_cma_area (struct device *dev,struct cma *cma) +{ +}#endif #endif +#endif --1.7.9.5
PATCH 1/1 arm: dma-mapping: fix potential build error under !CMA
In reply to Chanho MinPlease ignore this patch. It was fixed on v3.15.
Sorry for the noise.
Chanho
Quoted 77 lines
From: Chanho Min [mailto:chanho.min at lge.com]
Sent: Monday, June 02, 2014 10:45 AM
To: Russell King; Michal Nazarewicz; Marek Szyprowski
Cc: Gioh Kim; Joonsoo Kim; HyoJun Im; linux-arm-kernel at lists.infradead.org; linux- kernel at vger.kernel.org; linux-arch at vger.kernel.org; Chanho Min
Subject: [PATCH] arm: dma-mapping: fix potential build error under !CMAThis patch fixes build error under !CONFIG_CMA.
dev_get_cma_areacan be used when CMA is disabled when the bellow patch is appied."arm: dma-mapping: add checking cma area initialized"
https://lkml.org/lkml/2014/5/22/35
arch/arm/mm/dma-mapping.c: In function 'atomic_pool_init':arch/arm/mm/dma-mapping.c:361:2: error: implicit declaration of function
'dev_get_cma_area' [-Werror=implicit-function-declaration]Signed-off-by Chanho Min <[email protected]>--- arch/arm/include/asm/dma-contiguous.h | 2 +- include/asm-generic/dma-contiguous.h | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-)arch/arm/include/asm/dma-contiguous.h +1
-1@@ -2,11 +2,11 @@#define ASMARM_DMA_CONTIGUOUS_H #ifdef __KERNEL__ -#ifdef CONFIG_CMA #include <linux/types.h> #include <asm-generic/dma-contiguous.h> +#ifdef CONFIG_CMA void dma_contiguous_early_fixup (phys_addr_t base,unsigned long size);#endif include/asm-generic/dma-contiguous.h +11
-3@@ -2,11 +2,11 @@#define ASM_DMA_CONTIGUOUS_H #ifdef __KERNEL__ -#ifdef CONFIG_CMA #include <linux/device.h> #include <linux/dma-contiguous.h> +#ifdef CONFIG_CMA static inline struct cma *dev_get_cma_area(struct device *dev) { if (dev && dev->cma_area)@@ -22,7 +22,16 @@ static inline void dev_set_cma_area(struct device *dev, struct cma *cma) dma_contiguous_default_area = cma; } -#endif +#else +static inline struct cma *dev_get_cma_area (struct device *dev) +{ +return NULL ; +} + +static inline void dev_set_cma_area (struct device *dev,struct cma *cma) +{ +}#endif #endif +#endif --1.7.9.5