Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Mark Brown <broonie@kernel.org>,
	linux-spi@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] spi: sh-msiof: Use correct enum for DMA transfer direction
Date: Wed, 21 Mar 2018 10:05:07 +0100	[thread overview]
Message-ID: <160f8e55a7b5d8bedf73274e8e33da15@agner.ch> (raw)
In-Reply-To: <1521619643-4492-1-git-send-email-geert+renesas@glider.be>

On 21.03.2018 09:07, Geert Uytterhoeven wrote:
> Use enum dma_transfer_direction as required by dmaengine_prep_slave_sg()
> instead of enum dma_data_direction.  This won't change behavior in
> practice as the enum values are equivalent.
> 
> This fixes two warnings when building with clang:
>   drivers/spi/spi-sh-msiof.c:755:27: warning: implicit conversion from
> enumeration
>       type 'enum dma_data_direction' to different enumeration type
>       'enum dma_transfer_direction' [-Wenum-conversion]
> 					rx->sgl, rx->nents, DMA_FROM_DEVICE,
> 							    ^~~~~~~~~~~~~~~
>   drivers/spi/spi-sh-msiof.c:772:27: warning: implicit conversion from
> enumeration
>       type 'enum dma_data_direction' to different enumeration type
>       'enum dma_transfer_direction' [-Wenum-conversion]
> 					tx->sgl, tx->nents, DMA_TO_DEVICE,
> 							    ^~~~~~~~~~~~~
> 
> Based on commit 768d59f5d0139a6f ("spi: rspi: use correct enum for DMA
> transfer direction").
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Looks good to me!

Reviewed-by: Stefan Agner <stefan@agner.ch>

--
Stefan

> ---
>  drivers/spi/spi-sh-msiof.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
> index c5dcfb434a498b27..ae086aab57d51edc 100644
> --- a/drivers/spi/spi-sh-msiof.c
> +++ b/drivers/spi/spi-sh-msiof.c
> @@ -752,7 +752,7 @@ static int sh_msiof_dma_once(struct
> sh_msiof_spi_priv *p, const void *tx,
>  	if (rx) {
>  		ier_bits |= IER_RDREQE | IER_RDMAE;
>  		desc_rx = dmaengine_prep_slave_single(p->master->dma_rx,
> -					p->rx_dma_addr, len, DMA_FROM_DEVICE,
> +					p->rx_dma_addr, len, DMA_DEV_TO_MEM,
>  					DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
>  		if (!desc_rx)
>  			return -EAGAIN;
> @@ -769,7 +769,7 @@ static int sh_msiof_dma_once(struct
> sh_msiof_spi_priv *p, const void *tx,
>  		dma_sync_single_for_device(p->master->dma_tx->device->dev,
>  					   p->tx_dma_addr, len, DMA_TO_DEVICE);
>  		desc_tx = dmaengine_prep_slave_single(p->master->dma_tx,
> -					p->tx_dma_addr, len, DMA_TO_DEVICE,
> +					p->tx_dma_addr, len, DMA_MEM_TO_DEV,
>  					DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
>  		if (!desc_tx) {
>  			ret = -EAGAIN;

  reply	other threads:[~2018-03-21  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21  8:07 [PATCH] spi: sh-msiof: Use correct enum for DMA transfer direction Geert Uytterhoeven
2018-03-21  9:05 ` Stefan Agner [this message]
2018-03-22  2:14 ` Applied "spi: sh-msiof: Use correct enum for DMA transfer direction" to the spi tree Mark Brown

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=160f8e55a7b5d8bedf73274e8e33da15@agner.ch \
    --to=stefan@agner.ch \
    --cc=broonie@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-spi@vger.kernel.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