summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2019-07-30 09:20:15 -0400
committerVinod Koul <vkoul@kernel.org>2019-09-04 00:40:17 -0400
commit7a09c09c300761f2a0f34cfecebe327883de5864 (patch)
tree21aeb9fb53309a10f576955e98d1d1eb40ea2ecb
parente3b9fef8ddf8a5a31a16c4959202f5d88e07e080 (diff)
dmaengine: ti: omap-dma: Remove 'Assignment in if condition'
While the compiler does not have problem with how it is implemented, checkpatch does give en ERROR for this arrangement. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20190730132015.2863-1-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r--drivers/dma/ti/omap-dma.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/dma/ti/omap-dma.c b/drivers/dma/ti/omap-dma.c
index d27779be5b17..23da592594fa 100644
--- a/drivers/dma/ti/omap-dma.c
+++ b/drivers/dma/ti/omap-dma.c
@@ -814,7 +814,6 @@ static enum dma_status omap_dma_tx_status(struct dma_chan *chan,
814 dma_cookie_t cookie, struct dma_tx_state *txstate) 814 dma_cookie_t cookie, struct dma_tx_state *txstate)
815{ 815{
816 struct omap_chan *c = to_omap_dma_chan(chan); 816 struct omap_chan *c = to_omap_dma_chan(chan);
817 struct virt_dma_desc *vd;
818 enum dma_status ret; 817 enum dma_status ret;
819 unsigned long flags; 818 unsigned long flags;
820 struct omap_desc *d = NULL; 819 struct omap_desc *d = NULL;
@@ -841,10 +840,14 @@ static enum dma_status omap_dma_tx_status(struct dma_chan *chan,
841 pos = 0; 840 pos = 0;
842 841
843 txstate->residue = omap_dma_desc_size_pos(d, pos); 842 txstate->residue = omap_dma_desc_size_pos(d, pos);
844 } else if ((vd = vchan_find_desc(&c->vc, cookie))) {
845 txstate->residue = omap_dma_desc_size(to_omap_dma_desc(&vd->tx));
846 } else { 843 } else {
847 txstate->residue = 0; 844 struct virt_dma_desc *vd = vchan_find_desc(&c->vc, cookie);
845
846 if (vd)
847 txstate->residue = omap_dma_desc_size(
848 to_omap_dma_desc(&vd->tx));
849 else
850 txstate->residue = 0;
848 } 851 }
849 852
850out: 853out: