lkml.org 
[lkml]   [2019]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] net: ethernet: ti: davinci_cpdma: fix warning "device driver frees DMA memory with different size"
From
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....

\
 
 \ /
  Last update: 2019-12-07 20:51    [W:0.025 / U:3.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site