From patchwork Thu Jun 2 15:19:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 98424 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 AEF27B6F8B for ; Fri, 3 Jun 2011 01:35:03 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 66101280A7; Thu, 2 Jun 2011 17:35:00 +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 XqjfwD-75JE3; Thu, 2 Jun 2011 17:35:00 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 39180280AC; Thu, 2 Jun 2011 17:34:59 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BB574280A7 for ; Thu, 2 Jun 2011 17:34:57 +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 r9IfS8L+2Zqg for ; Thu, 2 Jun 2011 17:34:57 +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 CH1EHSOBE008.bigfish.com (ch1ehsobe001.messaging.microsoft.com [216.32.181.181]) by theia.denx.de (Postfix) with ESMTPS id 246DC280AC for ; Thu, 2 Jun 2011 17:34:50 +0200 (CEST) Received: from mail157-ch1-R.bigfish.com (216.32.181.172) by CH1EHSOBE008.bigfish.com (10.43.70.58) with Microsoft SMTP Server id 14.1.225.22; Thu, 2 Jun 2011 15:19:45 +0000 Received: from mail157-ch1 (localhost.localdomain [127.0.0.1]) by mail157-ch1-R.bigfish.com (Postfix) with ESMTP id 5DC56B402E5; Thu, 2 Jun 2011 15:19:45 +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 (mail157-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 mail157-ch1 (localhost.localdomain [127.0.0.1]) by mail157-ch1 (MessageSwitch) id 1307027984570390_16214; Thu, 2 Jun 2011 15:19:44 +0000 (UTC) Received: from CH1EHSMHS003.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.254]) by mail157-ch1.bigfish.com (Postfix) with ESMTP id 87F5D101804B; Thu, 2 Jun 2011 15:19:44 +0000 (UTC) Received: from nwd2mta1.analog.com (137.71.25.55) by CH1EHSMHS003.bigfish.com (10.43.70.3) 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 p52FJOJT010868 (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:39 -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 p52FJcCR018373; Thu, 2 Jun 2011 11:19:39 -0400 (EDT) From: Mike Frysinger To: Date: Thu, 2 Jun 2011 11:19:38 -0400 Message-ID: <1307027978-13418-2-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.5.3 In-Reply-To: <1307027978-13418-1-git-send-email-vapier@gentoo.org> References: <1307027978-13418-1-git-send-email-vapier@gentoo.org> MIME-Version: 1.0 Subject: [U-Boot] [PATCH] net: designware: fix uninitialized phy_addr usage 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 When CONFIG_DW_SEARCH_PHY is disabled, the local phy_addr variable never gets initialized causes random behavior at runtime and a gcc warning. So set it by default to the stored phy address. Signed-off-by: Mike Frysinger Reviewed-by: Vipin Kumar --- drivers/net/designware.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 96f20d1..bfa4384 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -383,6 +383,8 @@ static int configure_phy(struct eth_device *dev) priv->address = phy_addr; else return -1; +#else + phy_addr = priv->address; #endif if (dw_reset_phy(dev) < 0) return -1;