All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] arm: fix CONFIG_DELAY_ENVIRONMENT to act like it claims in the README
@ 2013-01-22  0:22 Lucas Stach
  2013-01-22  0:33 ` Simon Glass
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2013-01-22  0:22 UTC (permalink / raw)
  To: u-boot

No one expects to end up in a delayed environment if
CONFIG_DELAY_ENVIRONMENT isn't defined.

Signed-off-by: Lucas Stach <dev@lynxeye.de>
---
 arch/arm/lib/board.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index cfe32cc..1a32611 100644
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
@@ -487,10 +487,12 @@ static char *failed = "*** failed ***\n";
  */
 static int should_load_env(void)
 {
+#ifdef CONFIG_DELAY_ENVIRONMENT
 #ifdef CONFIG_OF_CONTROL
 	return fdtdec_get_config_int(gd->fdt_blob, "load-environment", 0);
-#elif defined CONFIG_DELAY_ENVIRONMENT
+#else
 	return 0;
+#endif
 #else
 	return 1;
 #endif
-- 
1.8.0.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH] arm: fix CONFIG_DELAY_ENVIRONMENT to act like it claims in the README
  2013-01-22  0:22 [U-Boot] [PATCH] arm: fix CONFIG_DELAY_ENVIRONMENT to act like it claims in the README Lucas Stach
@ 2013-01-22  0:33 ` Simon Glass
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Glass @ 2013-01-22  0:33 UTC (permalink / raw)
  To: u-boot

Hi Lucas,

On Mon, Jan 21, 2013 at 4:22 PM, Lucas Stach <dev@lynxeye.de> wrote:
> No one expects to end up in a delayed environment if
> CONFIG_DELAY_ENVIRONMENT isn't defined.
>
> Signed-off-by: Lucas Stach <dev@lynxeye.de>
> ---
>  arch/arm/lib/board.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
> index cfe32cc..1a32611 100644
> --- a/arch/arm/lib/board.c
> +++ b/arch/arm/lib/board.c
> @@ -487,10 +487,12 @@ static char *failed = "*** failed ***\n";
>   */
>  static int should_load_env(void)
>  {
> +#ifdef CONFIG_DELAY_ENVIRONMENT
>  #ifdef CONFIG_OF_CONTROL
>         return fdtdec_get_config_int(gd->fdt_blob, "load-environment", 0);

The only problem with this as that now you have two separate controls.
Part of the intent with CONFIG_OF_CONTROL is to reduce the amount of
#ifdef'ing going on - how about just changing the default value here
to 1?

> -#elif defined CONFIG_DELAY_ENVIRONMENT
> +#else
>         return 0;
> +#endif
>  #else
>         return 1;
>  #endif
> --
> 1.8.0.2
>

Regards,
Simon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-22  0:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-22  0:22 [U-Boot] [PATCH] arm: fix CONFIG_DELAY_ENVIRONMENT to act like it claims in the README Lucas Stach
2013-01-22  0:33 ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.