From patchwork Thu Jun 2 15:19:37 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 98423 X-Patchwork-Delegate: wd@denx.de 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 2EFBFB6F8B for ; Fri, 3 Jun 2011 01:34:54 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B7F1E280B7; Thu, 2 Jun 2011 17:34:52 +0200 (CEST) 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 Y90VKi25OlFJ; Thu, 2 Jun 2011 17:34:52 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6763F2809E; Thu, 2 Jun 2011 17:34:51 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 036172809E for ; Thu, 2 Jun 2011 17:34:49 +0200 (CEST) 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 Zu-sAYP04MuP for ; Thu, 2 Jun 2011 17:34:48 +0200 (CEST) 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 CH1EHSOBE004.bigfish.com (ch1ehsobe006.messaging.microsoft.com [216.32.181.186]) by theia.denx.de (Postfix) with ESMTPS id 0403A2809C for ; Thu, 2 Jun 2011 17:34:46 +0200 (CEST) Received: from mail211-ch1-R.bigfish.com (216.32.181.174) by CH1EHSOBE004.bigfish.com (10.43.70.54) with Microsoft SMTP Server id 14.1.225.22; Thu, 2 Jun 2011 15:19:41 +0000 Received: from mail211-ch1 (localhost.localdomain [127.0.0.1]) by mail211-ch1-R.bigfish.com (Postfix) with ESMTP id 13F5014800A6; Thu, 2 Jun 2011 15:19:41 +0000 (UTC) X-SpamScore: 4 X-BigFish: VS4(zzzz1202h1082kzz8275dhz2ei87h2a8h668h839h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:137.71.25.55; KIP:(null); UIP:(null); IPVD:NLI; H:nwd2mta1.analog.com; RD:nwd2mail10.analog.com; EFVD:NLI Received-SPF: neutral (mail211-ch1: 137.71.25.55 is neither permitted nor denied by domain of gentoo.org) client-ip=137.71.25.55; envelope-from=vapier@gentoo.org; helo=nwd2mta1.analog.com ; 1.analog.com ; X-FB-DOMAIN-IP-MATCH: fail Received: from mail211-ch1 (localhost.localdomain [127.0.0.1]) by mail211-ch1 (MessageSwitch) id 1307027980423127_25213; Thu, 2 Jun 2011 15:19:40 +0000 (UTC) Received: from CH1EHSMHS020.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.245]) by mail211-ch1.bigfish.com (Postfix) with ESMTP id 58075F4804B; Thu, 2 Jun 2011 15:19:40 +0000 (UTC) Received: from nwd2mta1.analog.com (137.71.25.55) by CH1EHSMHS020.bigfish.com (10.43.70.20) with Microsoft SMTP Server (TLS) id 14.1.225.22; Thu, 2 Jun 2011 15:19:40 +0000 Received: from NWD2HUBCAS1.ad.analog.com (nwd2hubcas1.ad.analog.com [10.64.73.29]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id p52FJO4o010863 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Thu, 2 Jun 2011 11:19:24 -0400 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS1.ad.analog.com (10.64.73.29) with Microsoft SMTP Server id 8.1.358.0; Thu, 2 Jun 2011 11:19:38 -0400 Received: from vapier-adi.analog.com ([10.64.172.96]) by zeus.spd.analog.com (8.14.1/8.14.1) with ESMTP id p52FJcCQ018373; Thu, 2 Jun 2011 11:19:38 -0400 (EDT) From: Mike Frysinger To: Date: Thu, 2 Jun 2011 11:19:37 -0400 Message-ID: <1307027978-13418-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.5.3 MIME-Version: 1.0 Subject: [U-Boot] [PATCH] net: designware: fix unused warning when CONFIG_DW_AUTONEG is enabled 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 The ctrl variable is only used when autoneg support is disabled, so only declare it under those conditions to avoid an unused variable warning. Signed-off-by: Mike Frysinger Reviewed-by: Vipin Kumar --- drivers/net/designware.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 3f5eeb7..96f20d1 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -368,11 +368,13 @@ static int configure_phy(struct eth_device *dev) { struct dw_eth_dev *priv = dev->priv; int phy_addr; - u16 bmcr, ctrl; + u16 bmcr; #if defined(CONFIG_DW_AUTONEG) u16 bmsr; u32 timeout; u16 anlpar, btsr; +#else + u16 ctrl; #endif #if defined(CONFIG_DW_SEARCH_PHY)