
On 2010/08/13 3:40 PM, Vitaly Kuzmichev wrote:
Hi Stefano,
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?
#if 0 #define DEBUG #endif
#ifdef CONFIG_USB_ETH_DEBUG #define DEBUG #endif
Personally, I like option 2, as it means that I have less need to touch general code when trying to debug my board.
I can just define that in my board config. Although, that could lead to a proliferation of *_DEBUG defines, which may or may not be documented.
Perhaps without the CONFIG_ part, and people who are trying to debug their boards need to read the code anyway to determine what debugging can be enabled?
Rogan