public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/6] image: fix build when CONFIG_NR_DRAM_BANKS is disabled on ARM
Date: Thu, 16 Apr 2015 15:52:16 +0200	[thread overview]
Message-ID: <20150416155216.25c3b515@lilith> (raw)
In-Reply-To: <1429034842-5260-2-git-send-email-mporter@konsulko.com>

Hello Matt,

On Tue, 14 Apr 2015 14:07:17 -0400, Matt Porter <mporter@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 <mporter@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.

  reply	other threads:[~2015-04-16 13:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14 18:07 [U-Boot] [PATCH 0/6] Add ARMv7M STM32F1 and STM3210E-EVAL board support Matt Porter
2015-04-14 18:07 ` [U-Boot] [PATCH 1/6] image: fix build when CONFIG_NR_DRAM_BANKS is disabled on ARM Matt Porter
2015-04-16 13:52   ` Albert ARIBAUD [this message]
2015-04-16 14:53     ` Tom Rini
2015-04-14 18:07 ` [U-Boot] [PATCH 2/6] common/cmd_boot: keep ARM v7M in thumb mode during do_go_exec() Matt Porter
2015-04-15 10:33   ` Kamil Lulko
2015-04-15 12:34     ` Tom Rini
2015-04-15 14:26       ` Matt Porter
2015-04-16 13:53   ` Albert ARIBAUD
2015-04-16 15:02     ` Tom Rini
2015-04-14 18:07 ` [U-Boot] [PATCH 3/6] ARMv7M: add STM32F1 support Matt Porter
2015-04-14 18:07 ` [U-Boot] [PATCH 4/6] gpio: stm32: add stm32f1 support Matt Porter
2015-04-14 18:07 ` [U-Boot] [PATCH 5/6] serial: " Matt Porter
2015-04-14 18:07 ` [U-Boot] [PATCH 6/6] board: add stm3210e-eval board support Matt Porter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150416155216.25c3b515@lilith \
    --to=albert.u.boot@aribaud.net \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox