Skip to contentSkip to conversation

env: don't set to default env twice when use CONFIG_ENV_IS_NOWHERE

PATCH New Lei Wen 3 participants 5 messages Oct 9, 2010 – Oct 12, 2010

lore
Share & tools
lore

Lei Wen

author
#0 lore raw

PATCH 1/1 env: don't set to default env twice when use CONFIG_ENV_IS_NOWHERE

When use the CONFIG_ENV_IS_NOWHERE, I met such issue:
Using default environment

*** Warning - bad CRC, using default environment

---
 common/env_common.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
common/env_common.c +0 -1
index 88f068c..10131c7 100644
@@ -238,7 +238,6 @@ void env_relocate (void)
 #else
 		show_boot_progress (-60);
 #endif
-		set_default_env("!bad CRC");
 	} else {
 		env_relocate_spec ();
 	}
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 env: don't set to default env twice when use CONFIG_ENV_IS_NOWHERE

Dear Lei Wen,

Quoted 15 lines · In message <[email protected]> you wrote:

When use the CONFIG_ENV_IS_NOWHERE, I met such issue:
Using default environment

*** Warning - bad CRC, using default environment

---
 common/env_common.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
common/env_common.c +0 -0
index 88f068c..10131c7 100644

common/env_common.c void env_relocate (void) · line 243

Quoted 7 lines
common/env_common.c +0 -1
@@ -238,7 +238,6 @@ void env_relocate (void)
 #else
 		show_boot_progress (-60);
 #endif
-		set_default_env("!bad CRC");
 	} else {
 		env_relocate_spec ();
 	}

NAK.

This fix is wrong, as it removes the call to set_default_env() also in the cases where it's needed. Instead, please move down the "#endif" after this line.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
This is now.  Later is later.
#2 lore raw

PATCH 1/1 env: don't set to default env twice when use CONFIG_ENV_IS_NOWHERE

Thanks, I would post another. :-p

Lei

Quoted 42 lines · Wolfgang Denk

Dear Lei Wen,

Quoted 15 lines · In message <[email protected]> you wrote:

When use the CONFIG_ENV_IS_NOWHERE, I met such issue:
Using default environment

*** Warning - bad CRC, using default environment

---
?common/env_common.c | ? ?1 -
?1 files changed, 0 insertions(+), 1 deletions(-)

common/env_common.c +0 -0
index 88f068c..10131c7 100644
@@ -238,7 +238,6 @@ void env_relocate (void)
Quoted 7 lines

?#else
? ? ? ? ? ? ? show_boot_progress (-60);
?#endif
- ? ? ? ? ? ? set_default_env("!bad CRC");
? ? ? } else {
? ? ? ? ? ? ? env_relocate_spec ();
? ? ? }

NAK.

This fix is wrong, as it removes the call to set_default_env() also in the cases where it's needed. Instead, please move down the "#endif" after this line.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, ? ? MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de This is now. ?Later is later.

author
#3 lore raw

PATCH 1/1 env: don't set to default env twice when use CONFIG_ENV_IS_NOWHERE

In reply to Wolfgang Denk

When use the CONFIG_ENV_IS_NOWHERE, I met such issue:

DRAM: 256 MiB
Using default environment

*** Warning - bad CRC, using default environment

---
V2: don't move the warning when environment is not vaild

 common/env_common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/env_common.c +1 -1
index 88f068c..5acda4d 100644
@@ -237,8 +237,8 @@ void env_relocate (void)
 		set_default_env(NULL);
 #else
 		show_boot_progress (-60);
-#endif
 		set_default_env("!bad CRC");
+#endif
 	} else {
 		env_relocate_spec ();
 	}
Signature · 1 line
1.7.0.4
#4 lore raw

PATCH 1/1 env: don't set to default env twice when use CONFIG_ENV_IS_NOWHERE

Dear Lei Wen,

Quoted 5 lines · In message <[email protected]> you wrote:

When use the CONFIG_ENV_IS_NOWHERE, I met such issue:

DRAM: 256 MiB
Using default environment

Quoted 8 lines

*** Warning - bad CRC, using default environment

---
V2: don't move the warning when environment is not vaild

 common/env_common.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Business is like a wheelbarrow. Nothing ever happens until you  start
pushing.