Message ID | 1481305856-15206-12-git-send-email-vinod.koul@intel.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Fri, Dec 09, 2016 at 11:20:54PM +0530, Vinod Koul wrote: > In s3c24xx_dma_get_phy(), variable ‘cdata’ is initialized but never used, which > leads to warning with W=1. Removing this make pdata unused. > > drivers/dma/s3c24xx-dma.c: In function ‘s3c24xx_dma_get_phy’: > drivers/dma/s3c24xx-dma.c:293:30: warning: variable ‘cdata’ set but not used [-Wunused-but-set-variable] > struct s3c24xx_dma_channel *cdata; > > So remove both of them. > > Cc: Krzysztof Kozlowski <krzk@kernel.org> > Signed-off-by: Vinod Koul <vinod.koul@intel.com> > --- > drivers/dma/s3c24xx-dma.c | 5 ----- > 1 file changed, 5 deletions(-) > Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/dma/s3c24xx-dma.c b/drivers/dma/s3c24xx-dma.c index 3c579abbabb7..f04c4702d98b 100644 --- a/drivers/dma/s3c24xx-dma.c +++ b/drivers/dma/s3c24xx-dma.c @@ -289,16 +289,11 @@ static bool s3c24xx_dma_phy_valid(struct s3c24xx_dma_chan *s3cchan, struct s3c24xx_dma_phy *s3c24xx_dma_get_phy(struct s3c24xx_dma_chan *s3cchan) { struct s3c24xx_dma_engine *s3cdma = s3cchan->host; - const struct s3c24xx_dma_platdata *pdata = s3cdma->pdata; - struct s3c24xx_dma_channel *cdata; struct s3c24xx_dma_phy *phy = NULL; unsigned long flags; int i; int ret; - if (s3cchan->slave) - cdata = &pdata->channels[s3cchan->id]; - for (i = 0; i < s3cdma->pdata->num_phy_channels; i++) { phy = &s3cdma->phy_chans[i];
In s3c24xx_dma_get_phy(), variable ‘cdata’ is initialized but never used, which leads to warning with W=1. Removing this make pdata unused. drivers/dma/s3c24xx-dma.c: In function ‘s3c24xx_dma_get_phy’: drivers/dma/s3c24xx-dma.c:293:30: warning: variable ‘cdata’ set but not used [-Wunused-but-set-variable] struct s3c24xx_dma_channel *cdata; So remove both of them. Cc: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> --- drivers/dma/s3c24xx-dma.c | 5 ----- 1 file changed, 5 deletions(-)