From patchwork Tue Nov 15 23:20:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 125890 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 1AF72B6FA5 for ; Wed, 16 Nov 2011 10:22:09 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CA970286B9; Wed, 16 Nov 2011 00:21:54 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lRPTof7FyrkN; Wed, 16 Nov 2011 00:21:54 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3F73B28697; Wed, 16 Nov 2011 00:21:14 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 81CF328645 for ; Wed, 16 Nov 2011 00:21:06 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M-V9745eD+L8 for ; Wed, 16 Nov 2011 00:21:06 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTP id 048AF285E4 for ; Wed, 16 Nov 2011 00:20:58 +0100 (CET) Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 2E631186DEE4 for ; Wed, 16 Nov 2011 00:23:14 +0100 (CET) X-Auth-Info: mka1E/CQNJ+hhdVramzPC6kqlTKyH1n6IUgx645Saos= Received: from localhost (p4FDE74FB.dip.t-dialin.net [79.222.116.251]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id 08B851C000A0 for ; Wed, 16 Nov 2011 00:20:58 +0100 (CET) From: Anatolij Gustschin To: u-boot@lists.denx.de Date: Wed, 16 Nov 2011 00:20:55 +0100 Message-Id: <1321399263-13826-5-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1321399263-13826-1-git-send-email-agust@denx.de> References: <1321399263-13826-1-git-send-email-agust@denx.de> Subject: [U-Boot] [PATCH 04/12] drivers/net/enc28j60.c: Fix GCC 4.6 warnings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- drivers/net/enc28j60.c | 8 +++----- 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 */