Patchwork [U-Boot,01/12] drivers/spi/atmel_spi.c: Fix GCC 4.6 warning

login
register
mail settings
Submitter Anatolij Gustschin
Date Nov. 15, 2011, 11:20 p.m.
Message ID <1321399263-13826-2-git-send-email-agust@denx.de>
Download mbox | patch
Permalink /patch/125885/
State Accepted
Commit eba46d69b35b8a6d7de8f17328f2cb274988714f
Headers show

Comments

Anatolij Gustschin - Nov. 15, 2011, 11:20 p.m.
Fix:
atmel_spi.c: In function 'spi_xfer':
atmel_spi.c:139:7: warning: variable 'ret' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 drivers/spi/atmel_spi.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
Wolfgang Denk - Nov. 16, 2011, 8:28 p.m.
Dear Anatolij Gustschin,

In message <1321399263-13826-2-git-send-email-agust@denx.de> you wrote:
> Fix:
> atmel_spi.c: In function 'spi_xfer':
> atmel_spi.c:139:7: warning: variable 'ret' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  drivers/spi/atmel_spi.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Patch

diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 33e38b6..83ef8e8 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -136,13 +136,11 @@  int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
 	unsigned int	len_tx;
 	unsigned int	len_rx;
 	unsigned int	len;
-	int		ret;
 	u32		status;
 	const u8	*txp = dout;
 	u8		*rxp = din;
 	u8		value;
 
-	ret = 0;
 	if (bitlen == 0)
 		/* Finish any previously submitted transfers */
 		goto out;