summaryrefslogtreecommitdiff
path: root/drivers/net/enc28j60.c
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2011-11-15 13:20:55 +0000
committerWolfgang Denk <wd@denx.de>2011-11-16 21:29:23 +0100
commitda5406655ae4762c36a221b6b0ac6f1c334ae660 (patch)
tree97327d4542703571d2619624a28572559bb70543 /drivers/net/enc28j60.c
parente560492b322b02037247b8d8ac5cd94f70c46574 (diff)
downloadu-boot-imx-da5406655ae4762c36a221b6b0ac6f1c334ae660.zip
u-boot-imx-da5406655ae4762c36a221b6b0ac6f1c334ae660.tar.gz
u-boot-imx-da5406655ae4762c36a221b6b0ac6f1c334ae660.tar.bz2
drivers/net/enc28j60.c: Fix GCC 4.6 warnings
Fix: enc28j60.c: In function 'enc_receive': enc28j60.c:435:5: warning: variable 'eir_reg' set but not used [-Wunused-but-set-variable] enc28j60.c: In function 'enc_poll': enc28j60.c:503:5: warning: variable 'estat_reg' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers/net/enc28j60.c')
-rw-r--r--drivers/net/enc28j60.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c
index d55cacd..e2011ae 100644
--- a/drivers/net/enc28j60.c
+++ b/drivers/net/enc28j60.c
@@ -432,7 +432,6 @@ static void enc_receive(enc_dev_t *enc)
u16 pkt_len;
u16 copy_len;
u16 status;
- u8 eir_reg;
u8 pkt_cnt = 0;
u16 rxbuf_rdpt;
u8 hbuf[6];
@@ -476,7 +475,7 @@ static void enc_receive(enc_dev_t *enc)
/* read pktcnt */
pkt_cnt = enc_r8(enc, CTL_REG_EPKTCNT);
if (copy_len == 0) {
- eir_reg = enc_r8(enc, CTL_REG_EIR);
+ (void)enc_r8(enc, CTL_REG_EIR);
enc_reset_rx(enc);
printf("%s: receive copy_len=0\n", enc->dev->name);
continue;
@@ -489,7 +488,7 @@ static void enc_receive(enc_dev_t *enc)
NetReceive(packet, pkt_len);
if (enc_claim_bus(enc))
return;
- eir_reg = enc_r8(enc, CTL_REG_EIR);
+ (void)enc_r8(enc, CTL_REG_EIR);
} while (pkt_cnt);
/* Use EPKTCNT not EIR.PKTIF flag, see errata pt. 6 */
}
@@ -500,14 +499,13 @@ static void enc_receive(enc_dev_t *enc)
static void enc_poll(enc_dev_t *enc)
{
u8 eir_reg;
- u8 estat_reg;
u8 pkt_cnt;
#ifdef CONFIG_USE_IRQ
/* clear global interrupt enable bit in enc28j60 */
enc_bclr(enc, CTL_REG_EIE, ENC_EIE_INTIE);
#endif
- estat_reg = enc_r8(enc, CTL_REG_ESTAT);
+ (void)enc_r8(enc, CTL_REG_ESTAT);
eir_reg = enc_r8(enc, CTL_REG_EIR);
if (eir_reg & ENC_EIR_TXIF) {
/* clear TXIF bit in EIR */