From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: Greg KH <greg@kroah.com>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [01/03] USB: add CONFIG_USB_DEBUG_MESSAGES and usb_dbg()
Date: Sat, 9 Aug 2008 17:04:43 +0200 [thread overview]
Message-ID: <20080809150439.GA5408@joi> (raw)
In-Reply-To: <20080809013917.GB10910@kroah.com>
On Fri, Aug 08, 2008 at 06:39:17PM -0700, Greg KH wrote:
> --- a/drivers/usb/core/usb.h
> +++ b/drivers/usb/core/usb.h
> @@ -132,6 +132,28 @@ static inline int is_active(const struct
> /* for labeling diagnostics */
> extern const char *usbcore_name;
>
> +/* USB debugging */
> +/* if debug is on or not for the USB core */
> +extern int usb_debug;
> +
> +#if defined(CONFIG_USB_DEBUG_MESSAGES)
> +/* macro for debugging */
> +#define usb_dbg(dev, format, arg...) \
> + ({ \
> + if (usb_debug) \
maybe unlikely here?
> + dev_printk(KERN_DEBUG , dev , format , ## arg); \
> + 0; \
> + })
> +#else
> +#define usb_dbg(dev, format, arg...) \
> + ({ \
> + if (0) \
> + dev_printk(KERN_DEBUG , dev , format , ## arg); \
> + 0; \
> + })
> +#endif
> +
> +
> /* sysfs stuff */
> extern struct attribute_group *usb_device_groups[];
> extern struct attribute_group *usb_interface_groups[];
next prev parent reply other threads:[~2008-08-09 15:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-09 1:38 [00/03] [RFC] USB debugging rework Greg KH
2008-08-09 1:39 ` [01/03] USB: add CONFIG_USB_DEBUG_MESSAGES and usb_dbg() Greg KH
2008-08-09 1:39 ` [02/03] USB: convert the USB core code to use usb_dbg() Greg KH
2008-08-09 1:40 ` [03/03] USB: remove CONFIG_USB_DEBUG Greg KH
2008-08-09 15:04 ` Marcin Slusarz [this message]
2008-08-10 3:36 ` [01/03] USB: add CONFIG_USB_DEBUG_MESSAGES and usb_dbg() Greg KH
2008-08-09 22:04 ` [00/03] [RFC] USB debugging rework Pete Zaitcev
2008-08-10 3:35 ` Greg KH
2008-08-09 22:57 ` Frans Pop
2008-08-09 23:36 ` Felipe Balbi
2008-08-09 23:44 ` Felipe Balbi
2008-08-10 1:38 ` Greg KH
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=20080809150439.GA5408@joi \
--to=marcin.slusarz@gmail.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/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