Skip to contentSkip to conversation

dm: ppc: Rename CONFIG_SYS_CPU in BC3450 board

PATCH New Marek Vasut 2 participants 3 messages Jul 27, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm: ppc: Rename CONFIG_SYS_CPU in BC3450 board

This caused namespace clash with same macro defined in include/config.h:

cmd_bc3450.c:55:0: warning: "CONFIG_SYS_CPU" redefined [enabled by default] In file included from /tmp/u-boot-marex/include/command.h:30:0,

                 from /tmp/u-boot-marex/include/image.h:49,
                 from /tmp/u-boot-marex/include/common.h:117,
                 from cmd_bc3450.c:27:

/tmp/u-boot-marex/include/config.h:3:0: note: this is the location of the previous definition

---
 board/bc3450/cmd_bc3450.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
board/bc3450/cmd_bc3450.c +4 -4
index a9e4902..b1f24ce 100644
@@ -52,9 +52,9 @@
 #define THERM_WRITE_TL		0x02
 #define THERM_WRITE_TH		0x01
 
-#define CONFIG_SYS_CPU			2
-#define CONFIG_SYS_1SHOT		1
-#define CONFIG_SYS_STANDALONE		0
+#define DS1620_CFG_CPU			2
+#define DS1620_CFG_1SHOT		1
+#define DS1620_CFG_STANDALONE		0
 
 struct therm {
 	int hi;
@@ -513,7 +513,7 @@ static int cmd_temp (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 			therm.hi <<= 1;
 			therm.lo <<= 1;
 			ds1620_write_state (&therm);
-			ds1620_out (THERM_WRITE_CONFIG, 8, CONFIG_SYS_STANDALONE);
+			ds1620_out (THERM_WRITE_CONFIG, 8, DS1620_CFG_STANDALONE);
 			return 0;
 		}
 	}
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 dm: ppc: Rename CONFIG_SYS_CPU in BC3450 board

Dear Marek Vasut,

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

This caused namespace clash with same macro defined in include/config.h:

cmd_bc3450.c:55:0: warning: "CONFIG_SYS_CPU" redefined [enabled by default]

This patch does not apply any more. Please review.

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
Do not underestimate the value of print statements for debugging.
Don't have aesthetic convulsions when using them, either.
#2 lore raw

PATCH 1/1 dm: ppc: Rename CONFIG_SYS_CPU in BC3450 board

Dear Wolfgang Denk,

Quoted 9 lines

Dear Marek Vasut,

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

This caused namespace clash with same macro defined in include/config.h:

cmd_bc3450.c:55:0: warning: "CONFIG_SYS_CPU" redefined [enabled by default]

This patch does not apply any more. Please review.

Ah, Detlev fixed it, good maintainer he is :-)

Anyway, I think my patch might be better (it preserves the defined bits). Besides, I was working on the -next branch which this patch didn't hit yet, so I didn't notice.

Whichever way you want to fix this is ok, probably discard this patch as noone cares in the end anyway.

Quoted 3 lines

Best regards,

Wolfgang Denk

Best regards,
Marek Vasut