[U-Boot] [PATCH] USB-CDC: Added debug output to ether.c

Use DEBUG as usual to print debug output.
Signed-off-by: Stefano Babic sbabic@denx.de --- drivers/usb/gadget/ether.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 3d871fa..e0ebf75 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -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)

Dear Stefano Babic,
In message 1281562797-6408-1-git-send-email-sbabic@denx.de you wrote:
Use DEBUG as usual to print debug output.
Signed-off-by: Stefano Babic sbabic@denx.de
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

Wolfgang Denk wrote:
Dear Stefano Babic,
Hi Wolfgang,
In message 1281562797-6408-1-git-send-email-sbabic@denx.de you wrote:
Use DEBUG as usual to print debug output.
Signed-off-by: Stefano Babic sbabic@denx.de
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

Dear Stefano Babic,
Use DEBUG as usual to print debug output.
Signed-off-by: Stefano Babic sbabic@denx.de
drivers/usb/gadget/ether.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index 3d871fa..e0ebf75 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c @@ -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)
Why not use the globally defined debug() [include/common.h, line 119] macro for that?
Reinhard

Reinhard Meyer wrote:
Dear Stefano Babic,
Hi Reinhard,
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
participants (3)
-
Reinhard Meyer
-
Stefano Babic
-
Wolfgang Denk