[U-Boot] [PATCH v2 3/8] USB-CDC: Use native debug printout macros

Stefano Babic sbabic at denx.de
Fri Aug 13 15:30:38 CEST 2010


Vitaly Kuzmichev wrote:
> Hi,
> 
> Rogan Dawes wrote:
>>> +#define DEBUG
>>> +#undef DEBUG
>>> +
>> Eh?
> 
> Such thing is used to let someone know that this driver supports debug
> output through native U-Boot macros. So one need to comment #undef to
> compile ether.c with debug messages.
> There are at least 67 files in U-Boot that use such construction.

Well, but probably it is better to remove both lines. In the rest of
u-boot, DEBUG is neither set or unset - you see only #ifdef DEBUG or
#ifndef DEBUG. You have found the examples how we should not do...

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...

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: office at denx.de
=====================================================================


More information about the U-Boot mailing list