Patchwork [U-Boot,06/10] drivers/net/cs8900.c: Fix GCC 4.6 warning

login
register
mail settings
Submitter Anatolij Gustschin
Date Nov. 19, 2011, 11:12 p.m.
Message ID <1321744338-13207-7-git-send-email-agust@denx.de>
Download mbox | patch
Permalink /patch/126629/
State Accepted
Commit da227355bf57dcd1ddb87348067a475e2dd1a164
Headers show

Comments

Anatolij Gustschin - Nov. 19, 2011, 11:12 p.m.
Fix:
cs8900.c: In function 'get_reg_init_bus':
cs8900.c:69:14: warning: variable 'c' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Anatolij Gustschin <agust@denx.de>
---
 drivers/net/cs8900.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
Heiko Schocher - Nov. 23, 2011, 7:22 a.m.
Hello Anatolij,

Anatolij Gustschin wrote:
> Fix:
> cs8900.c: In function 'get_reg_init_bus':
> cs8900.c:69:14: warning: variable 'c' set but not used
> [-Wunused-but-set-variable]
> 
> Signed-off-by: Anatolij Gustschin <agust@denx.de>
> ---
>  drivers/net/cs8900.c |   11 +++++------
>  1 files changed, 5 insertions(+), 6 deletions(-)

Applied to u-boot-staging hs@denx.de

Thanks!

bye,
Heiko

Patch

diff --git a/drivers/net/cs8900.c b/drivers/net/cs8900.c
index 9424fb2..e04a784 100644
--- a/drivers/net/cs8900.c
+++ b/drivers/net/cs8900.c
@@ -66,15 +66,14 @@ 
 static u16 get_reg_init_bus(struct eth_device *dev, int regno)
 {
 	/* force 16 bit busmode */
-	volatile u8 c;
 	struct cs8900_priv *priv = (struct cs8900_priv *)(dev->priv);
 	uint8_t volatile * const iob = (uint8_t volatile * const)dev->iobase;
 
-	c = readb(iob);
-	c = readb(iob + 1);
-	c = readb(iob);
-	c = readb(iob + 1);
-	c = readb(iob);
+	readb(iob);
+	readb(iob + 1);
+	readb(iob);
+	readb(iob + 1);
+	readb(iob);
 
 	REG_WRITE(regno, &priv->regs->pptr);
 	return REG_READ(&priv->regs->pdata);