dmaengine: vdma: Fix compilation warning in cyclic dma mode
authorKedareswara rao Appana <appana.durga.rao@xilinx.com>
Thu, 9 Jun 2016 06:02:12 +0000 (11:32 +0530)
committerVinod Koul <vinod.koul@intel.com>
Mon, 13 Jun 2016 05:41:17 +0000 (11:11 +0530)
commite167a0b6dc49cb3694fea888560aa462532951dd
tree228357994aee3b57b13b784eb874bf514c3acce4
parent62147866517b3c2b22f52adec2b21bf97ce1e684
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>
drivers/dma/xilinx/xilinx_vdma.c