diff options
author | Kedareswara rao Appana <appana.durga.rao@xilinx.com> | 2016-06-09 02:02:12 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-06-13 01:41:17 -0400 |
commit | e167a0b6dc49cb3694fea888560aa462532951dd (patch) | |
tree | 228357994aee3b57b13b784eb874bf514c3acce4 /drivers/dma/xilinx | |
parent | 62147866517b3c2b22f52adec2b21bf97ce1e684 (diff) |
dmaengine: vdma: Fix compilation warning in cyclic dma mode
This patch fixes the below compilation warining.
drivers/dma/xilinx/xilinx_vdma.c: In function 'xilinx_dma_prep_dma_cyclic':
drivers/dma/xilinx/xilinx_vdma.c:1808:23: warning: 'segment' may be used
uninitialized in this function [-Wmaybe-uninitialized]
segment->hw.control |= XILINX_DMA_BD_SOP;
The start of packet (SOP) should be set to the first segment in the desc
chain not for the last segment of the desc chain.
Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/xilinx')
-rw-r--r-- | drivers/dma/xilinx/xilinx_vdma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/xilinx/xilinx_vdma.c b/drivers/dma/xilinx/xilinx_vdma.c index 0f5b38a0e46f..0af0cf4b5f2e 100644 --- a/drivers/dma/xilinx/xilinx_vdma.c +++ b/drivers/dma/xilinx/xilinx_vdma.c | |||
@@ -1805,7 +1805,7 @@ static struct dma_async_tx_descriptor *xilinx_dma_prep_dma_cyclic( | |||
1805 | 1805 | ||
1806 | /* For the last DMA_MEM_TO_DEV transfer, set EOP */ | 1806 | /* For the last DMA_MEM_TO_DEV transfer, set EOP */ |
1807 | if (direction == DMA_MEM_TO_DEV) { | 1807 | if (direction == DMA_MEM_TO_DEV) { |
1808 | segment->hw.control |= XILINX_DMA_BD_SOP; | 1808 | head_segment->hw.control |= XILINX_DMA_BD_SOP; |
1809 | segment = list_last_entry(&desc->segments, | 1809 | segment = list_last_entry(&desc->segments, |
1810 | struct xilinx_axidma_tx_segment, | 1810 | struct xilinx_axidma_tx_segment, |
1811 | node); | 1811 | node); |