* [PATCH] dma-mapping: harmonize definition of DMA_ERROR_CODE
@ 2015-06-10 8:41 Nicholas Mc Guire
2015-08-18 8:10 ` Marek Szyprowski
0 siblings, 1 reply; 2+ messages in thread
From: Nicholas Mc Guire @ 2015-06-10 8:41 UTC (permalink / raw)
To: Russell King
Cc: Marek Szyprowski, Arnd Bergmann, Will Deacon, Catalin Marinas,
Stefano Stabellini, Thierry Reding, linux-kernel,
Nicholas Mc Guire
All architectures except arm that define DMA_ERROR_CODE are casting it
to (dma_addr_t) - as it is always compared to dma_addr_t in arm as well
this could be harmonized.
Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
---
This also fixes the build warning in
./arch/arm/include/asm/dma-mapping.h: In function 'dma_mapping_error':
./arch/arm/include/asm/dma-mapping.h:176:18: warning: comparison between
signed and unsigned integer expressions [-Wsign-compare]
While it fixes this build warning it causes another build warning - so
from that perspective its not much of an improvement - never the less
having this harmonized with all other archs makes sense I think.
Patch was compile tested with exynos_defconfig
Patch is against 4.1-rc7 (localversion-next is -next-20150609)
arch/arm/include/asm/dma-mapping.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index b52101d..68e41e8 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -14,7 +14,7 @@
#include <xen/xen.h>
#include <asm/xen/hypervisor.h>
-#define DMA_ERROR_CODE (~0)
+#define DMA_ERROR_CODE (~(dma_addr_t)0x0)
extern struct dma_map_ops arm_dma_ops;
extern struct dma_map_ops arm_coherent_dma_ops;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dma-mapping: harmonize definition of DMA_ERROR_CODE
2015-06-10 8:41 [PATCH] dma-mapping: harmonize definition of DMA_ERROR_CODE Nicholas Mc Guire
@ 2015-08-18 8:10 ` Marek Szyprowski
0 siblings, 0 replies; 2+ messages in thread
From: Marek Szyprowski @ 2015-08-18 8:10 UTC (permalink / raw)
To: Nicholas Mc Guire, Russell King
Cc: Arnd Bergmann, Will Deacon, Catalin Marinas, Stefano Stabellini,
Thierry Reding, linux-kernel
Hello,
On 2015-06-10 10:41, Nicholas Mc Guire wrote:
> All architectures except arm that define DMA_ERROR_CODE are casting it
> to (dma_addr_t) - as it is always compared to dma_addr_t in arm as well
> this could be harmonized.
>
> Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>
> This also fixes the build warning in
> ./arch/arm/include/asm/dma-mapping.h: In function 'dma_mapping_error':
> ./arch/arm/include/asm/dma-mapping.h:176:18: warning: comparison between
> signed and unsigned integer expressions [-Wsign-compare]
>
> While it fixes this build warning it causes another build warning - so
> from that perspective its not much of an improvement - never the less
> having this harmonized with all other archs makes sense I think.
>
> Patch was compile tested with exynos_defconfig
>
> Patch is against 4.1-rc7 (localversion-next is -next-20150609)
>
> arch/arm/include/asm/dma-mapping.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
> index b52101d..68e41e8 100644
> --- a/arch/arm/include/asm/dma-mapping.h
> +++ b/arch/arm/include/asm/dma-mapping.h
> @@ -14,7 +14,7 @@
> #include <xen/xen.h>
> #include <asm/xen/hypervisor.h>
>
> -#define DMA_ERROR_CODE (~0)
> +#define DMA_ERROR_CODE (~(dma_addr_t)0x0)
> extern struct dma_map_ops arm_dma_ops;
> extern struct dma_map_ops arm_coherent_dma_ops;
>
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-08-18 8:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-10 8:41 [PATCH] dma-mapping: harmonize definition of DMA_ERROR_CODE Nicholas Mc Guire
2015-08-18 8:10 ` Marek Szyprowski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.