linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: dma-mapping: add cast to DMA_ERROR_CODE
@ 2015-08-15 15:52 Dirk Behme
  2015-09-23  9:38 ` Dirk Behme
  0 siblings, 1 reply; 3+ messages in thread
From: Dirk Behme @ 2015-08-15 15:52 UTC (permalink / raw)
  To: linux-arm-kernel

Fix the compiler warning

./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]
  return dma_addr == DMA_ERROR_CODE;
                  ^

we get building the kernel with W=1.

This is done the same way we have already in the arm64 version.

Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
---
 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)0)
 extern struct dma_map_ops arm_dma_ops;
 extern struct dma_map_ops arm_coherent_dma_ops;
 
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-23  9:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-15 15:52 [PATCH] arm: dma-mapping: add cast to DMA_ERROR_CODE Dirk Behme
2015-09-23  9:38 ` Dirk Behme
2015-09-23  9:51   ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).