Vitaly Kuzmichev wrote:
> Hi Stefano,
>

Hi Vitaly,

> Stefano Babic wrote:
>> If you want to remember how to set the debug output, it should be enough
>> to add a comments with "to enable the debugging, define DEBUG before
>> common.h" or something like that. I vote to remove only the two lines...
> 
> Would not it be better to make one of the following?
> 1)
> #if 0
> #define DEBUG
> #endif

However, this is seen as dead code. As this one, my preferance is to set
only a comment (I see several files in u-boot with such a comment, for
example arch/arm/lib/board.c).

> 
> 2)
> #ifdef CONFIG_USB_ETH_DEBUG
> #define DEBUG
> #endif

It is ok, but it generates another new CONFIG_ switch, that is unusable
for the rest of u-boot. I agree that in u-boot there is a lot of
different and local functions to setup, and probably a general mechanism
should be better defined. However, setting "#define DEBUG" before any
include files is quite usual. I do not like to set a CONFIG_ switch only
for debug purpose, as in the delivered system all debug output should be
turned off.

Best regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: off...@denx.de
=====================================================================
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to