All of lore.kernel.org
 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: Wed, 23 Sep 2015 11:38:24 +0200	[thread overview]
Message-ID: <56027310.3010603@gmail.com> (raw)
In-Reply-To: <1439653971-867-1-git-send-email-dirk.behme@gmail.com>

On 15.08.2015 17:52, Dirk Behme wrote:
> 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;


I've put this as 8420/1 into the patch system:

http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=8420/1

Any comments on this?

Best regards

Dirk

  reply	other threads:[~2015-09-23  9:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-15 15:52 [PATCH] arm: dma-mapping: add cast to DMA_ERROR_CODE Dirk Behme
2015-09-23  9:38 ` Dirk Behme [this message]
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=56027310.3010603@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 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.