linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chunyan Zhang <zhang.lyra@gmail.com>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	Faiz Abbas <faiz_abbas@ti.com>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Chunyan Zhang <zhang.chunyan@linaro.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	clang-built-linux@googlegroups.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	kbuild test robot <lkp@intel.com>
Subject: Re: [PATCH v2] mmc: sdhci: fix an issue of mixing different types
Date: Mon, 20 Jan 2020 16:14:09 +0800	[thread overview]
Message-ID: <CAAfSe-vjmFGkK5Enj9Nj_qrERJbNQTLejpVL+JVJLG7tgNhT9w@mail.gmail.com> (raw)
In-Reply-To: <65f7272c-ecea-03de-433b-21ba2e672d20@intel.com>

On Mon, 20 Jan 2020 at 15:15, Adrian Hunter <adrian.hunter@intel.com> wrote:
>
> On 20/01/20 5:32 am, Chunyan Zhang wrote:
> > Fix an issue reported by sparse, since mixed types of parameters are
> > used on calling dmaengine_prep_slave_sg().
> >
> > Fixes: 36e1da441fec (mmc: sdhci: add support for using external DMA devices)
>
> That commit number is only in next

Ok, so should this line be removed?

>
> > Reported-by: kbuild test robot <lkp@intel.com>
> > Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
> > Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
>
> Acked-by: Adrian Hunter <adrian.hunter@intel.com>

Thank you!

Chunyan

>
> > ---
> > Changes from v1:
> > * address comments from Nathan Chancellor
> > - define a new variable to avoid type conversions.
> > ---
> >  drivers/mmc/host/sdhci.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> > index 30b5a624b50e..f9e0b5f2c692 100644
> > --- a/drivers/mmc/host/sdhci.c
> > +++ b/drivers/mmc/host/sdhci.c
> > @@ -1201,6 +1201,7 @@ static int sdhci_external_dma_setup(struct sdhci_host *host,
> >                                   struct mmc_command *cmd)
> >  {
> >       int ret, i;
> > +     enum dma_transfer_direction dir;
> >       struct dma_async_tx_descriptor *desc;
> >       struct mmc_data *data = cmd->data;
> >       struct dma_chan *chan;
> > @@ -1234,8 +1235,8 @@ static int sdhci_external_dma_setup(struct sdhci_host *host,
> >       if (sg_cnt <= 0)
> >               return -EINVAL;
> >
> > -     desc = dmaengine_prep_slave_sg(chan, data->sg, data->sg_len,
> > -                                    mmc_get_dma_dir(data),
> > +     dir = data->flags & MMC_DATA_WRITE ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
> > +     desc = dmaengine_prep_slave_sg(chan, data->sg, data->sg_len, dir,
> >                                      DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
> >       if (!desc)
> >               return -EINVAL;
> >
>

  reply	other threads:[~2020-01-20  8:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-20  3:10 [PATCH v2] mmc: sdhci: fix an issue of mixing different types Chunyan Zhang
2020-01-20  3:32 ` Chunyan Zhang
2020-01-20  7:14   ` Adrian Hunter
2020-01-20  8:14     ` Chunyan Zhang [this message]
2020-01-20 11:25       ` Ulf Hansson

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=CAAfSe-vjmFGkK5Enj9Nj_qrERJbNQTLejpVL+JVJLG7tgNhT9w@mail.gmail.com \
    --to=zhang.lyra@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=faiz_abbas@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=natechancellor@gmail.com \
    --cc=ulf.hansson@linaro.org \
    --cc=zhang.chunyan@linaro.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).