[bug report] dma: mmp_pdma: add support for residue reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Daniel Mack,

The patch 1b38da264674: "dma: mmp_pdma: add support for residue
reporting" from Feb 17, 2014, leads to the following static checker
warning:

	drivers/dma/mmp_pdma.c:836 mmp_pdma_tx_status()
	warn: bool comparison is always 'true'

drivers/dma/mmp_pdma.c
   828  static enum dma_status mmp_pdma_tx_status(struct dma_chan *dchan,
   829                                            dma_cookie_t cookie,
   830                                            struct dma_tx_state *txstate)
   831  {
   832          struct mmp_pdma_chan *chan = to_mmp_pdma_chan(dchan);
   833          enum dma_status ret;
   834  
   835          ret = dma_cookie_status(dchan, cookie, txstate);
   836          if (likely(ret != DMA_ERROR))

"ret" is either DMA_IN_PROGRESS or DMA_COMPLETE.  It's quite possible
that you intended to check for DMA_ERROR as a future proofing measure.
But perhaps you intended to test for DMA_COMPLETE?

   837                  dma_set_residue(txstate, mmp_pdma_residue(chan, cookie));
   838  
   839          return ret;
   840  }

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux