From patchwork Mon Feb 28 09:27:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 84754 X-Patchwork-Delegate: monstr@monstr.eu 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 374E9B7130 for ; Mon, 28 Feb 2011 20:28:03 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0BEFB280A5; Mon, 28 Feb 2011 10:27:42 +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 6EzLx-kQxeUK; Mon, 28 Feb 2011 10:27:41 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E87B4280A6; Mon, 28 Feb 2011 10:27:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1315B280A0 for ; Mon, 28 Feb 2011 10:27:30 +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 jSbMMlbsmjYx for ; Mon, 28 Feb 2011 10:27:28 +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-bw0-f44.google.com (mail-bw0-f44.google.com [209.85.214.44]) by theia.denx.de (Postfix) with ESMTPS id 7ECA628081 for ; Mon, 28 Feb 2011 10:27:21 +0100 (CET) Received: by mail-bw0-f44.google.com with SMTP id 13so3579075bwz.3 for ; Mon, 28 Feb 2011 01:27:21 -0800 (PST) Received: by 10.204.26.150 with SMTP id e22mr1536819bkc.96.1298885241159; Mon, 28 Feb 2011 01:27:21 -0800 (PST) Received: from localhost ([178.23.216.97]) by mx.google.com with ESMTPS id a17sm2370099bku.11.2011.02.28.01.27.19 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 28 Feb 2011 01:27:20 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de Date: Mon, 28 Feb 2011 10:27:09 +0100 Message-Id: <1298885229-26247-4-git-send-email-monstr@monstr.eu> X-Mailer: git-send-email 1.5.5.1 In-Reply-To: <1298885229-26247-3-git-send-email-monstr@monstr.eu> References: <1298885229-26247-1-git-send-email-monstr@monstr.eu> <1298885229-26247-2-git-send-email-monstr@monstr.eu> <1298885229-26247-3-git-send-email-monstr@monstr.eu> Subject: [U-Boot] [PATCH] microblaze: Fix no return statement from microblaze-generic board 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 Remove compilation warning for systems without network support. Warning log: microblaze-generic.c: In function 'board_eth_init': microblaze-generic.c:82: warning: no return statement in function returning non-void Signed-off-by: Michal Simek --- .../xilinx/microblaze-generic/microblaze-generic.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c index 183e4dc..5c07fdb 100644 --- a/board/xilinx/microblaze-generic/microblaze-generic.c +++ b/board/xilinx/microblaze-generic/microblaze-generic.c @@ -71,12 +71,10 @@ int fsl_init2 (void) { int board_eth_init(bd_t *bis) { - /* - * This board either has PCI NICs or uses the CPU's TSECs - * pci_eth_init() will return 0 if no NICs found, so in that case - * returning -1 will force cpu_eth_init() to be called. - */ + int ret = 0; + #ifdef CONFIG_XILINX_EMACLITE - return xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR); + ret |= xilinx_emaclite_initialize(bis, XILINX_EMACLITE_BASEADDR); #endif + return ret; }