From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: Re: [PATCH 4/5] ASoC: rcar: Fix dma direction type Date: Thu, 19 Jun 2014 02:12:15 -0700 (PDT) Message-ID: <87wqcdntzh.wl%kuninori.morimoto.gx@renesas.com> References: <1403163631-26215-1-git-send-email-lars@metafoo.de> <1403163631-26215-5-git-send-email-lars@metafoo.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pa0-f50.google.com (mail-pa0-f50.google.com [209.85.220.50]) by alsa0.perex.cz (Postfix) with ESMTP id 904F3261A9B for ; Thu, 19 Jun 2014 11:12:17 +0200 (CEST) Received: by mail-pa0-f50.google.com with SMTP id bj1so1731238pad.9 for ; Thu, 19 Jun 2014 02:12:16 -0700 (PDT) In-Reply-To: <1403163631-26215-5-git-send-email-lars@metafoo.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Lars-Peter Clausen Cc: Brian Austin , alsa-devel@alsa-project.org, Liam Girdwood , Paul Handrigan , Peter Ujfalusi , Mark Brown , Jyri Sarha , Jarkko Nikula List-Id: alsa-devel@alsa-project.org Hi Lars > dmaengine_prep_slave_single() expects a enum dma_transfer_direction and not a > enum dma_data_direction. Since the integer representations of both DMA_TO_DEVICE > and DMA_MEM_TO_DEV aswell as DMA_FROM_DEVICE and DMA_DEV_TO_MEM have the same > value the code worked fine even though it was using the wrong type. > > Fixes the following warning from sparse: > sound/soc/sh/rcar/core.c:227:49: warning: mixing different enum types > sound/soc/sh/rcar/core.c:227:49: int enum dma_data_direction versus > sound/soc/sh/rcar/core.c:227:49: int enum dma_transfer_direction > > Signed-off-by: Lars-Peter Clausen > --- Acked-by: Kuninori Morimoto Actually, ${LINUX}/sound/soc/sh/fsi.c :: fsi_dma_transfer() is using enum dma_data_direction to dmaengine_prep_dma_cyclic() Does it have same issue ? > sound/soc/sh/rcar/core.c | 2 +- > sound/soc/sh/rcar/rsnd.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c > index 4e86265..518a78c 100644 > --- a/sound/soc/sh/rcar/core.c > +++ b/sound/soc/sh/rcar/core.c > @@ -363,7 +363,7 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma, > if (ret < 0) > goto rsnd_dma_init_err; > > - dma->dir = is_play ? DMA_TO_DEVICE : DMA_FROM_DEVICE; > + dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM; > INIT_WORK(&dma->work, rsnd_dma_do_work); > > return 0; > diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h > index 39d98af..067a89e 100644 > --- a/sound/soc/sh/rcar/rsnd.h > +++ b/sound/soc/sh/rcar/rsnd.h > @@ -158,7 +158,7 @@ struct rsnd_dma { > struct sh_dmae_slave slave; > struct work_struct work; > struct dma_chan *chan; > - enum dma_data_direction dir; > + enum dma_transfer_direction dir; > > int submit_loop; > int offset; /* it cares A/B plane */ > -- > 1.8.0 >