From patchwork Tue May 17 11:51:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 95925 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 B7805B6EE9 for ; Tue, 17 May 2011 21:51:49 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 60C7B2809B; Tue, 17 May 2011 13:51: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 BYRIHWSpXdzx; Tue, 17 May 2011 13:51:44 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B16832808B; Tue, 17 May 2011 13:51:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 53A102808B for ; Tue, 17 May 2011 13:51:40 +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 5Y7pQc5+Lbz9 for ; Tue, 17 May 2011 13:51: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 smtpi3.ngi.it (smtpi3.ngi.it [88.149.128.33]) by theia.denx.de (Postfix) with ESMTP id 05BA728089 for ; Tue, 17 May 2011 13:51:34 +0200 (CEST) Received: from paperina.lan (unknown [88.149.182.160]) by smtpi3.ngi.it (Postfix) with ESMTP id 4C94F318491; Tue, 17 May 2011 13:51:28 +0200 (CEST) Received: from papero.lan (papero.lan [192.168.2.105]) by paperina.lan (Postfix) with ESMTP id DD71F140A01E; Tue, 17 May 2011 13:51:27 +0200 (CEST) From: Stefano Babic To: u-boot@lists.denx.de Date: Tue, 17 May 2011 13:51:20 +0200 Message-Id: <1305633080-30772-1-git-send-email-sbabic@denx.de> X-Mailer: git-send-email 1.7.1 Cc: Fabio Estevam Subject: [U-Boot] [PATCH V2] MX31: Make get_reset_cause() static and drop unreachable code 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 get_reset_cause() should not be exported. Drop code in the function after return statement that can generate warnings due to unreachable code. Signed-off-by: Stefano Babic Signed-off-by: Fabio Estevam --- arch/arm/cpu/arm1136/mx31/generic.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/arm1136/mx31/generic.c b/arch/arm/cpu/arm1136/mx31/generic.c index fccd2cd..4ebf38d 100644 --- a/arch/arm/cpu/arm1136/mx31/generic.c +++ b/arch/arm/cpu/arm1136/mx31/generic.c @@ -133,7 +133,7 @@ u32 get_cpu_rev(void) return srev | 0x8000; } -char *get_reset_cause(void) +static char *get_reset_cause(void) { /* read RCSR register from CCM module */ struct clock_control_regs *ccm = @@ -144,16 +144,12 @@ char *get_reset_cause(void) switch (cause) { case 0x0000: return "POR"; - break; case 0x0001: return "RST"; - break; case 0x0002: return "WDOG"; - break; case 0x0006: return "JTAG"; - break; default: return "unknown reset"; }