Linux Input/HID development
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Jiri Kosina <trivial@kernel.org>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use
Date: Tue, 26 Oct 2010 16:25:31 -0700	[thread overview]
Message-ID: <1288135531.4145.59.camel@Joe-Laptop> (raw)
In-Reply-To: <20101026155028.GA13097@core.coreip.homeip.net>

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)

> >  
> > @@ -1268,7 +1262,7 @@ static void __init i8042_register_ports(void)
> >  
> >  	for (i = 0; i < I8042_NUM_PORTS; i++) {
> >  		if (i8042_ports[i].serio) {
> > -			printk(KERN_INFO "serio: %s at %#lx,%#lx irq %d\n",
> > +			pr_info("%s at %#lx,%#lx irq %d\n",
> >  				i8042_ports[i].serio->name,
> >  				(unsigned long) I8042_DATA_REG,
> >  				(unsigned long) I8042_COMMAND_REG,
> 
> Not quite equivalent conversion, right now every port is registered with
> message "serio: XXX at YYY". I would be OK with having driver prefix
> going in front but I'd like to keep word serio in (like "i8042: serio
> XXX at YYY").

I'll resubmit a pr_<level> series for drivers/input/serio
today/tomorrow with this change.

cheers, Joe


  reply	other threads:[~2010-10-26 23:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-26  2:44 [PATCH 00/10] Remove multiple uses of KERN_<level> Joe Perches
2010-10-26  2:44 ` [PATCH 03/10] drivers/hid/hid-input.c: Remove KERN_DEBUG from dbg_hid use Joe Perches
2010-11-03 14:13   ` Jiri Kosina
2010-10-26  2:44 ` [PATCH 05/10] drivers/input/mouse/appletouch.c: Remove KERN_DEBUG use from dprintk Joe Perches
2010-10-26 15:52   ` Dmitry Torokhov
2010-10-26  2:44 ` [PATCH 06/10] drivers/input/serio/i8042: Use pr_<level>, pr_fmt. Fix dbg and __FILE__ use Joe Perches
2010-10-26 15:50   ` Dmitry Torokhov
2010-10-26 23:25     ` Joe Perches [this message]
2010-10-27  0:40       ` Dmitry Torokhov
2010-10-27  0:46         ` Joe Perches
2010-10-27  1:00           ` Dmitry Torokhov
2010-10-27  1:10             ` Joe Perches
2010-10-27  1:28               ` Dmitry Torokhov
2010-10-27  1:35                 ` Joe Perches
2010-10-27  3:00                   ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288135531.4145.59.camel@Joe-Laptop \
    --to=joe@perches.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox