diff mbox

[3/3] omap2_spi: fix compilation warning.

Message ID 1306908084-28959-1-git-send-email-govindraj.raja@ti.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Govindraj.R June 1, 2011, 6:01 a.m. UTC
fix below compilation warning.

drivers/spi/omap2_mcspi.c: In function 'omap2_mcspi_txrx_dma':
drivers/spi/omap2_mcspi.c:301: warning: 'elements' may be used uninitialized in this function

Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 drivers/spi/omap2_mcspi.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Grant Likely June 3, 2011, 8:59 p.m. UTC | #1
On Wed, Jun 01, 2011 at 11:31:24AM +0530, Govindraj.R wrote:
> fix below compilation warning.
> 
> drivers/spi/omap2_mcspi.c: In function 'omap2_mcspi_txrx_dma':
> drivers/spi/omap2_mcspi.c:301: warning: 'elements' may be used uninitialized in this function
> 
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>

Applied, thanks.

Should got to stable too.

g.

> ---
>  drivers/spi/omap2_mcspi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
> index 6f86ba0..969cdd2 100644
> --- a/drivers/spi/omap2_mcspi.c
> +++ b/drivers/spi/omap2_mcspi.c
> @@ -298,7 +298,7 @@ omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer)
>  	unsigned int		count, c;
>  	unsigned long		base, tx_reg, rx_reg;
>  	int			word_len, data_type, element_count;
> -	int			elements;
> +	int			elements = 0;
>  	u32			l;
>  	u8			* rx;
>  	const u8		* tx;
> -- 
> 1.7.0.4
> 

------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger.
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Discover what all the cheering's about.
Get your free trial download today. 
http://p.sf.net/sfu/quest-dev2dev2
diff mbox

Patch

diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c
index 6f86ba0..969cdd2 100644
--- a/drivers/spi/omap2_mcspi.c
+++ b/drivers/spi/omap2_mcspi.c
@@ -298,7 +298,7 @@  omap2_mcspi_txrx_dma(struct spi_device *spi, struct spi_transfer *xfer)
 	unsigned int		count, c;
 	unsigned long		base, tx_reg, rx_reg;
 	int			word_len, data_type, element_count;
-	int			elements;
+	int			elements = 0;
 	u32			l;
 	u8			* rx;
 	const u8		* tx;