This is a note to let you know that I've just added the patch titled USB: musb: make DBG() calls actually depend on CONFIG_USB_MUSB_DEBUG to my gregkh-2.6 tree which can be found in directory form at: http://www.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/patches/ and in git form at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/patches.git The filename of this patch is: usb-musb-make-dbg-calls-actually-depend-on-config_usb_musb_debug.patch The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) If this patch meets the merge guidelines for a bugfix, it should be merged into Linus's tree before the next major kernel release. If not, it will be merged into Linus's tree during the next merge window. Either way, you will probably be copied on the patch when it gets sent to Linus for merging so that others can see what is happening in kernel development. If you have any questions about this process, please let me know. >From balbi@xxxxxx Tue Oct 5 13:28:24 2010 From: Felipe Balbi <balbi@xxxxxx> To: Greg KH <greg@xxxxxxxxx> Cc: Linux USB Mailing List <linux-usb@xxxxxxxxxxxxxxx>, Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>, Felipe Balbi <balbi@xxxxxx> Subject: USB: musb: make DBG() calls actually depend on CONFIG_USB_MUSB_DEBUG Date: Fri, 24 Sep 2010 13:44:02 +0300 Message-Id: <1285325055-1247-2-git-send-email-balbi@xxxxxx> From: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx> Enabling CONFIG_USB_MUSB_DEBUG option causes -DDEBUG to be added to gcc's command line, however the DBG() macro doesn't depend on DEBUG, so that the debugging messages get printed regardless of the option, and I don't think that this was intended. Get rid of otherwise unused xprintk() macro and make DBG() macro directly call pr_debug() which only results in the actual code generated if DEBUG is defined. This change makes musb_hdrc.o ~30% less in size with CONFIG_USB_MUSB_DEBUG disabled (in host mode). Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx> Signed-off-by: Felipe Balbi <balbi@xxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx> --- drivers/usb/musb/musb_debug.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) --- a/drivers/usb/musb/musb_debug.h +++ b/drivers/usb/musb/musb_debug.h @@ -42,11 +42,10 @@ #define INFO(fmt, args...) yprintk(KERN_INFO, fmt, ## args) #define ERR(fmt, args...) yprintk(KERN_ERR, fmt, ## args) -#define xprintk(level, facility, format, args...) do { \ - if (_dbg_level(level)) { \ - printk(facility "%s %d: " format , \ - __func__, __LINE__ , ## args); \ - } } while (0) +#define DBG(level, format, args...) do { \ + if (_dbg_level(level)) \ + pr_debug("%s %d: " format, __func__, __LINE__, ## args); \ + } while (0) extern unsigned musb_debug; @@ -55,8 +54,6 @@ static inline int _dbg_level(unsigned l) return musb_debug >= l; } -#define DBG(level, fmt, args...) xprintk(level, KERN_DEBUG, fmt, ## args) - extern const char *otg_state_string(struct musb *); #ifdef CONFIG_DEBUG_FS -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html