Skip to contentSkip to conversation

drivers/pcmcia/soc_common.c: Use printf extension %pV

PATCH New Joe Perches 1 participant 1 message Nov 10, 2010 Pcmcia

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/pcmcia/soc_common.c: Use printf extension %pV

Using %pV reduces the number of printk calls and
eliminates any possible message interleaving from
other printk calls.

---
 drivers/pcmcia/soc_common.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
drivers/pcmcia/soc_common.c +7 -2
index 689e3c0..3753fd0 100644
@@ -57,11 +57,16 @@ module_param(pc_debug, int, 0644);
 void soc_pcmcia_debug(struct soc_pcmcia_socket *skt, const char *func,
 		      int lvl, const char *fmt, ...)
 {
+	struct va_format vaf;
 	va_list args;
 	if (pc_debug > lvl) {
-		printk(KERN_DEBUG "skt%u: %s: ", skt->nr, func);
 		va_start(args, fmt);
-		vprintk(fmt, args);
+
+		vaf.fmt = fmt;
+		vaf.va = &args;
+
+		printk(KERN_DEBUG "skt%u: %s: %pV", skt->nr, func, &vaf);
+
 		va_end(args);
 	}
 }