[U-Boot,1/4] fw_env: remove duplicated definitions
diff mbox series

Message ID 1566594199-25314-2-git-send-email-pjtexier@koncepto.io
State Superseded
Headers show
Series
  • env: fix build error for envtools
Related show

Commit Message

Pierre-Jean Texier Aug. 23, 2019, 9:03 p.m. UTC
Since commit d3716dd ("env: Rename the redundancy flags"), the
definitions of ENV_REDUND_OBSOLETE & ENV_REDUND_ACTIVE was moved
to env.h.

Fixes:

tools/env/fw_env.c:122:22: error: ‘ENV_REDUND_ACTIVE’ redeclared as different kind of symbol
 static unsigned char ENV_REDUND_ACTIVE = 1;
                      ^~~~~~~~~~~~~~~~~
In file included from tools/env/fw_env.c:13:
include/env.h:63:2: note: previous definition of ‘ENV_REDUND_ACTIVE’ was here
  ENV_REDUND_ACTIVE = 1,
  ^~~~~~~~~~~~~~~~~
tools/env/fw_env.c:127:22: error: ‘ENV_REDUND_OBSOLETE’ redeclared as different kind of symbol
 static unsigned char ENV_REDUND_OBSOLETE;
                      ^~~~~~~~~~~~~~~~~~~
In file included from tools/env/fw_env.c:13:
include/env.h:62:2: note: previous definition of ‘ENV_REDUND_OBSOLETE’ was here
  ENV_REDUND_OBSOLETE = 0,

Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
---
 tools/env/fw_env.c | 7 -------
 1 file changed, 7 deletions(-)

Comments

Joris Offouga Aug. 24, 2019, 8:50 a.m. UTC | #1
Hi Pierre-Jean

It's work on my side.

Tested-by Joris Offouga <offougajoris@gmail.com>

Best Regards,
Joris Offouga

Le ven. 23 août 2019 à 23:04, Pierre-Jean Texier <pjtexier@koncepto.io> a
écrit :

> Since commit d3716dd ("env: Rename the redundancy flags"), the
> definitions of ENV_REDUND_OBSOLETE & ENV_REDUND_ACTIVE was moved
> to env.h.
>
> Fixes:
>
> tools/env/fw_env.c:122:22: error: ‘ENV_REDUND_ACTIVE’ redeclared as
> different kind of symbol
>  static unsigned char ENV_REDUND_ACTIVE = 1;
>                       ^~~~~~~~~~~~~~~~~
> In file included from tools/env/fw_env.c:13:
> include/env.h:63:2: note: previous definition of ‘ENV_REDUND_ACTIVE’ was
> here
>   ENV_REDUND_ACTIVE = 1,
>   ^~~~~~~~~~~~~~~~~
> tools/env/fw_env.c:127:22: error: ‘ENV_REDUND_OBSOLETE’ redeclared as
> different kind of symbol
>  static unsigned char ENV_REDUND_OBSOLETE;
>                       ^~~~~~~~~~~~~~~~~~~
> In file included from tools/env/fw_env.c:13:
> include/env.h:62:2: note: previous definition of ‘ENV_REDUND_OBSOLETE’ was
> here
>   ENV_REDUND_OBSOLETE = 0,
>
> Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> ---
>  tools/env/fw_env.c | 7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
> index 95c9984..876bf2b 100644
> --- a/tools/env/fw_env.c
> +++ b/tools/env/fw_env.c
> @@ -119,13 +119,6 @@ static struct environment environment = {
>
>  static int have_redund_env;
>
> -static unsigned char ENV_REDUND_ACTIVE = 1;
> -/*
> - * ENV_REDUND_OBSOLETE must be 0 to efficiently set it on NOR flash
> without
> - * erasing
> - */
> -static unsigned char ENV_REDUND_OBSOLETE;
> -
>  #define DEFAULT_ENV_INSTANCE_STATIC
>  #include <env_default.h>
>
> --
> 2.7.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
>
Heiko Schocher Aug. 26, 2019, 6:56 a.m. UTC | #2
Hello Pierre-Jean,

Am 23.08.2019 um 23:03 schrieb Pierre-Jean Texier:
> Since commit d3716dd ("env: Rename the redundancy flags"), the
> definitions of ENV_REDUND_OBSOLETE & ENV_REDUND_ACTIVE was moved
> to env.h.
> 
> Fixes:
> 
> tools/env/fw_env.c:122:22: error: ‘ENV_REDUND_ACTIVE’ redeclared as different kind of symbol
>   static unsigned char ENV_REDUND_ACTIVE = 1;
>                        ^~~~~~~~~~~~~~~~~
> In file included from tools/env/fw_env.c:13:
> include/env.h:63:2: note: previous definition of ‘ENV_REDUND_ACTIVE’ was here
>    ENV_REDUND_ACTIVE = 1,
>    ^~~~~~~~~~~~~~~~~
> tools/env/fw_env.c:127:22: error: ‘ENV_REDUND_OBSOLETE’ redeclared as different kind of symbol
>   static unsigned char ENV_REDUND_OBSOLETE;
>                        ^~~~~~~~~~~~~~~~~~~
> In file included from tools/env/fw_env.c:13:
> include/env.h:62:2: note: previous definition of ‘ENV_REDUND_OBSOLETE’ was here
>    ENV_REDUND_OBSOLETE = 0,
> 
> Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>
> ---
>   tools/env/fw_env.c | 7 -------
>   1 file changed, 7 deletions(-)

See the same problem, thanks for the Fix!

Tested-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
Joe Hershberger Sept. 3, 2019, 10:35 p.m. UTC | #3
On Fri, Aug 23, 2019 at 4:04 PM Pierre-Jean Texier <pjtexier@koncepto.io> wrote:
>
> Since commit d3716dd ("env: Rename the redundancy flags"), the
> definitions of ENV_REDUND_OBSOLETE & ENV_REDUND_ACTIVE was moved
> to env.h.
>
> Fixes:
>
> tools/env/fw_env.c:122:22: error: ‘ENV_REDUND_ACTIVE’ redeclared as different kind of symbol
>  static unsigned char ENV_REDUND_ACTIVE = 1;
>                       ^~~~~~~~~~~~~~~~~
> In file included from tools/env/fw_env.c:13:
> include/env.h:63:2: note: previous definition of ‘ENV_REDUND_ACTIVE’ was here
>   ENV_REDUND_ACTIVE = 1,
>   ^~~~~~~~~~~~~~~~~
> tools/env/fw_env.c:127:22: error: ‘ENV_REDUND_OBSOLETE’ redeclared as different kind of symbol
>  static unsigned char ENV_REDUND_OBSOLETE;
>                       ^~~~~~~~~~~~~~~~~~~
> In file included from tools/env/fw_env.c:13:
> include/env.h:62:2: note: previous definition of ‘ENV_REDUND_OBSOLETE’ was here
>   ENV_REDUND_OBSOLETE = 0,
>
> Signed-off-by: Pierre-Jean Texier <pjtexier@koncepto.io>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Patch
diff mbox series

diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
index 95c9984..876bf2b 100644
--- a/tools/env/fw_env.c
+++ b/tools/env/fw_env.c
@@ -119,13 +119,6 @@  static struct environment environment = {
 
 static int have_redund_env;
 
-static unsigned char ENV_REDUND_ACTIVE = 1;
-/*
- * ENV_REDUND_OBSOLETE must be 0 to efficiently set it on NOR flash without
- * erasing
- */
-static unsigned char ENV_REDUND_OBSOLETE;
-
 #define DEFAULT_ENV_INSTANCE_STATIC
 #include <env_default.h>