USB-CDC: Added debug output to ether.c
PATCH 1/1 USB-CDC: Added debug output to ether.c
Use DEBUG as usual to print debug output.
--- drivers/usb/gadget/ether.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/usb/gadget/ether.c +4 -0
@@ -31,7 +31,11 @@#include "gadget_chips.h" #define USB_NET_NAME "usb0" +#ifdef DEBUG +#define dprintf printf +#else #define dprintf (x, ...) +#endif #undef INFO #define INFO(x, s...) printf(s) #define dev_err(x, stuff...) printf(stuff)
Signature · 1 line
1.6.3.3
PATCH 1/1 USB-CDC: Added debug output to ether.c
Dear Stefano Babic,
Quoted 3 lines · In message <[email protected]> you wrote:
Use DEBUG as usual to print debug output.
Signed-off-by Stefano Babic <[email protected]>
I guess these patches are some sort of series, and eventually have to be applied in a specific order? Please number such patch series, then.
In this case, please provide information about the sequence in which the patches should be applied....
Best regards,
Wolfgang Denk
Signature · 6 lines
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 It is undignified for a woman to play servant to a man who is not hers. -- Spock, "Amok Time", stardate 3372.7
PATCH 1/1 USB-CDC: Added debug output to ether.c
Quoted 2 lines · Wolfgang Denk
Dear Stefano Babic,
Hi Wolfgang,
Quoted 8 lines
Quoted 3 lines · In message <[email protected]> you wrote:
Use DEBUG as usual to print debug output.
Signed-off-by Stefano Babic <[email protected]>I guess these patches are some sort of series, and eventually have to be applied in a specific order? Please number such patch series, then.
Well, because the patches are not correlated among them and they fix different issues, I thought it should be better to send them as single patches. However, I admit it is to me easier to send them as patch series, as git format-patch does the job for me.
If no one complains, I will resubmit the next version as patch series.
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== 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 =====================================================================
PATCH 1/1 USB-CDC: Added debug output to ether.c
In reply to Stefano BabicDear Stefano Babic,
Quoted 13 lines
Use DEBUG as usual to print debug output.
Signed-off-by Stefano Babic <[email protected]>--- drivers/usb/gadget/ether.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)drivers/usb/gadget/ether.c +0
-0@@ -31,7 +31,11 @@#include "gadget_chips.h"
drivers/usb/gadget/ether.c line 41
Quoted 10 lines
drivers/usb/gadget/ether.c +4
-0#define USB_NET_NAME "usb0" +#ifdef DEBUG +#define dprintf printf +#else #define dprintf (x, ...) +#endif #undef INFO #define INFO(x, s...) printf(s) #define dev_err(x, stuff...) printf(stuff)
Why not use the globally defined debug() [include/common.h, line 119] macro for that?
Reinhard
PATCH 1/1 USB-CDC: Added debug output to ether.c
Quoted 1 line · Reinhard Meyer
Dear Stefano Babic,
Hi Reinhard,
Quoted 2 lines
Why not use the globally defined
debug()[include/common.h, line 119] macro for that?
Probably the only reason is I was too lazy to fix it globally....
Rather there is a lot of files / drivers that implement their own set of debug functions, mainly because they were ported from Linux where we have other mechanisms.
I agree with you and I will post a patch to fix the debug issue globally.
Stefano
Signature · 5 lines
===================================================================== 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 =====================================================================