diff mbox

spi: omap2-mcspi: Fix the redifine warning

Message ID 1353307349-4611-1-git-send-email-shubhrajyoti@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shubhrajyoti Datta Nov. 19, 2012, 6:42 a.m. UTC
Fix the below warning
drivers/spi/spi-omap2-mcspi.c:336:34: warning: symbol 'tx' shadows an earlier one
drivers/spi/spi-omap2-mcspi.c:327:12: originally declared here

So delete the u8 tx as it is assigned and not used(resigned afterwards).

Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
---
 drivers/spi/spi-omap2-mcspi.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

Comments

Peter Korsgaard Nov. 19, 2012, 10:33 a.m. UTC | #1
>>>>> "Shubhrajyoti" == Shubhrajyoti D <shubhrajyoti@ti.com> writes:

 Shubhrajyoti> Fix the below warning

 Shubhrajyoti> drivers/spi/spi-omap2-mcspi.c:336:34: warning: symbol
 Shubhrajyoti> 'tx' shadows an earlier one
 Shubhrajyoti> drivers/spi/spi-omap2-mcspi.c:327:12: originally declared
 Shubhrajyoti> here

 Shubhrajyoti> So delete the u8 tx as it is assigned and not
 Shubhrajyoti> used(resigned afterwards).

 Shubhrajyoti> Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>

Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Mark Brown Dec. 2, 2012, 3:18 p.m. UTC | #2
On Mon, Nov 19, 2012 at 12:12:29PM +0530, Shubhrajyoti D wrote:
> Fix the below warning
> drivers/spi/spi-omap2-mcspi.c:336:34: warning: symbol 'tx' shadows an earlier one
> drivers/spi/spi-omap2-mcspi.c:327:12: originally declared here

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 251f6d0..c3dcfb3 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -323,14 +323,11 @@  static void omap2_mcspi_tx_dma(struct spi_device *spi,
 	struct omap2_mcspi	*mcspi;
 	struct omap2_mcspi_dma  *mcspi_dma;
 	unsigned int		count;
-	const u8		* tx;
 
 	mcspi = spi_master_get_devdata(spi->master);
 	mcspi_dma = &mcspi->dma_channels[spi->chip_select];
 	count = xfer->len;
 
-	tx = xfer->tx_buf;
-
 	if (mcspi_dma->dma_tx) {
 		struct dma_async_tx_descriptor *tx;
 		struct scatterlist sg;