From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 4 Feb 2009 23:30:40 +0100 Subject: [U-Boot] [PATCH 5/9] ARM: remove unused variable In-Reply-To: References: <20090204213309.GB3924@game.jcrosoft.org> Message-ID: <20090204223040.GA31498@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 23:20 Wed 04 Feb , Guennadi Liakhovetski wrote: > On Wed, 4 Feb 2009, Jean-Christophe PLAGNIOL-VILLARD wrote: > > > On 17:59 Wed 04 Feb , Guennadi Liakhovetski wrote: > > > The "size" variable in start_armboot() in lib_arm/board.c is only really > > > used in > > > #if !defined(CONFIG_SYS_NO_FLASH) > > > case, remove where unused. > > > > > why not remove it > > in the CONFIG_SYS_NO_FLASH you can not use it at all > why not do this Best Regards, J. --- diff --git a/lib_arm/board.c b/lib_arm/board.c index 2358beb..9afd15f 100644 --- a/lib_arm/board.c +++ b/lib_arm/board.c @@ -275,9 +275,6 @@ void start_armboot (void) { init_fnc_t **init_fnc_ptr; char *s; -#if !defined(CONFIG_SYS_NO_FLASH) || defined (CONFIG_VFD) || defined(CONFIG_LCD) - ulong size; -#endif #if defined(CONFIG_VFD) || defined(CONFIG_LCD) unsigned long addr; #endif @@ -303,8 +300,7 @@ void start_armboot (void) #ifndef CONFIG_SYS_NO_FLASH /* configure available FLASH banks */ - size = flash_init (); - display_flash_config (size); + display_flash_config (flash_init ()); #endif /* CONFIG_SYS_NO_FLASH */ #ifdef CONFIG_VFD @@ -316,7 +312,7 @@ void start_armboot (void) */ /* bss_end is defined in the board-specific linker script */ addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); - size = vfd_setmem (addr); + vfd_setmem (addr); gd->fb_base = addr; #endif /* CONFIG_VFD */ @@ -331,7 +327,7 @@ void start_armboot (void) */ /* bss_end is defined in the board-specific linker script */ addr = (_bss_end + (PAGE_SIZE - 1)) & ~(PAGE_SIZE - 1); - size = lcd_setmem (addr); + lcd_setmem (addr); gd->fb_base = addr; } #endif /* CONFIG_LCD */