Skip to contentSkip to conversation

Staging: media: lirc: lirc_serial: replaced printk with pr_debug

PATCH In review Abel Moyo 2 participants 2 messages Nov 21, 2014 – Nov 25, 2014

Subsystems (2)
lore
Share & tools
lore

Abel Moyo

author
#0 lore raw

PATCH 1/1 Staging: media: lirc: lirc_serial: replaced printk with pr_debug

Replaced printk with pr_debug in dprintk

---
 drivers/staging/media/lirc/lirc_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/lirc/lirc_serial.c +1 -1
index 181b92b..86c5274 100644
@@ -116,7 +116,7 @@ static bool txsense;	/* 0 = active high, 1 = active low */
 #define dprintk(fmt, args...)					\
 	do {							\
 		if (debug)					\
-			printk(KERN_DEBUG LIRC_DRIVER_NAME ": "	\
+			pr_debug(LIRC_DRIVER_NAME ": "		\
 			       fmt, ## args);			\
 	} while (0)
 
Signature · 1 line
1.8.5.5
#1 lore raw

Em Fri, 21 Nov 2014 14:21:40 +0100
Abel Moyo <[email protected]> escreveu:

Quoted 12 lines

Replaced printk with pr_debug in dprintk

---
 drivers/staging/media/lirc/lirc_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/lirc/lirc_serial.c +0 -0
index 181b92b..86c5274 100644

drivers/staging/media/lirc/lirc_serial.c static bool txsense; /* 0 = active high, 1 = active low */ · line 122

Quoted 8 lines
drivers/staging/media/lirc/lirc_serial.c +1 -1
@@ -116,7 +116,7 @@ static bool txsense;	/* 0 = active high, 1 = active low */
 #define dprintk(fmt, args...)					\
 	do {							\
 		if (debug)					\
-			printk(KERN_DEBUG LIRC_DRIVER_NAME ": "	\
+			pr_debug(LIRC_DRIVER_NAME ": "		\
 			       fmt, ## args);			\
 	} while (0)
 

No, this is a bad idea. If dynamic_printk is enabled, in order to activate the debug messages, it would be required to enable debug modprobe parameter _and_ to enable each debug msg individually.

We should either use one or the other approach.

Regards,
Mauro