LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] media: em28xx replace printk in dprintk macros
@ 2015-02-24 18:53 Shuah Khan
  2015-02-24 22:03 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 5+ messages in thread
From: Shuah Khan @ 2015-02-24 18:53 UTC (permalink / raw)
  To: mchehab; +Cc: Shuah Khan, linux-media, linux-kernel

Replace printk macro in dprintk macros in em28xx audio, dvb,
and input files with pr_* equivalent routines.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 drivers/media/usb/em28xx/em28xx-audio.c | 3 +--
 drivers/media/usb/em28xx/em28xx-dvb.c   | 2 +-
 drivers/media/usb/em28xx/em28xx-input.c | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
index 49a5f95..93d89f2 100644
--- a/drivers/media/usb/em28xx/em28xx-audio.c
+++ b/drivers/media/usb/em28xx/em28xx-audio.c
@@ -55,8 +55,7 @@ MODULE_PARM_DESC(debug, "activates debug info");
 
 #define dprintk(fmt, arg...) do {					\
 	    if (debug)							\
-		printk(KERN_INFO "em28xx-audio %s: " fmt,		\
-				  __func__, ##arg);		\
+		pr_info("em28xx-audio %s: " fmt, __func__, ##arg);	\
 	} while (0)
 
 static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
index aee70d4..8826054 100644
--- a/drivers/media/usb/em28xx/em28xx-dvb.c
+++ b/drivers/media/usb/em28xx/em28xx-dvb.c
@@ -71,7 +71,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
 #define dprintk(level, fmt, arg...) do {			\
 if (debug >= level)						\
-	printk(KERN_DEBUG "%s/2-dvb: " fmt, dev->name, ## arg);	\
+	pr_debug("%s/2-dvb: " fmt, dev->name, ## arg);		\
 } while (0)
 
 struct em28xx_dvb {
diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c
index 4007356..e99108b 100644
--- a/drivers/media/usb/em28xx/em28xx-input.c
+++ b/drivers/media/usb/em28xx/em28xx-input.c
@@ -43,7 +43,7 @@ MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]");
 
 #define dprintk(fmt, arg...) \
 	if (ir_debug) { \
-		printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
+		pr_debug("%s/ir: " fmt, ir->name, ## arg); \
 	}
 
 /**********************************************************
-- 
2.1.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] media: em28xx replace printk in dprintk macros
  2015-02-24 18:53 [PATCH] media: em28xx replace printk in dprintk macros Shuah Khan
@ 2015-02-24 22:03 ` Mauro Carvalho Chehab
  2015-02-24 23:41   ` Shuah Khan
  0 siblings, 1 reply; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2015-02-24 22:03 UTC (permalink / raw)
  To: Shuah Khan; +Cc: linux-media, linux-kernel

Em Tue, 24 Feb 2015 11:53:47 -0700
Shuah Khan <shuahkh@osg.samsung.com> escreveu:

> Replace printk macro in dprintk macros in em28xx audio, dvb,
> and input files with pr_* equivalent routines.
> 
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> ---
>  drivers/media/usb/em28xx/em28xx-audio.c | 3 +--
>  drivers/media/usb/em28xx/em28xx-dvb.c   | 2 +-
>  drivers/media/usb/em28xx/em28xx-input.c | 2 +-
>  3 files changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
> index 49a5f95..93d89f2 100644
> --- a/drivers/media/usb/em28xx/em28xx-audio.c
> +++ b/drivers/media/usb/em28xx/em28xx-audio.c
> @@ -55,8 +55,7 @@ MODULE_PARM_DESC(debug, "activates debug info");
>  
>  #define dprintk(fmt, arg...) do {					\
>  	    if (debug)							\
> -		printk(KERN_INFO "em28xx-audio %s: " fmt,		\
> -				  __func__, ##arg);		\
> +		pr_info("em28xx-audio %s: " fmt, __func__, ##arg);	\
>  	} while (0)
>  
>  static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
> diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
> index aee70d4..8826054 100644
> --- a/drivers/media/usb/em28xx/em28xx-dvb.c
> +++ b/drivers/media/usb/em28xx/em28xx-dvb.c
> @@ -71,7 +71,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
>  
>  #define dprintk(level, fmt, arg...) do {			\
>  if (debug >= level)						\
> -	printk(KERN_DEBUG "%s/2-dvb: " fmt, dev->name, ## arg);	\
> +	pr_debug("%s/2-dvb: " fmt, dev->name, ## arg);		\
>  } while (0)
>  
>  struct em28xx_dvb {
> diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c
> index 4007356..e99108b 100644
> --- a/drivers/media/usb/em28xx/em28xx-input.c
> +++ b/drivers/media/usb/em28xx/em28xx-input.c
> @@ -43,7 +43,7 @@ MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]");
>  
>  #define dprintk(fmt, arg...) \
>  	if (ir_debug) { \
> -		printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
> +		pr_debug("%s/ir: " fmt, ir->name, ## arg); \

NACK.

This is the worse of two words, as it would require both to enable
each debug line via dynamic printk setting and to enable ir_debug.

Regards,
Mauro
>  	}
>  
>  /**********************************************************

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] media: em28xx replace printk in dprintk macros
  2015-02-24 22:03 ` Mauro Carvalho Chehab
@ 2015-02-24 23:41   ` Shuah Khan
  2015-02-25  3:45     ` Joe Perches
  0 siblings, 1 reply; 5+ messages in thread
From: Shuah Khan @ 2015-02-24 23:41 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media, linux-kernel

On 02/24/2015 03:03 PM, Mauro Carvalho Chehab wrote:
> Em Tue, 24 Feb 2015 11:53:47 -0700
> Shuah Khan <shuahkh@osg.samsung.com> escreveu:
> 
>> Replace printk macro in dprintk macros in em28xx audio, dvb,
>> and input files with pr_* equivalent routines.
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>> ---
>>  drivers/media/usb/em28xx/em28xx-audio.c | 3 +--
>>  drivers/media/usb/em28xx/em28xx-dvb.c   | 2 +-
>>  drivers/media/usb/em28xx/em28xx-input.c | 2 +-
>>  3 files changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/media/usb/em28xx/em28xx-audio.c b/drivers/media/usb/em28xx/em28xx-audio.c
>> index 49a5f95..93d89f2 100644
>> --- a/drivers/media/usb/em28xx/em28xx-audio.c
>> +++ b/drivers/media/usb/em28xx/em28xx-audio.c
>> @@ -55,8 +55,7 @@ MODULE_PARM_DESC(debug, "activates debug info");
>>  
>>  #define dprintk(fmt, arg...) do {					\
>>  	    if (debug)							\
>> -		printk(KERN_INFO "em28xx-audio %s: " fmt,		\
>> -				  __func__, ##arg);		\
>> +		pr_info("em28xx-audio %s: " fmt, __func__, ##arg);	\
>>  	} while (0)
>>  
>>  static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
>> diff --git a/drivers/media/usb/em28xx/em28xx-dvb.c b/drivers/media/usb/em28xx/em28xx-dvb.c
>> index aee70d4..8826054 100644
>> --- a/drivers/media/usb/em28xx/em28xx-dvb.c
>> +++ b/drivers/media/usb/em28xx/em28xx-dvb.c
>> @@ -71,7 +71,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
>>  
>>  #define dprintk(level, fmt, arg...) do {			\
>>  if (debug >= level)						\
>> -	printk(KERN_DEBUG "%s/2-dvb: " fmt, dev->name, ## arg);	\
>> +	pr_debug("%s/2-dvb: " fmt, dev->name, ## arg);		\
>>  } while (0)
>>  
>>  struct em28xx_dvb {
>> diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c
>> index 4007356..e99108b 100644
>> --- a/drivers/media/usb/em28xx/em28xx-input.c
>> +++ b/drivers/media/usb/em28xx/em28xx-input.c
>> @@ -43,7 +43,7 @@ MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]");
>>  
>>  #define dprintk(fmt, arg...) \
>>  	if (ir_debug) { \
>> -		printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
>> +		pr_debug("%s/ir: " fmt, ir->name, ## arg); \
> 
> NACK.
> 
> This is the worse of two words, as it would require both to enable
> each debug line via dynamic printk setting and to enable ir_debug.
> 

Ah. I missed that. Sorry for the noise.

-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] media: em28xx replace printk in dprintk macros
  2015-02-24 23:41   ` Shuah Khan
@ 2015-02-25  3:45     ` Joe Perches
  2015-02-25 12:09       ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2015-02-25  3:45 UTC (permalink / raw)
  To: Shuah Khan; +Cc: Mauro Carvalho Chehab, linux-media, linux-kernel

On Tue, 2015-02-24 at 16:41 -0700, Shuah Khan wrote:
> On 02/24/2015 03:03 PM, Mauro Carvalho Chehab wrote:
> > Em Tue, 24 Feb 2015 11:53:47 -0700 Shuah Khan <shuahkh@osg.samsung.com> escreveu:
> >> Replace printk macro in dprintk macros in em28xx audio, dvb,
> >> and input files with pr_* equivalent routines.
[]
> >> diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c
[]
> >>  #define dprintk(fmt, arg...) \
> >>  	if (ir_debug) { \
> >> -		printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
> >> +		pr_debug("%s/ir: " fmt, ir->name, ## arg); \
> > 
> > NACK.
> > 
> > This is the worse of two words, as it would require both to enable
> > each debug line via dynamic printk setting and to enable ir_debug.
> Ah. I missed that. Sorry for the noise.

It's
At some point, I'm going to propose a standard mechanism
similar to netif_<level> that does bitmap matching for
dynamic_debug and generic debugging.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] media: em28xx replace printk in dprintk macros
  2015-02-25  3:45     ` Joe Perches
@ 2015-02-25 12:09       ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 5+ messages in thread
From: Mauro Carvalho Chehab @ 2015-02-25 12:09 UTC (permalink / raw)
  To: Joe Perches; +Cc: Shuah Khan, linux-media, linux-kernel

Em Tue, 24 Feb 2015 19:45:50 -0800
Joe Perches <joe@perches.com> escreveu:

> On Tue, 2015-02-24 at 16:41 -0700, Shuah Khan wrote:
> > On 02/24/2015 03:03 PM, Mauro Carvalho Chehab wrote:
> > > Em Tue, 24 Feb 2015 11:53:47 -0700 Shuah Khan <shuahkh@osg.samsung.com> escreveu:
> > >> Replace printk macro in dprintk macros in em28xx audio, dvb,
> > >> and input files with pr_* equivalent routines.
> []
> > >> diff --git a/drivers/media/usb/em28xx/em28xx-input.c b/drivers/media/usb/em28xx/em28xx-input.c
> []
> > >>  #define dprintk(fmt, arg...) \
> > >>  	if (ir_debug) { \
> > >> -		printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
> > >> +		pr_debug("%s/ir: " fmt, ir->name, ## arg); \
> > > 
> > > NACK.
> > > 
> > > This is the worse of two words, as it would require both to enable
> > > each debug line via dynamic printk setting and to enable ir_debug.
> > Ah. I missed that. Sorry for the noise.
> 
> It's
> At some point, I'm going to propose a standard mechanism
> similar to netif_<level> that does bitmap matching for
> dynamic_debug and generic debugging.

Such mechanism would make sense for media drivers.

Regards,
Mauro

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-02-25 12:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-24 18:53 [PATCH] media: em28xx replace printk in dprintk macros Shuah Khan
2015-02-24 22:03 ` Mauro Carvalho Chehab
2015-02-24 23:41   ` Shuah Khan
2015-02-25  3:45     ` Joe Perches
2015-02-25 12:09       ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).