lkml.org 
[lkml]   [2013]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] xhci:prevent "callbacks suppressed" when debug is not enabled
On Fri, Aug 16, 2013 at 10:30:00AM -0700, Sarah Sharp wrote:
> On Fri, Aug 16, 2013 at 10:26:35AM -0700, Sarah Sharp wrote:
> > On Thu, Aug 15, 2013 at 05:17:16PM -0700, Greg KH wrote:
> > > On Thu, Aug 15, 2013 at 07:04:55PM +0300, Dmitry Kasatkin wrote:
> > > > When debug is not enabled and dev_dbg() will expand to nothing,
> > > > log might be flooded with "callbacks suppressed". If it was not
> > > > done on purpose, better to use dev_dbg_ratelimited() instead.
> > > >
> > > > Signed-off-by: Dmitry Kasatkin <d.kasatkin@samsung.com>
> > > > ---
> > > > drivers/usb/host/xhci-ring.c | 6 ++----
> > > > 1 file changed, 2 insertions(+), 4 deletions(-)
> > >
> > >
> > > Sarah, does this patch conflict with the trace debug patches being
> > > worked on? I'll hold off on applying it for now, let me know if it's ok
> > > or not.
> >
> > It doesn't conflict with the trace debug patches, because those only
> > effect debugging with xhci_dbg with the host device, not dev_dbg with
> > the USB device. This should apply fine to usb-next.
>
> At another glance, the patch removes two if blocks, but doesn't
> re-indent the rest of the lines:
>
> > @@ -3060,8 +3060,7 @@ int xhci_queue_intr_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
> > * to set the polling interval (once the API is added).
> > */
> > if (xhci_interval != ep_interval) {
> > - if (printk_ratelimit())
> > - dev_dbg(&urb->dev->dev, "Driver uses different interval"
> > + dev_dbg_ratelimited(&urb->dev->dev, "Driver uses different interval"
> > " (%d microframe%s) than xHCI "
> > "(%d microframe%s)\n",
> > ep_interval,
>
> That should probably be fixed.

Good catch, the string should also be fixed while the lines are being
touched, to not be split across multiple lines.

Dmitry, can you make that change and resubmit?

thanks,

greg k-h


\
 
 \ /
  Last update: 2013-08-16 20:01    [W:0.089 / U:0.792 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site