From: Sergei Shtylyov <sshtylyov@mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/8] USB-CDC: Linux-like debug printout
Date: Thu, 12 Aug 2010 21:01:55 +0400 [thread overview]
Message-ID: <4C642903.3010307@mvista.com> (raw)
In-Reply-To: <1281617086-21220-4-git-send-email-vkuzmichev@mvista.com>
Hello.
Vitaly Kuzmichev wrote:
> Take debug printout macros back from linux-2.6.27 and make them more
> useful and more compatible.
> Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
> ---
> drivers/usb/gadget/ether.c | 65 +++++++++++++++++++++++---------------------
> 1 files changed, 34 insertions(+), 31 deletions(-)
> diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
> index a07738f..b6f5f4d 100644
> --- a/drivers/usb/gadget/ether.c
> +++ b/drivers/usb/gadget/ether.c
[...]
> @@ -769,7 +771,7 @@ set_ether_config (struct eth_dev *dev, gfp_t gfp_flags)
>
> result = usb_ep_enable (dev->status_ep, dev->status);
> if (result != 0) {
> - printf ("enable %s --> %d\n",
> + DEBUG (dev, "enable %s --> %d\n",
> dev->status_ep->name, result);
> goto done;
> }
> @@ -789,14 +791,14 @@ set_ether_config (struct eth_dev *dev, gfp_t gfp_flags)
> if (!cdc_active(dev)) {
> result = usb_ep_enable (dev->in_ep, dev->in);
> if (result != 0) {
> - printf ("enable %s --> %d\n",
> + DEBUG(dev, "enable %s --> %d\n",
Well, I think the coding style shouldbe consistent -- you either leave the
space before ( or remove it. And as U-Boot seems to follow the Linux coding
style now, it seems better to remove the space.
> @@ -941,17 +945,17 @@ static void eth_status_complete (struct usb_ep *ep, struct usb_request *req)
>
> req->length = STATUS_BYTECOUNT;
> value = usb_ep_queue (ep, req, GFP_ATOMIC);
> - dprintf ("send SPEED_CHANGE --> %d\n", value);
> + DEBUG (dev, "send SPEED_CHANGE --> %d\n", value);
> if (value == 0)
> return;
> } else if (value != -ECONNRESET) {
> - dprintf("event %02x --> %d\n",
> + DEBUG (dev, "event %02x --> %d\n",
Why add a space where there was none before?
> @@ -1298,7 +1301,7 @@ fail:
>
> static void tx_complete (struct usb_ep *ep, struct usb_request *req)
> {
> - dprintf("%s, status: %s\n", __func__,(req->status) ? "failed":"ok");
> + VDEBUG(ep->driver_data,
No cast here?
> "%s: status %s\n", __func__, (req->status)?"failed":"ok");
> packet_sent=1;
> }
WBR, Sergei
next prev parent reply other threads:[~2010-08-12 17:01 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 [this message]
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
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=4C642903.3010307@mvista.com \
--to=sshtylyov@mvista.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox