Re: ehci dynamic debug problem

From: Johannes Stezenbach
Date: Mon Apr 16 2012 - 15:08:02 EST


On Mon, Apr 16, 2012 at 01:15:46PM -0400, Jason Baron wrote:
> On Mon, Apr 16, 2012 at 06:41:39PM +0200, Johannes Stezenbach wrote:
> > On Mon, Apr 16, 2012 at 11:54:24AM -0400, Jason Baron wrote:
> > > On Fri, Apr 13, 2012 at 09:03:11PM +0200, Johannes Stezenbach wrote:
> > > >
> > > > Does dynamic debug offer an "is the message two lines below enabled" test?
> > > >
> > >
> > > Sorry was away for a bit...
> > >
> > > dynamic debug doesn't offer any is enabled test, its hidden from the
> > > user. That said, in this case, you can delay the printing to the buffer
> > > with:
> > ...
> > > + ehci_dbg (ehci, "%s\n", dbg_port_buf (_buf, sizeof _buf, label, port, status)); \
> >
> > I think arguments are evaluated before dev_dbg is called so this
> > won't help.
>
> I looked at the disassembly - and this argument was in fact *not* evaluated
> before the call. So I think this approach is worthwhile.

OK, I was in a hurry before but now that I looked at
dynamic_dev_dbg() definition in include/linux/dynamic_debug.h
I see that it works. IMHO it's a good solution.


Thank you,
Johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/