public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: sshtylyov@mvista•com (Sergei Shtylyov)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 6/6] atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer'
Date: Sat, 20 Nov 2010 14:54:31 +0300	[thread overview]
Message-ID: <4CE7B6F7.7080108@ru.mvista.com> (raw)
In-Reply-To: <1290247733-17834-6-git-send-email-plagnioj@jcrosoft.com>

Hello.

On 20-11-2010 13:08, Jean-Christophe PLAGNIOL-VILLARD wrote:

> passing argument 2 of 'dma_map_single' discards qualifiers from pointer target type

> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD<plagnioj@jcrosoft•com>
> ---
>   drivers/spi/atmel_spi.c |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)

> diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
> index 154529a..2cf6abd 100644
> --- a/drivers/spi/atmel_spi.c
> +++ b/drivers/spi/atmel_spi.c
> @@ -352,8 +352,10 @@ atmel_spi_dma_map_xfer(struct atmel_spi *as, struct spi_transfer *xfer)
>
>   	xfer->tx_dma = xfer->rx_dma = INVALID_DMA_ADDRESS;
>   	if (xfer->tx_buf) {
> +		void *nonconst_tx = (void *)xfer->tx_buf; /* shut up gcc */
> +

    Aren't casts to 'void *' automatic?

>   		xfer->tx_dma = dma_map_single(dev,
> -				(void *) xfer->tx_buf, xfer->len,
> +				nonconst_tx, xfer->len,
>   				DMA_TO_DEVICE);
>   		if (dma_mapping_error(dev, xfer->tx_dma))
>   			return -ENOMEM;

WBR, Sergei

  reply	other threads:[~2010-11-20 11:54 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-20  9:59 rm9200: update Jean-Christophe PLAGNIOL-VILLARD
2010-11-20 10:08 ` [PATCH 1/6] at91: Convert remaining boards to new-style UART initialization Jean-Christophe PLAGNIOL-VILLARD
2010-11-20 10:08 ` [PATCH 2/6] at91rm9200dk: fix warning: 'dk_mmc_data' defined but not used Jean-Christophe PLAGNIOL-VILLARD
2010-11-20 10:08 ` [PATCH 3/6] at91rm9200ek: fix warning: 'ek_mmc_data' " Jean-Christophe PLAGNIOL-VILLARD
2010-11-20 10:08 ` [PATCH 4/6] at91/picotux200: fix warning: 'picotux200_mmc_data' " Jean-Christophe PLAGNIOL-VILLARD
2010-11-20 21:44   ` Uwe Kleine-König
2010-11-21  2:17     ` Jean-Christophe PLAGNIOL-VILLARD
2010-11-20 10:08 ` [PATCH 5/6] at91: rename rm9200ek and rm9200dk board file name Jean-Christophe PLAGNIOL-VILLARD
2010-11-20 21:42   ` Uwe Kleine-König
2010-11-20 10:08 ` [PATCH 6/6] atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer' Jean-Christophe PLAGNIOL-VILLARD
2010-11-20 11:54   ` Sergei Shtylyov [this message]
2010-11-20 14:01     ` Jean-Christophe PLAGNIOL-VILLARD
2010-11-20 21:48   ` Uwe Kleine-König
2010-11-20 22:59     ` David Brownell
2010-11-21  2:19       ` Jean-Christophe PLAGNIOL-VILLARD
2010-11-22 16:08 ` rm9200: update avictor.za at gmail.com
2010-11-24 14:34 ` Jean-Christophe PLAGNIOL-VILLARD
2010-11-24 14:55   ` [PATCH 1/7 v2] at91: Convert remaining boards to new-style UART initialization Jean-Christophe PLAGNIOL-VILLARD
2010-11-24 14:55   ` [PATCH 2/7 v2] at91rm9200dk: fix warning: 'dk_mmc_data' defined but not used Jean-Christophe PLAGNIOL-VILLARD
2010-11-24 14:55   ` [PATCH 3/7 v2] at91rm9200ek: fix warning: 'ek_mmc_data' " Jean-Christophe PLAGNIOL-VILLARD
2010-11-24 14:55   ` [PATCH 4/7 v2] at91: rename rm9200ek and rm9200dk board file name Jean-Christophe PLAGNIOL-VILLARD
2010-11-24 14:55   ` [PATCH 5/7 v2] at91/picotux200: remove commenting usb device and dataflash support Jean-Christophe PLAGNIOL-VILLARD
2010-11-24 14:55   ` [PATCH 6/7] atmel_spi: fix warning In function 'atmel_spi_dma_map_xfer' Jean-Christophe PLAGNIOL-VILLARD
2010-11-24 14:55   ` [PATCH 7/7] at91/board-yl-9200: fix typo in video support Jean-Christophe PLAGNIOL-VILLARD
2010-11-24 15:31   ` rm9200: update Eric Bénard

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=4CE7B6F7.7080108@ru.mvista.com \
    --to=sshtylyov@mvista$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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