All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx board header files
@ 2008-01-09 16:16 Timur Tabi
  2008-01-11  3:30 ` Kim Phillips
  0 siblings, 1 reply; 8+ messages in thread
From: Timur Tabi @ 2008-01-09 16:16 UTC (permalink / raw)
  To: u-boot

Remove the "#undef DEBUG" line from all Freescale 83xx board header files.
The inclusion of this line makes it impossible to enable debug code in
other source files, because "#define DEBUG" typically needs to be defined
before any header files are included.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 include/configs/MPC8323ERDB.h |    2 --
 include/configs/MPC832XEMDS.h |    2 --
 include/configs/MPC8349EMDS.h |    2 --
 include/configs/MPC8360EMDS.h |    2 --
 include/configs/MPC837XEMDS.h |    2 --
 5 files changed, 0 insertions(+), 10 deletions(-)

diff --git a/include/configs/MPC8323ERDB.h b/include/configs/MPC8323ERDB.h
index 564de02..1dd1cfa 100644
--- a/include/configs/MPC8323ERDB.h
+++ b/include/configs/MPC8323ERDB.h
@@ -9,8 +9,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#undef DEBUG
-
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/MPC832XEMDS.h b/include/configs/MPC832XEMDS.h
index a48b311..88a3ed3 100644
--- a/include/configs/MPC832XEMDS.h
+++ b/include/configs/MPC832XEMDS.h
@@ -20,8 +20,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#undef DEBUG
-
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h
index 03409bb..b8c3153 100644
--- a/include/configs/MPC8349EMDS.h
+++ b/include/configs/MPC8349EMDS.h
@@ -29,8 +29,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#undef DEBUG
-
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/MPC8360EMDS.h b/include/configs/MPC8360EMDS.h
index fedb8a9..edd6673 100644
--- a/include/configs/MPC8360EMDS.h
+++ b/include/configs/MPC8360EMDS.h
@@ -22,8 +22,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#undef DEBUG
-
 /*
  * High Level Configuration Options
  */
diff --git a/include/configs/MPC837XEMDS.h b/include/configs/MPC837XEMDS.h
index 0958e6b..e3595c7 100644
--- a/include/configs/MPC837XEMDS.h
+++ b/include/configs/MPC837XEMDS.h
@@ -21,8 +21,6 @@
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
-#undef DEBUG
-
 /*
  * High Level Configuration Options
  */
-- 
1.5.2.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx board header files
  2008-01-09 16:16 [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx board header files Timur Tabi
@ 2008-01-11  3:30 ` Kim Phillips
  2008-01-11  3:34   ` [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx boardheader files Liu Dave
  2008-01-11 15:06   ` [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx board header files Timur Tabi
  0 siblings, 2 replies; 8+ messages in thread
From: Kim Phillips @ 2008-01-11  3:30 UTC (permalink / raw)
  To: u-boot

On Wed,  9 Jan 2008 10:16:32 -0600
Timur Tabi <timur@freescale.com> wrote:

> Remove the "#undef DEBUG" line from all Freescale 83xx board header files.
> The inclusion of this line makes it impossible to enable debug code in
> other source files, because "#define DEBUG" typically needs to be defined
> before any header files are included.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
>  include/configs/MPC8323ERDB.h |    2 --
>  include/configs/MPC832XEMDS.h |    2 --
>  include/configs/MPC8349EMDS.h |    2 --
>  include/configs/MPC8360EMDS.h |    2 --
>  include/configs/MPC837XEMDS.h |    2 --
>  5 files changed, 0 insertions(+), 10 deletions(-)

hmm..what about the rest of the boards that do this?:

include/configs/AP1000.h:#undef DEBUG
include/configs/BAB7xx.h:#undef  DEBUG
include/configs/EB+MCF-EV123.h:#undef DEBUG
include/configs/ELPPC.h:#undef  DEBUG
include/configs/IPHASE4539.h:#undef DEBUG                               /* General debug */
include/configs/M5235EVB.h:#undef DEBUG
include/configs/M5271EVB.h:#undef DEBUG
include/configs/M5329EVB.h:#undef DEBUG
include/configs/M54455EVB.h:#undef DEBUG
include/configs/MPC8360ERDK.h:#undef DEBUG
include/configs/MPC8540EVAL.h:#undef DEBUG
include/configs/MVBLUE.h:#undef DEBUG
include/configs/QS823.h:#undef DEBUG                            /* debug output code */
include/configs/QS850.h:#undef DEBUG                            /* debug output code */
include/configs/QS860T.h:#undef DEBUG                           /* debug output code */
include/configs/Rattler.h:#undef DEBUG
include/configs/ads5121.h:#undef DEBUG
include/configs/assabet.h:#undef DEBUG
include/configs/ep8248.h:#undef DEBUG
include/configs/ep82xxm.h:#undef DEBUG
include/configs/gw8260.h:#undef DEBUG                  /* General debug */
include/configs/mpc7448hpc2.h:#undef DEBUG
include/configs/ms7722se.h:#undef DEBUG
include/configs/ms7750se.h:#undef DEBUG
include/configs/sacsng.h:#undef DEBUG                 /* General debug */
include/configs/sbc8260.h:#undef DEBUG                /* General debug */
include/configs/sbc8349.h:#undef DEBUG

Kim

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx boardheader files
  2008-01-11  3:30 ` Kim Phillips
@ 2008-01-11  3:34   ` Liu Dave
  2008-01-11 15:05     ` Timur Tabi
  2008-01-11 19:32     ` Wolfgang Denk
  2008-01-11 15:06   ` [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx board header files Timur Tabi
  1 sibling, 2 replies; 8+ messages in thread
From: Liu Dave @ 2008-01-11  3:34 UTC (permalink / raw)
  To: u-boot

I suggest keep the debug option - #undef DEBUG.

Sometimes, if we need debug, it is easy to open the debug mode
with the switch.

Thanks
Dave 

> -----Original Message-----
> From: u-boot-users-bounces at lists.sourceforge.net 
> [mailto:u-boot-users-bounces at lists.sourceforge.net] On Behalf 
> Of Phillips Kim
> Sent: 2008?1?11? 11:30 AM
> To: Tabi Timur
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [U-Boot-Users] [PATCH] Remove #undef DEBUG from 
> MPC83xx boardheader files
> 
> On Wed,  9 Jan 2008 10:16:32 -0600
> Timur Tabi <timur@freescale.com> wrote:
> 
> > Remove the "#undef DEBUG" line from all Freescale 83xx 
> board header files.
> > The inclusion of this line makes it impossible to enable 
> debug code in
> > other source files, because "#define DEBUG" typically needs 
> to be defined
> > before any header files are included.
> > 
> > Signed-off-by: Timur Tabi <timur@freescale.com>
> > ---
> >  include/configs/MPC8323ERDB.h |    2 --
> >  include/configs/MPC832XEMDS.h |    2 --
> >  include/configs/MPC8349EMDS.h |    2 --
> >  include/configs/MPC8360EMDS.h |    2 --
> >  include/configs/MPC837XEMDS.h |    2 --
> >  5 files changed, 0 insertions(+), 10 deletions(-)
> 
> hmm..what about the rest of the boards that do this?:
> 
> include/configs/AP1000.h:#undef DEBUG
> include/configs/BAB7xx.h:#undef  DEBUG
> include/configs/EB+MCF-EV123.h:#undef DEBUG
> include/configs/ELPPC.h:#undef  DEBUG
> include/configs/IPHASE4539.h:#undef DEBUG                     
>           /* General debug */
> include/configs/M5235EVB.h:#undef DEBUG
> include/configs/M5271EVB.h:#undef DEBUG
> include/configs/M5329EVB.h:#undef DEBUG
> include/configs/M54455EVB.h:#undef DEBUG
> include/configs/MPC8360ERDK.h:#undef DEBUG
> include/configs/MPC8540EVAL.h:#undef DEBUG
> include/configs/MVBLUE.h:#undef DEBUG
> include/configs/QS823.h:#undef DEBUG                          
>   /* debug output code */
> include/configs/QS850.h:#undef DEBUG                          
>   /* debug output code */
> include/configs/QS860T.h:#undef DEBUG                         
>   /* debug output code */
> include/configs/Rattler.h:#undef DEBUG
> include/configs/ads5121.h:#undef DEBUG
> include/configs/assabet.h:#undef DEBUG
> include/configs/ep8248.h:#undef DEBUG
> include/configs/ep82xxm.h:#undef DEBUG
> include/configs/gw8260.h:#undef DEBUG                  /* 
> General debug */
> include/configs/mpc7448hpc2.h:#undef DEBUG
> include/configs/ms7722se.h:#undef DEBUG
> include/configs/ms7750se.h:#undef DEBUG
> include/configs/sacsng.h:#undef DEBUG                 /* 
> General debug */
> include/configs/sbc8260.h:#undef DEBUG                /* 
> General debug */
> include/configs/sbc8349.h:#undef DEBUG
> 
> Kim
> 
> --------------------------------------------------------------
> -----------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.n
> et/marketplace
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx boardheader files
  2008-01-11  3:34   ` [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx boardheader files Liu Dave
@ 2008-01-11 15:05     ` Timur Tabi
  2008-01-12  2:06       ` Liu Dave
  2008-01-11 19:32     ` Wolfgang Denk
  1 sibling, 1 reply; 8+ messages in thread
From: Timur Tabi @ 2008-01-11 15:05 UTC (permalink / raw)
  To: u-boot

Liu Dave wrote:
> I suggest keep the debug option - #undef DEBUG.
> 
> Sometimes, if we need debug, it is easy to open the debug mode
> with the switch.

I don't see how.  The "#undef DEBUG" will override any #define DEBUG or -DDEBUG 
that you specify.  The "#undef DEBUG" makes it impossible to use the debug() 
call or anything else like it.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx board header files
  2008-01-11  3:30 ` Kim Phillips
  2008-01-11  3:34   ` [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx boardheader files Liu Dave
@ 2008-01-11 15:06   ` Timur Tabi
  1 sibling, 0 replies; 8+ messages in thread
From: Timur Tabi @ 2008-01-11 15:06 UTC (permalink / raw)
  To: u-boot

Kim Phillips wrote:

> hmm..what about the rest of the boards that do this?:

Well, the 8360ERDK files weren't there when I submitted this patch.  As for th 
rest, well, they're not Freescale files.

-- 
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx boardheader files
  2008-01-11  3:34   ` [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx boardheader files Liu Dave
  2008-01-11 15:05     ` Timur Tabi
@ 2008-01-11 19:32     ` Wolfgang Denk
  2008-01-12  2:16       ` [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xxboardheader files Liu Dave
  1 sibling, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2008-01-11 19:32 UTC (permalink / raw)
  To: u-boot

In message <58A20A281BAF1047B4EAE68DE5C0BDC2C0E189@zch01exm21.fsl.freescale.net> you wrote:
> I suggest keep the debug option - #undef DEBUG.

DEBUG is not defined by default, so this statement is redundant at
best, harmful in some cases (when you try to enable debug globally).

> Sometimes, if we need debug, it is easy to open the debug mode
> with the switch.

But you don't need the #undef DEBUG for that.

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
"Don't try to outweird me, three-eyes. I get stranger things than you
free with my breakfast cereal."
           - Zaphod Beeblebrox in  "Hitchhiker's Guide to the Galaxy"

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx boardheader files
  2008-01-11 15:05     ` Timur Tabi
@ 2008-01-12  2:06       ` Liu Dave
  0 siblings, 0 replies; 8+ messages in thread
From: Liu Dave @ 2008-01-12  2:06 UTC (permalink / raw)
  To: u-boot

> I don't see how.  The "#undef DEBUG" will override any 
> #define DEBUG or -DDEBUG 
> that you specify.  The "#undef DEBUG" makes it impossible to 
> use the debug() 
> call or anything else like it.

Yes, the DEBUG is global, sometime it is my need.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xxboardheader files
  2008-01-11 19:32     ` Wolfgang Denk
@ 2008-01-12  2:16       ` Liu Dave
  0 siblings, 0 replies; 8+ messages in thread
From: Liu Dave @ 2008-01-12  2:16 UTC (permalink / raw)
  To: u-boot

> > I suggest keep the debug option - #undef DEBUG.
> 
> DEBUG is not defined by default, so this statement is redundant at
> best, harmful in some cases (when you try to enable debug globally).
> 
> > Sometimes, if we need debug, it is easy to open the debug mode
> > with the switch.
> 
> But you don't need the #undef DEBUG for that.
> 

Ok. Let us remove them. 

Regards,
Dave

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-01-12  2:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-09 16:16 [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx board header files Timur Tabi
2008-01-11  3:30 ` Kim Phillips
2008-01-11  3:34   ` [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx boardheader files Liu Dave
2008-01-11 15:05     ` Timur Tabi
2008-01-12  2:06       ` Liu Dave
2008-01-11 19:32     ` Wolfgang Denk
2008-01-12  2:16       ` [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xxboardheader files Liu Dave
2008-01-11 15:06   ` [U-Boot-Users] [PATCH] Remove #undef DEBUG from MPC83xx board header files Timur Tabi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.