On Fri, 2013-11-15 at 13:36 -0500, Alan Stern wrote:
> On Fri, 15 Nov 2013 oli...@neukum.org wrote:
> 
> > From: Oliver Neukum <oneu...@suse.de>
> > 
> > To allow a full switch to dynamic debugging make the
> > debug parameter conditional on defined(DEBUF) || 
> > defined(CONFIG_DYNAMIC_DEBUG)
> > 
> > Signed-off-by: Oliver Neukum <oneu...@suse.de>
> 
> > @@ -868,14 +870,14 @@ static int __init uhci_hcd_init(void)
> >                     ignore_oc ? ", overcurrent ignored" : "");
> >     set_bit(USB_UHCI_LOADED, &usb_hcds_loaded);
> >  
> > -   if (DEBUG_CONFIGURED) {
> > -           errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL);
> > -           if (!errbuf)
> > -                   goto errbuf_failed;
> > -           uhci_debugfs_root = debugfs_create_dir("uhci", usb_debug_root);
> > -           if (!uhci_debugfs_root)
> > -                   goto debug_failed;
> > -   }
> > +#if defined(DEBUG) || defined(CONFIG_DYNAMIC_DEBUG)
> > +   errbuf = kmalloc(ERRBUF_LEN, GFP_KERNEL);
> > +   if (!errbuf)
> > +           goto errbuf_failed;
> > +#endif
> > +   uhci_debugfs_root = debugfs_create_dir("uhci", usb_debug_root);
> > +   if (!uhci_debugfs_root)
> > +           goto debug_failed;
> 
> You might as well keep uhci_debugfs_root inside the conditional code.  
> If debugging isn't enabled, it won't be used for anything.

Makes sense. Fixed.

        Regards
                Oliver



--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to