From patchwork Mon Nov 7 08:22:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zang Roy-R61911 X-Patchwork-Id: 124011 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 935DC1007D3 for ; Mon, 7 Nov 2011 18:36:53 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D09D828BE0; Mon, 7 Nov 2011 08:36:49 +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 jmkfvRQ2irwm; Mon, 7 Nov 2011 08:36:49 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CB2BB28AE6; Mon, 7 Nov 2011 08:36:47 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BA76028AE6 for ; Mon, 7 Nov 2011 08:36:45 +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 HDDrF9sZPDyN for ; Mon, 7 Nov 2011 08:36:45 +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 TX2EHSOBE008.bigfish.com (tx2ehsobe004.messaging.microsoft.com [65.55.88.14]) by theia.denx.de (Postfix) with ESMTPS id 9558C28ADB for ; Mon, 7 Nov 2011 08:36:43 +0100 (CET) Received: from mail159-tx2-R.bigfish.com (10.9.14.243) by TX2EHSOBE008.bigfish.com (10.9.40.28) with Microsoft SMTP Server id 14.1.225.22; Mon, 7 Nov 2011 07:36:19 +0000 Received: from mail159-tx2 (localhost.localdomain [127.0.0.1]) by mail159-tx2-R.bigfish.com (Postfix) with ESMTP id CA5F519400FF; Mon, 7 Nov 2011 07:36:31 +0000 (UTC) X-SpamScore: 0 X-BigFish: VS0(zzzz1202hzz8275bhz2dh2a8h668h839h62h) X-Spam-TCS-SCL: 1:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail159-tx2 (localhost.localdomain [127.0.0.1]) by mail159-tx2 (MessageSwitch) id 1320651391730160_18860; Mon, 7 Nov 2011 07:36:31 +0000 (UTC) Received: from TX2EHSMHS014.bigfish.com (unknown [10.9.14.243]) by mail159-tx2.bigfish.com (Postfix) with ESMTP id A6B17E90055; Mon, 7 Nov 2011 07:36:31 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS014.bigfish.com (10.9.99.114) with Microsoft SMTP Server (TLS) id 14.1.225.22; Mon, 7 Nov 2011 07:36:56 +0000 Received: from az33smr01.freescale.net (10.64.34.199) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server id 14.1.339.2; Mon, 7 Nov 2011 01:36:39 -0600 Received: from localhost.localdomain (udp144271uds.ap.freescale.net [10.193.20.25]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id pA77aaM2011716; Mon, 7 Nov 2011 01:36:37 -0600 (CST) From: Roy Zang To: Date: Mon, 7 Nov 2011 16:22:36 +0800 Message-ID: <1320654156-3240-1-git-send-email-tie-fei.zang@freescale.com> X-Mailer: git-send-email 1.6.0.6 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Cc: Moffett , Kyle@theia.denx.de Subject: [U-Boot] [PATCH] e1000: fix unused variable waring for e1000 driver 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Fix the following build warning in drivers/net/e1000.c e1000.c: In function 'e1000_reset_hw': e1000.c:1373:11: warning: variable 'icr' set but not used [-Wunused-but-set-variable] e1000.c: In function 'e1000_phy_init_script': e1000.c:4395:11: warning: variable 'ret_val' set but not used [-Wunused-but-set-variable] Signed-off-by: Roy Zang Cc: Wolfgang Denk Cc: Kyle Moffett --- drivers/net/e1000.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/e1000.c b/drivers/net/e1000.c index 6eab7b2..6b71bd9 100644 --- a/drivers/net/e1000.c +++ b/drivers/net/e1000.c @@ -1370,7 +1370,6 @@ e1000_reset_hw(struct e1000_hw *hw) { uint32_t ctrl; uint32_t ctrl_ext; - uint32_t icr; uint32_t manc; uint32_t pba = 0; @@ -1443,7 +1442,7 @@ e1000_reset_hw(struct e1000_hw *hw) E1000_WRITE_REG(hw, IMC, 0xffffffff); /* Clear any pending interrupt events. */ - icr = E1000_READ_REG(hw, ICR); + E1000_READ_REG(hw, ICR); /* If MWI was previously enabled, reenable it. */ if (hw->mac_type == e1000_82542_rev2_0) { @@ -4447,7 +4446,8 @@ e1000_phy_init_script(struct e1000_hw *hw) mdelay(20); /* Now enable the transmitter */ - e1000_write_phy_reg(hw, 0x2F5B, phy_saved_data); + if (!ret_val) + e1000_write_phy_reg(hw, 0x2F5B, phy_saved_data); if (hw->mac_type == e1000_82547) { uint16_t fused, fine, coarse;