lkml.org 
[lkml]   [2010]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use
Date
On Tuesday, October 26, 2010 04:25:31 pm Joe Perches wrote:
> On Tue, 2010-10-26 at 08:50 -0700, Dmitry Torokhov wrote:
> > Hi Joe,
>
> Hi Dmitry.
>
> > On Mon, Oct 25, 2010 at 07:44:24PM -0700, Joe Perches wrote:
> > > Standardized message logging prefixes.
> > > Removed \n from dbg macro, added \n to each dbg call site.
> >
> > Did you test it? It looks for call like:
> > > + dbg("%02x <- i8042 (flush, %s)\n",
> > > + data, str & I8042_STR_AUXDATA ? "aux" : "kbd");
> >
> > the result will be:
> > printk(KERN_DEBUG "i8042: %02x <- i8042 (flush, %s)\n [%d]", ...)
> > which is not exactly what you want...
>
> Right. My mistake.
> I compile tested only and didn't notice the badly formed string.
>
> Mind if I move the time to the front like this?
>
> +#define dbg(format, arg...) \
> +do { \
> + if (i8042_debug) \
> + printk(KERN_DEBUG KBUILD_MODNAME ": [%d]" format), \
> + (int)(jiffies - i8042_start_time), ##arg); \
> +} while (0)

Another option would be to leave '\n' in dbg() and leave most of the
callers as is.

Thanks.

--
Dmitry


\
 
 \ /
  Last update: 2010-10-27 02:43    [W:0.093 / U:0.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site