linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dirk.behme@gmail.com (Dirk Behme)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: dma-mapping: add cast to DMA_ERROR_CODE
Date: Sat, 15 Aug 2015 17:52:51 +0200	[thread overview]
Message-ID: <1439653971-867-1-git-send-email-dirk.behme@gmail.com> (raw)

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

             reply	other threads:[~2015-08-15 15:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-15 15:52 Dirk Behme [this message]
2015-09-23  9:38 ` [PATCH] arm: dma-mapping: add cast to DMA_ERROR_CODE Dirk Behme
2015-09-23  9:51   ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439653971-867-1-git-send-email-dirk.behme@gmail.com \
    --to=dirk.behme@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).