From patchwork Sun Aug 11 15:08:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Silbe X-Patchwork-Id: 266334 X-Patchwork-Delegate: joe.hershberger@gmail.com 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 A66182C00AF for ; Mon, 12 Aug 2013 01:08:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DF9084A049; Sun, 11 Aug 2013 17:08:45 +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 v+-Q5flbhdTS; Sun, 11 Aug 2013 17:08:45 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 721354A058; Sun, 11 Aug 2013 17:08:43 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 74E0A4A058 for ; Sun, 11 Aug 2013 17:08:41 +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 kYhVdSvF+t3q for ; Sun, 11 Aug 2013 17:08:36 +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 b.mx.chost.de (b.mx.chost.de [87.106.8.89]) by theia.denx.de (Postfix) with ESMTPS id 3C0724A049 for ; Sun, 11 Aug 2013 17:08:30 +0200 (CEST) Received: from sshgate.chost.de (sshgate.chost.de [::ffff:87.106.80.19]) by b.mx.chost.de with esmtp; Sun, 11 Aug 2013 17:08:28 +0200 id 0A6575C9.5207A8EC.000040E8 Received: by sshgate.chost.de (sSMTP sendmail emulation); Sun, 11 Aug 2013 17:08:28 +0200 Received: (nullmailer pid 20947 invoked by uid 8193); Sun, 11 Aug 2013 15:08:28 -0000 From: Sascha Silbe To: u-boot@lists.denx.de Date: Sun, 11 Aug 2013 17:08:23 +0200 Message-Id: <1376233703-20815-1-git-send-email-t-uboot@infra-silbe.de> X-Mailer: git-send-email 1.8.3.2 Cc: Joe Hershberger Subject: [U-Boot] [PATCH v6] NET: mvgbe: avoid unused variable warning when used without phylib support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 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 Avoid a recently introduced unused variable warning for boards that use mvgbe but not phylib. Signed-off-by: Sascha Silbe --- v5->v6: Split out from CuBox support patch series. drivers/net/mvgbe.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c index 6c901d1..0cd06b6 100644 --- a/drivers/net/mvgbe.c +++ b/drivers/net/mvgbe.c @@ -420,8 +420,9 @@ static int mvgbe_init(struct eth_device *dev) { struct mvgbe_device *dmvgbe = to_mvgbe(dev); struct mvgbe_registers *regs = dmvgbe->regs; -#if (defined (CONFIG_MII) || defined (CONFIG_CMD_MII)) \ - && defined (CONFIG_SYS_FAULT_ECHO_LINK_DOWN) +#if (defined(CONFIG_MII) || defined(CONFIG_CMD_MII)) && \ + !defined(CONFIG_PHYLIB) && \ + defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN) int i; #endif /* setup RX rings */