From patchwork Thu Nov 17 19:50:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfgang Denk X-Patchwork-Id: 126306 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 F2004B71CD for ; Fri, 18 Nov 2011 07:07:28 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1823C28AB1; Thu, 17 Nov 2011 21:07:25 +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 xClju9nlEdLU; Thu, 17 Nov 2011 21:07:24 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CE72128ABF; Thu, 17 Nov 2011 21:07:18 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7587A28A82 for ; Thu, 17 Nov 2011 21:07:12 +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 mMMJ-+3Jvu2D for ; Thu, 17 Nov 2011 21:07:10 +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.9]) by theia.denx.de (Postfix) with ESMTP id 052EE28A8B for ; Thu, 17 Nov 2011 21:07:04 +0100 (CET) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id AD4751C02FA7; Thu, 17 Nov 2011 20:50:07 +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 9B8831C000BF; 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 634481A2505; Thu, 17 Nov 2011 20:50:07 +0100 (CET) Received: by gemini.denx.de (Postfix, from userid 500) id 42D0116F76E4; 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:00 +0100 Message-Id: <1321559401-26495-2-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 2/3] board/amcc/yucca/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:425:24: warning: variable 'l_sect' set but not used [-Wunused-but-set-variable] flash.c: In function 'flash_erase_2': flash.c:834: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 0002-board-amcc-yucca-flash.c-Fix-GCC-4.6-build-warnings.patch has no obvious style problems and is ready for submission. board/amcc/yucca/flash.c | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/board/amcc/yucca/flash.c b/board/amcc/yucca/flash.c index 20b6af9..ab513f9 100644 --- a/board/amcc/yucca/flash.c +++ b/board/amcc/yucca/flash.c @@ -422,7 +422,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)) { @@ -449,8 +449,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(); @@ -476,7 +474,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 @@ -831,7 +828,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)) { @@ -858,8 +855,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(); @@ -885,7 +880,6 @@ static int flash_erase_2(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