dmaengine Archive on lore.kernel.org
 help / color / Atom feed
* [bug report] dmaengine: axi-dmac: Add support for interleaved cyclic transfers
@ 2019-06-24 12:13 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2019-06-24 12:13 UTC (permalink / raw)
  To: dragos.bogdan; +Cc: dmaengine

Hello Dragos Bogdan,

The patch 8add6cce9848: "dmaengine: axi-dmac: Add support for
interleaved cyclic transfers" from May 16, 2019, leads to the
following static checker warning:

	drivers/dma/dma-axi-dmac.c:666 axi_dmac_prep_interleaved()
	warn: bit shifter 'DMA_CYCLIC' used for logical '&'

drivers/dma/dma-axi-dmac.c
   658          if (chan->hw_2d) {
   659                  desc->sg[0].x_len = xt->sgl[0].size;
   660                  desc->sg[0].y_len = xt->numf;
   661          } else {
   662                  desc->sg[0].x_len = xt->sgl[0].size * xt->numf;
   663                  desc->sg[0].y_len = 1;
   664          }
   665  
   666          if (flags & DMA_CYCLIC)
   667                  desc->cyclic = true;

This won't work.  I think you have to use dma_has_cap() or test_bit() or
something.  Or you could do:

	if (flags & (1 << DMA_CYCLIC)) {

DMA_CYCLIC is 0xb so this will return true for a bunch of stuff when it
shouldn't.

   668  
   669          return vchan_tx_prep(&chan->vchan, &desc->vdesc, flags);
   670  }


regards,
dan carpenter

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-24 12:13 [bug report] dmaengine: axi-dmac: Add support for interleaved cyclic transfers Dan Carpenter

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org dmaengine@archiver.kernel.org
	public-inbox-index dmaengine

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/ public-inbox