mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ivan.khoronzhuk@linaro.org
Cc: grygorii.strashko@ti.com, netdev@vger.kernel.org, nsekhar@ti.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] net: ethernet: ti: davinci_cpdma: fix warning "device driver frees DMA memory with different size"
Date: Sat, 07 Dec 2019 11:50:34 -0800 (PST)	[thread overview]
Message-ID: <20191207.115034.1743579700466281633.davem@davemloft.net> (raw)
In-Reply-To: <20191207120238.GB2798@khorivan>

From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Date: Sat, 7 Dec 2019 14:02:39 +0200

> @@ -1046,7 +1045,6 @@ static int cpdma_chan_submit_si(struct
> submit_info *si)
>        if (si->data_dma) {
>                buffer = si->data_dma;
>                dma_sync_single_for_device(ctlr->dev, buffer, len, chan->dir);
> -               swlen |= CPDMA_DMA_EXT_MAP;
>        } else {
>                buffer = dma_map_single(ctlr->dev, si->data_virt, len, chan->dir);
>                ret = dma_mapping_error(ctlr->dev, buffer);
> @@ -1065,7 +1063,7 @@ static int cpdma_chan_submit_si(struct
> submit_info *si)
>        writel_relaxed(mode | len, &desc->hw_mode);
>        writel_relaxed((uintptr_t)si->token, &desc->sw_token);
>        writel_relaxed(buffer, &desc->sw_buffer);
> -       writel_relaxed(swlen, &desc->sw_len);
> + writel_relaxed(si->data_dma ? len | CPDMA_DMA_EXT_MAP : len,
> &desc->sw_len);
>        desc_read(desc, sw_len);
> 
>        __cpdma_chan_submit(chan, desc);
> 
> But it's branched twice then.

It's a conditional move rather than a branch....

      reply	other threads:[~2019-12-07 19:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-04 16:50 Grygorii Strashko
2019-12-04 20:37 ` David Miller
2019-12-05 10:48   ` Grygorii Strashko
2019-12-07 11:44     ` Ivan Khoronzhuk
2019-12-07 12:02       ` Ivan Khoronzhuk
2019-12-07 19:50         ` David Miller [this message]

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=20191207.115034.1743579700466281633.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=grygorii.strashko@ti.com \
    --cc=ivan.khoronzhuk@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nsekhar@ti.com \
    /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

all inboxes | Powered by JetHome®