Hello Matt,

On Tue, 14 Apr 2015 14:07:17 -0400, Matt Porter <mpor...@konsulko.com>
wrote:
> common/image.c currently implicitly depends on CONFIG_NR_DRAM_BANKS
> when CONFIG_ARM is enabled. Make this requirement explicit.
> 
> Signed-off-by: Matt Porter <mpor...@konsulko.com>
> ---
>  common/image.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/image.c b/common/image.c
> index 162b682..73c24f5 100644
> --- a/common/image.c
> +++ b/common/image.c
> @@ -461,7 +461,7 @@ phys_size_t getenv_bootm_size(void)
>               tmp = 0;
>  
>  
> -#if defined(CONFIG_ARM)
> +#if defined(CONFIG_ARM) && defined(CONFIG_NR_DRAM_BANKS)
>       return gd->bd->bi_dram[0].size - tmp;
>  #else
>       return gd->bd->bi_memsize - tmp;
> -- 
> 2.1.0

I am not entirely fond of a symbol's existence conditioning some code
which does not actually use the symbol. I do understand the dependency
here -- that bi_dram[0] is meaningful only if CONFIG_NR_DRAM_BANKS is 1
or more -- but then, why does this code not depend on the value of the
symbol? Makes me think the patch is not complete and the code should be
fixed to depend on the value of CONFIG_NR_DRAM_BANKS.

Amicalement,
-- 
Albert.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to