All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/8] USB-CDC: Use native debug printout	macros
Date: Fri, 13 Aug 2010 16:33:41 +0200	[thread overview]
Message-ID: <4C6557C5.4000300@denx.de> (raw)
In-Reply-To: <4C654B30.9060106@mvista.com>

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

  parent reply	other threads:[~2010-08-13 14:33 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-12 12:44 [U-Boot] [PATCH 0/8] USB: gadget: fix porting bugs Vitaly Kuzmichev
2010-08-12 12:44 ` [U-Boot] [PATCH 1/8] USB-CDC: Restuct USB gadget Makefile Vitaly Kuzmichev
2010-08-13 19:34   ` Remy Bohmer
2010-08-12 12:44 ` [U-Boot] [PATCH 2/8] USB-CDC: Add lost 'qmult' definition Vitaly Kuzmichev
2010-08-13 19:36   ` Remy Bohmer
2010-08-12 12:44 ` [U-Boot] [PATCH 3/8] USB-CDC: Linux-like debug printout Vitaly Kuzmichev
2010-08-12 17:01   ` Sergei Shtylyov
2010-08-13 10:17     ` Vitaly Kuzmichev
2010-08-13 10:45       ` Sergei Shtylyov
2010-08-12 18:33   ` Remy Bohmer
2010-08-13  8:34     ` Vitaly Kuzmichev
2010-08-13  8:49       ` Remy Bohmer
2010-08-13 10:16         ` Wolfgang Denk
2010-08-13 11:20           ` Remy Bohmer
2010-08-13  8:55   ` Stefano Babic
2010-08-12 12:44 ` [U-Boot] [PATCH 4/8] USB-CDC: Correct freeing usb requests Vitaly Kuzmichev
2010-08-12 12:44 ` [U-Boot] [PATCH 5/8] USB-CDC: Replace 'strcpy' by 'strlcpy' Vitaly Kuzmichev
2010-08-12 12:44 ` [U-Boot] [PATCH 6/8] USB-CDC: Correct stat_req initialization Vitaly Kuzmichev
2010-08-12 12:44 ` [U-Boot] [PATCH 7/8] USB: gadget: ethernet error path potential oops fix Vitaly Kuzmichev
2010-08-12 17:11   ` Sergei Shtylyov
2010-08-12 12:44 ` [U-Boot] [PATCH 8/8] USB: gadget: change simple_strtol to simple_strtoul Vitaly Kuzmichev
2010-08-12 18:37 ` [U-Boot] [PATCH 0/8] USB: gadget: fix porting bugs Remy Bohmer
2010-08-12 21:36   ` stefano babic
2010-08-13  8:50   ` Vitaly Kuzmichev
2010-08-13  8:59     ` Stefano Babic
2010-08-13 12:57 ` [U-Boot] [PATCH v2 3/8] USB-CDC: Use native debug printout macros Vitaly Kuzmichev
2010-08-13 13:03   ` Rogan Dawes
2010-08-13 13:12     ` Vitaly Kuzmichev
2010-08-13 13:21       ` Vitaly Kuzmichev
2010-08-13 13:30       ` Stefano Babic
2010-08-13 13:40         ` Vitaly Kuzmichev
2010-08-13 13:50           ` Rogan Dawes
2010-08-13 14:09           ` Wolfgang Denk
2010-08-13 14:33           ` Stefano Babic [this message]
2010-08-13 20:56             ` Wolfgang Denk
2010-08-13 14:08       ` Wolfgang Denk
2010-08-13 14:38       ` Sergei Shtylyov
2010-08-13 20:57         ` Wolfgang Denk
2010-08-13 14:06   ` Wolfgang Denk
2010-08-13 19:51   ` Remy Bohmer
2010-08-13 21:00     ` Wolfgang Denk
2010-08-13 21:09       ` Remy Bohmer
2010-08-13 13:00 ` [U-Boot] [PATCH v2 4/8] USB-CDC: Correct freeing usb requests Vitaly Kuzmichev
2010-08-13 20:11   ` Remy Bohmer
2010-08-13 13:00 ` [U-Boot] [PATCH v2 5/8] USB-CDC: Replace 'strcpy' by 'strlcpy' Vitaly Kuzmichev
2010-08-13 20:11   ` Remy Bohmer
2010-08-13 13:01 ` [U-Boot] [PATCH v2 6/8] USB-CDC: Correct stat_req initialization Vitaly Kuzmichev
2010-08-13 20:12   ` Remy Bohmer
2010-08-13 13:02 ` [U-Boot] [PATCH v2 7/8] USB-CDC: ethernet error path potential oops fix Vitaly Kuzmichev
2010-08-13 20:12   ` Remy Bohmer
2010-08-13 13:02 ` [U-Boot] [PATCH v2 8/8] USB-CDC: change simple_strtol to simple_strtoul Vitaly Kuzmichev
2010-08-13 20:12   ` Remy Bohmer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C6557C5.4000300@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.