Patchwork [U-Boot] dm: ppc: Rename CONFIG_SYS_CPU in BC3450 board

login
register
mail settings
Submitter Marek Vasut
Date July 27, 2012, 7:33 p.m.
Message ID <1343417623-30978-1-git-send-email-marex@denx.de>
Download mbox | patch
Permalink /patch/173767/
State Not Applicable
Delegated to: Detlev Zundel
Headers show

Comments

Marek Vasut - July 27, 2012, 7:33 p.m.
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

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
---
 board/bc3450/cmd_bc3450.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Wolfgang Denk - July 27, 2012, 7:46 p.m.
Dear Marek Vasut,

In message <1343417623-30978-1-git-send-email-marex@denx.de> 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
Marek Vasut - July 27, 2012, 8:07 p.m.
Dear Wolfgang Denk,

> Dear Marek Vasut,
> 
> In message <1343417623-30978-1-git-send-email-marex@denx.de> 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.

> Best regards,
> 
> Wolfgang Denk

Best regards,
Marek Vasut

Patch

diff --git a/board/bc3450/cmd_bc3450.c b/board/bc3450/cmd_bc3450.c
index a9e4902..b1f24ce 100644
--- a/board/bc3450/cmd_bc3450.c
+++ b/board/bc3450/cmd_bc3450.c
@@ -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;
 		}
 	}