Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751815AbeACDzP (ORCPT + 1 other); Tue, 2 Jan 2018 22:55:15 -0500 Received: from mga11.intel.com ([192.55.52.93]:28955 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751432AbeACDzO (ORCPT ); Tue, 2 Jan 2018 22:55:14 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,500,1508828400"; d="scan'208";a="23768353" Date: Wed, 3 Jan 2018 09:29:18 +0530 From: Vinod Koul To: Kedareswara rao Appana Cc: dan.j.williams@intel.com, michal.simek@xilinx.com, appanad@xilinx.com, lars@metafoo.de, akinobu.mita@gmail.com, joabreu@synopsys.com, mike.looijmans@topic.nl, kedare06@gmail.com, dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [LINUX PATCH 3/4] dmaengine: xilinx_dma: Fix compilation warning Message-ID: <20180103035918.GH18649@localhost> References: <1513851098-15787-1-git-send-email-appanad@xilinx.com> <1513851098-15787-4-git-send-email-appanad@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1513851098-15787-4-git-send-email-appanad@xilinx.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Thu, Dec 21, 2017 at 03:41:37PM +0530, Kedareswara rao Appana wrote: Fix title here too BTW whats with LINUX tag in patches, pls drop them > This patch fixes the below sparse warning in the driver > drivers/dma/xilinx/xilinx_dma.c: In function ‘xilinx_vdma_dma_prep_interleaved’: > drivers/dma/xilinx/xilinx_dma.c:1614:43: warning: variable ‘prev’ set but not used [-Wunused-but-set-variable] > struct xilinx_vdma_tx_segment *segment, *prev = NULL; > > Signed-off-by: Kedareswara rao Appana > --- > drivers/dma/xilinx/xilinx_dma.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c > index 8467671..845e638 100644 > --- a/drivers/dma/xilinx/xilinx_dma.c > +++ b/drivers/dma/xilinx/xilinx_dma.c > @@ -1611,7 +1611,7 @@ xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan, > { > struct xilinx_dma_chan *chan = to_xilinx_chan(dchan); > struct xilinx_dma_tx_descriptor *desc; > - struct xilinx_vdma_tx_segment *segment, *prev = NULL; > + struct xilinx_vdma_tx_segment *segment; > struct xilinx_vdma_desc_hw *hw; > > if (!is_slave_direction(xt->dir)) > @@ -1665,8 +1665,6 @@ xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan, > /* Insert the segment into the descriptor segments list. */ > list_add_tail(&segment->node, &desc->segments); > > - prev = segment; > - > /* Link the last hardware descriptor with the first. */ > segment = list_first_entry(&desc->segments, > struct xilinx_vdma_tx_segment, node); > -- > 2.7.4 > -- ~Vinod