From patchwork Thu Nov 17 19:50:01 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 126304 X-Patchwork-Delegate: sr@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 9CC24B71CD for ; Fri, 18 Nov 2011 07:07:06 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F3CA728A73; Thu, 17 Nov 2011 21:07:04 +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 G9XPstlP-Tt7; Thu, 17 Nov 2011 21:07:04 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3FC5028A77; Thu, 17 Nov 2011 21:07:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8CAC228A77 for ; Thu, 17 Nov 2011 21:07:00 +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 e1CA3h7oCYnw for ; Thu, 17 Nov 2011 21:07:00 +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-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by theia.denx.de (Postfix) with ESMTP id 1A27128A73 for ; Thu, 17 Nov 2011 21:06:58 +0100 (CET) Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 343BF1802D47; Thu, 17 Nov 2011 20:52:33 +0100 (CET) X-Auth-Info: TDQK8Byksvh4o+Dg8gZKlwEZ6XE9j64ajQw4ldrG9cM= Received: from diddl.denx.de (host-80-81-18-216.customer.m-online.net [80.81.18.216]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA id A15981C00123; Thu, 17 Nov 2011 20:50:07 +0100 (CET) Received: from gemini.denx.de (gemini.denx.de [10.0.0.2]) by diddl.denx.de (Postfix) with ESMTP id 71FBA1A2611; Thu, 17 Nov 2011 20:50:07 +0100 (CET) Received: by gemini.denx.de (Postfix, from userid 500) id 4A42016F76E5; Thu, 17 Nov 2011 20:50:07 +0100 (CET) From: Wolfgang Denk To: u-boot@lists.denx.de Date: Thu, 17 Nov 2011 20:50:01 +0100 Message-Id: <1321559401-26495-3-git-send-email-wd@denx.de> X-Mailer: git-send-email 1.7.6.4 In-Reply-To: <1321559401-26495-1-git-send-email-wd@denx.de> References: <1321559401-26495-1-git-send-email-wd@denx.de> Cc: Stefan Roese Subject: [U-Boot] [PATCH 3/3] board/amcc/taihu/flash.c: Fix GCC 4.6 build warnings 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 Fix: flash.c: In function 'flash_erase_1': flash.c:514:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable] flash.c: In function 'flash_erase_2': flash.c:956:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk Cc: Stefan Roese Acked-by: Stefan Roese --- total: 0 errors, 0 warnings, 46 lines checked NOTE: Ignored message types: COMPLEX_MACRO CONSIDER_KSTRTO MINMAX MULTISTATEMENT_MACRO_USE_DO_WHILE 0003-board-amcc-taihu-flash.c-Fix-GCC-4.6-build-warnings.patch has no obvious style problems and is ready for submission. board/amcc/taihu/flash.c | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/board/amcc/taihu/flash.c b/board/amcc/taihu/flash.c index e9fbbb1..63968a4 100644 --- a/board/amcc/taihu/flash.c +++ b/board/amcc/taihu/flash.c @@ -511,7 +511,7 @@ int flash_erase(flash_info_t * info, int s_first, int s_last) { volatile CONFIG_SYS_FLASH_WORD_SIZE *addr = (CONFIG_SYS_FLASH_WORD_SIZE *) (info->start[0]); volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2; - int flag, prot, sect, l_sect; + int flag, prot, sect; int i; if ((s_first < 0) || (s_first > s_last)) { @@ -542,8 +542,6 @@ int flash_erase(flash_info_t * info, int s_first, int s_last) printf("\n"); } - l_sect = -1; - /* Disable interrupts which might cause a timeout here */ flag = disable_interrupts(); @@ -569,7 +567,6 @@ int flash_erase(flash_info_t * info, int s_first, int s_last) addr[CONFIG_SYS_FLASH_ADDR1] = (CONFIG_SYS_FLASH_WORD_SIZE) 0x00550055; addr2[0] = (CONFIG_SYS_FLASH_WORD_SIZE) 0x00300030; /* sector erase */ } - l_sect = sect; /* * Wait for each sector to complete, it's more * reliable. According to AMD Spec, you must @@ -953,7 +950,7 @@ static int flash_erase_2(flash_info_t * info, int s_first, int s_last) { volatile CONFIG_SYS_FLASH_WORD_SIZE *addr = (CONFIG_SYS_FLASH_WORD_SIZE *) (info->start[0]); volatile CONFIG_SYS_FLASH_WORD_SIZE *addr2; - int flag, prot, sect, l_sect; + int flag, prot, sect; int i; if ((s_first < 0) || (s_first > s_last)) { @@ -984,8 +981,6 @@ static int flash_erase_2(flash_info_t * info, int s_first, int s_last) printf("\n"); } - l_sect = -1; - /* Disable interrupts which might cause a timeout here */ flag = disable_interrupts(); @@ -1011,7 +1006,6 @@ static int flash_erase_2(flash_info_t * info, int s_first, int s_last) addr[CONFIG_SYS_FLASH_CHAR_ADDR1] = (CONFIG_SYS_FLASH_WORD_SIZE) 0x55555555; addr2[0] = (CONFIG_SYS_FLASH_WORD_SIZE) 0x30303030; /* sector erase */ } - l_sect = sect; /* * Wait for each sector to complete, it's more * reliable. According to AMD Spec, you must