Skip to contentSkip to conversation

mkconfig: include board config.h before asm/config.h

PATCH New Kim Phillips 2 participants 5 messages Feb 18, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mkconfig: include board config.h before asm/config.h

swapping the include order suppresses warnings for board configs that define their own CONFIG_MAX_MEM_MAPPED:

In file included from /home/r1aaha/git/u-boot/include/config.h:5,

                from /home/r1aaha/git/u-boot/include/common.h:35,
                from simpc8313.c:26:
/home/r1aaha/git/u-boot/include/configs/SIMPC8313.h:81:1: warning:
"CONFIG_MAX_MEM_MAPPED" redefined
In file included from /home/r1aaha/git/u-boot/include/config.h:4,
                from /home/r1aaha/git/u-boot/include/common.h:35,
                from simpc8313.c:26:

/home/r1aaha/git/u-boot/include/asm/config.h:28:1: warning: this is the location of the previous definition

---
 mkconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
mkconfig +1 -1
index b6b0a80..b0bbbd1 100755
@@ -82,7 +82,7 @@ else
 	> config.h		# Create new config file
 fi
 echo "/* Automatically generated - do not edit */" >>config.h
-echo "#include <asm/config.h>" >>config.h
 echo "#include <configs/$1.h>" >>config.h
+echo "#include <asm/config.h>" >>config.h
 
 exit 0
Signature · 1 line
1.6.1.3
#1 lore raw

PATCH 1/1 mkconfig: include board config.h before asm/config.h

Dear Kim Phillips,

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

swapping the include order suppresses warnings for board configs that define their own CONFIG_MAX_MEM_MAPPED:

...

mkconfig else · line 86

Quoted 4 lines

echo "/* Automatically generated - do not edit */" >>config.h

mkconfig +1 -1
-echo "#include <asm/config.h>" >>config.h
 echo "#include <configs/$1.h>" >>config.h
+echo "#include <asm/config.h>" >>config.h

That's a pretty big hammer that affects ALL boards.

Are you absolutely sure it has no negative side effects?

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
Life is a game. Money is how we keep score.              - Ted Turner
#2 lore raw

PATCH 1/1 mkconfig: include board config.h before asm/config.h

Quoted 6 lines · On Wed, 18 Feb 2009 23:15:52 +0100 Wolfgang Denk <[email protected]> wrote:

Dear Kim Phillips,

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

swapping the include order suppresses warnings for board configs that define their own CONFIG_MAX_MEM_MAPPED:

...

Quoted 8 lines

mkconfig else · line 86

Quoted 4 lines

echo "/* Automatically generated - do not edit */" >>config.h

mkconfig +1 -1
-echo "#include <asm/config.h>" >>config.h
 echo "#include <configs/$1.h>" >>config.h
+echo "#include <asm/config.h>" >>config.h

That's a pretty big hammer that affects ALL boards.

Are you absolutely sure it has no negative side effects?

unfortunately I don't have a supercomputer over here, so I can't be 100% sure. I did however check samples from 4xx, 83xx, 85xx, and 86xx
- due to recent relevant chatter wrt those platforms.

The alternative is to search for a better home for CONFIG_MAX_MEM_MAPPED's default definition.

Kim

#3 lore raw

PATCH 1/1 mkconfig: include board config.h before asm/config.h

Dear Kim Phillips,

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

mkconfig else · line 86

Quoted 4 lines
mkconfig +1 -1
-echo "#include <asm/config.h>" >>config.h
 echo "#include <configs/$1.h>" >>config.h
+echo "#include <asm/config.h>" >>config.h

That's a pretty big hammer that affects ALL boards.

Quoted 5 lines
Quoted 1 line

Are you absolutely sure it has no negative side effects?

unfortunately I don't have a supercomputer over here, so I can't be 100% sure. I did however check samples from 4xx, 83xx, 85xx, and 86xx
- due to recent relevant chatter wrt those platforms.

Well, I needed some time to realize that the

echo "#include <asm/config.h>" >>config.h

part is actually pretty new anyway - coming from commit 47d41cc3 less than two weeks ago. So your patch is indeed harmless.

Quoted 2 lines

The alternative is to search for a better home for CONFIG_MAX_MEM_MAPPED's default definition.

For now I will apply your patch. Thanks.

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
You can observe a lot just by watchin'.                  - Yogi Berra
#4 lore raw

PATCH 1/1 mkconfig: include board config.h before asm/config.h

In reply to Kim Phillips

Dear Kim Phillips,

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

swapping the include order suppresses warnings for board configs that define their own CONFIG_MAX_MEM_MAPPED:

In file included from /home/r1aaha/git/u-boot/include/config.h:5,

                from /home/r1aaha/git/u-boot/include/common.h:35,
                from simpc8313.c:26:
/home/r1aaha/git/u-boot/include/configs/SIMPC8313.h:81:1: warning:
"CONFIG_MAX_MEM_MAPPED" redefined
In file included from /home/r1aaha/git/u-boot/include/config.h:4,
                from /home/r1aaha/git/u-boot/include/common.h:35,
                from simpc8313.c:26:
Quoted 7 lines

/home/r1aaha/git/u-boot/include/asm/config.h:28:1: warning: this is the location of the previous definition

---
 mkconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 9 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
I've been programming for (35-9=) 24 years myself,  and  I  find  the
best way to learn a new language is to *read* every example snippet I
can find, with a reference book close by. Eventually, the *rhythm* of
the language starts pounding in my head... and my fluency is close at
hand. That's how I learned Perl, and now I'm one of the drummers. :-)
         -- Randal L. Schwartz in <[email protected]>