Thread (23 messages) 23 messages, 3 authors, 2016-09-25

Re: [PATCH 4/4] Input-gameport: Replace some printk() calls by pr_info() in joydump_connect()

flat view

From: Joe Perches <joe@perches.com>
Date: 2016-09-24 16:13:39
Also in: linux-input, lkml

On Sat, 2016-09-24 at 15:50 +0200, SF Markus Elfring wrote:
* Prefer usage of the macro "pr_info" over the interface "printk"
  in this function.
* Reduce number of output function calls.
Did you test this?  I doubt it.
quoted hunk ↗ jump to hunk
diff --git a/drivers/input/joystick/joydump.c b/drivers/input/joystick/joydump.c
[]
quoted hunk ↗ jump to hunk
@@ -57,27 +57,29 @@ static int joydump_connect(struct gameport *gameport, struct gameport_driver *dr
quoted
 	unsigned long flags;
 	unsigned char u;
 
quoted
-	printk(KERN_INFO "joydump: ,------------------ START ----------------.\n");
-	printk(KERN_INFO "joydump: | Dumping: %30s |\n", gameport->phys);
-	printk(KERN_INFO "joydump: | Speed: %28d kHz |\n", gameport->speed);
+	pr_info(",------------------ START ----------------.\n"
+		"| Dumping: %30s |\n"
+		"| Speed: %28d kHz |\n",
+		gameport->phys,
+		gameport->speed);
Not the same output.

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help