From patchwork Sat Nov 19 11:59:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anatolij Gustschin X-Patchwork-Id: 126547 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 4857DB7231 for ; Sat, 19 Nov 2011 23:01:17 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 92998289A5; Sat, 19 Nov 2011 13:00:34 +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 BYKeM9+jsQ7j; Sat, 19 Nov 2011 13:00:34 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6CC66288D7; Sat, 19 Nov 2011 13:00:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DF17E28753 for ; Sat, 19 Nov 2011 12:59:24 +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 riPuOFoNKnuA for ; Sat, 19 Nov 2011 12:59:24 +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 742D22874E for ; Sat, 19 Nov 2011 12:59:23 +0100 (CET) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 5581D1C02EFE; Sat, 19 Nov 2011 12:59:23 +0100 (CET) X-Auth-Info: g2UYawYHrqif68pJCduCpkTQ6UUi7Q6X1jk5/QrFw4c= Received: from localhost (p4FC46DF7.dip.t-dialin.net [79.196.109.247]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA id 2A5A71C000A1; Sat, 19 Nov 2011 12:59:23 +0100 (CET) From: Anatolij Gustschin To: u-boot@lists.denx.de Date: Sat, 19 Nov 2011 12:59:15 +0100 Message-Id: <1321703956-4224-9-git-send-email-agust@denx.de> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1321703956-4224-1-git-send-email-agust@denx.de> References: <1321703956-4224-1-git-send-email-agust@denx.de> Subject: [U-Boot] [PATCH 8/9] ARM: cerf250: fix GCC 4.6 warings 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': flash.c:223:6: warning: variable 'flag' set but not used [-Wunused-but-set-variable] flash.c: In function 'write_data': flash.c:392:6: warning: variable 'flag' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin Acked-by: Simon Glass --- board/cerf250/flash.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/board/cerf250/flash.c b/board/cerf250/flash.c index e1e7807..bf8f0c9 100644 --- a/board/cerf250/flash.c +++ b/board/cerf250/flash.c @@ -220,7 +220,7 @@ static ulong flash_get_size (FPW *addr, flash_info_t *info) int flash_erase (flash_info_t *info, int s_first, int s_last) { - int flag, prot, sect; + int prot, sect; ulong type, start; int rcode = 0; @@ -255,7 +255,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last) } /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts (); + disable_interrupts(); /* Start erase on unprotected sectors */ for (sect = s_first; sect <= s_last; sect++) { @@ -389,7 +389,6 @@ static int write_data (flash_info_t *info, ulong dest, FPW data) { FPWV *addr = (FPWV *) dest; ulong status; - int flag; ulong start; /* Check if Flash is (sufficiently) erased */ @@ -398,7 +397,7 @@ static int write_data (flash_info_t *info, ulong dest, FPW data) return (2); } /* Disable interrupts which might cause a timeout here */ - flag = disable_interrupts (); + disable_interrupts(); *addr = (FPW) 0x00400040; /* write setup */ *addr = data;