em28xx: Convert printks to em28xx_err and em28xx_info
PATCH 2/2 em28xx: Convert printks to em28xx_err and em28xx_info
em28xx: Convert printks to em28xx_err and em28xx_info
From: Filipe Rosset <[email protected]>
Convert printks to em28xx_err and em28xx_info
Priority: normal
linux/drivers/media/video/em28xx/em28xx-dvb.c +7 -8
@@ -314,7 +314,7 @@ cfg.i2c_addr = addr;if (!dev->dvb->frontend) { -printk (KERN_ERR "%s/2: dvb frontend not attached. " +em28xx_err ("%s/2: dvb frontend not attached. " "Can't attach xc3028\n" , dev->name);return -EINVAL ;
@@ -322,14 +322,14 @@ fe =dvb_attach (xc2028_attach, dev->dvb->frontend, &cfg);if (!fe) { -printk (KERN_ERR "%s/2: xc3028 attach failed\n" , +em28xx_err ("%s/2: xc3028 attach failed\n" , dev->name);dvb_frontend_detach (dev->dvb->frontend); dev->dvb->frontend =NULL ;return -EINVAL ; } -printk (KERN_INFO "%s/2: xc3028 attached\n" , dev->name); +em28xx_info ("%s/2: xc3028 attached\n" , dev->name);return 0 ; }
@@ -464,7 +464,7 @@ dvb =kzalloc (sizeof (struct em28xx_dvb ),GFP_KERNEL );if (dvb ==NULL ) { -printk (KERN_INFO "em28xx_dvb: memory allocation failed\n" ); +em28xx_info ("em28xx_dvb: memory allocation failed\n" );return -ENOMEM ; } dev->dvb = dvb;
@@ -570,14 +570,13 @@ }break ;default : -printk (KERN_ERR "%s/2: The frontend of your DVB/ATSC card" +em28xx_err ("%s/2: The frontend of your DVB/ATSC card" " isn't supported yet\n" , dev->name);break ; }if (NULL == dvb->frontend) { -printk (KERN_ERR -"%s/2: frontend initialization failed\n" , +em28xx_err ("%s/2: frontend initialization failed\n" , dev->name); result = -EINVAL ; goto out_free;
@@ -592,7 +591,7 @@ goto out_free;em28xx_set_mode (dev,EM28XX_SUSPEND ); -printk (KERN_INFO "Successfully loaded em28xx-dvb\n" ); +em28xx_info ("Successfully loaded em28xx-dvb\n" );return 0 ; out_free:
Quoted 1 line · Filipe Rosset
You should use the em28xx_errdev() instead of em28xx_err() if your intent is to insert "dev->name" in front of the message.
Devin
Signature · 2 lines
Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com
Em 28-09-2009 12:24, Devin Heitmueller escreveu:
Quoted 8 lines · Filipe Rosset
Quoted 1 line
You should use the
em28xx_errdev()instead ofem28xx_err()if your intent is to insert "dev->name" in front of the message.Devin
OK, modified patch.
Filipe
linux/drivers/media/video/em28xx/em28xx-dvb.c +11 -12
@@ -314,22 +314,22 @@ cfg.i2c_addr = addr;if (!dev->dvb->frontend) { -printk (KERN_ERR "%s/2: dvb frontend not attached. " +em28xx_errdev ("%s/2: dvb frontend not attached. " "Can't attach xc3028\n" , - dev->name); + dev->name);return -EINVAL ; } fe =dvb_attach (xc2028_attach, dev->dvb->frontend, &cfg);if (!fe) { -printk (KERN_ERR "%s/2: xc3028 attach failed\n" , - dev->name); +em28xx_errdev ("%s/2: xc3028 attach failed\n" , + dev->name);dvb_frontend_detach (dev->dvb->frontend); dev->dvb->frontend =NULL ;return -EINVAL ; } -printk (KERN_INFO "%s/2: xc3028 attached\n" , dev->name); +em28xx_info ("%s/2: xc3028 attached\n" , dev->name);return 0 ; }
@@ -464,7 +464,7 @@ dvb =kzalloc (sizeof (struct em28xx_dvb ),GFP_KERNEL );if (dvb ==NULL ) { -printk (KERN_INFO "em28xx_dvb: memory allocation failed\n" ); +em28xx_info ("em28xx_dvb: memory allocation failed\n" );return -ENOMEM ; } dev->dvb = dvb;
@@ -570,15 +570,14 @@ }break ;default : -printk (KERN_ERR "%s/2: The frontend of your DVB/ATSC card" +em28xx_errdev ("%s/2: The frontend of your DVB/ATSC card" " isn't supported yet\n" , - dev->name); + dev->name);break ; }if (NULL == dvb->frontend) { -printk (KERN_ERR -"%s/2: frontend initialization failed\n" , - dev->name); +em28xx_errdev ("%s/2: frontend initialization failed\n" , + dev->name); result = -EINVAL ; goto out_free; }
@@ -592,7 +591,7 @@ goto out_free;em28xx_set_mode (dev,EM28XX_SUSPEND ); -printk (KERN_INFO "Successfully loaded em28xx-dvb\n" ); +em28xx_info ("Successfully loaded em28xx-dvb\n" );return 0 ; out_free:
Quoted 7 lines · Filipe Rosset
Em 28-09-2009 12:24, Devin Heitmueller escreveu:
Quoted 6 lines · Filipe Rosset
Quoted 1 line
You should use the
em28xx_errdev()instead ofem28xx_err()if your intent is to insert "dev->name" in front of the message.
Quoted 7 lines
Quoted 2 lines
Devin
OK, modified patch.
Filipe
Filipe,
Your updated patch is going to effectively print dev->name twice. Please look at the definition of em28xx_errdev() and resubmit an updated patch that takes this into account.
Thanks,
Devin
Signature · 2 lines
Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com
Em 28-09-2009 13:23, Devin Heitmueller escreveu:
Quoted 11 lines
Filipe,
Your updated patch is going to effectively print
dev->nametwice. Please look at the definition ofem28xx_errdev()and resubmit an updated patch that takes this into account.Thanks,
Devin
Hi Devin,
I now resend correct patch.
Sorry for inconvenience.
Thanks,
Filipe
linux/drivers/media/video/em28xx/em28xx-dvb.c +9 -14
@@ -314,22 +314,20 @@ cfg.i2c_addr = addr;if (!dev->dvb->frontend) { -printk (KERN_ERR "%s/2: dvb frontend not attached. " -"Can't attach xc3028\n" , - dev->name); +em28xx_errdev ("/2: dvb frontend not attached. " +"Can't attach xc3028\n" );return -EINVAL ; } fe =dvb_attach (xc2028_attach, dev->dvb->frontend, &cfg);if (!fe) { -printk (KERN_ERR "%s/2: xc3028 attach failed\n" , - dev->name); +em28xx_errdev ("/2: xc3028 attach failed\n" );dvb_frontend_detach (dev->dvb->frontend); dev->dvb->frontend =NULL ;return -EINVAL ; } -printk (KERN_INFO "%s/2: xc3028 attached\n" , dev->name); +em28xx_info ("%s/2: xc3028 attached\n" , dev->name);return 0 ; }
@@ -464,7 +462,7 @@ dvb =kzalloc (sizeof (struct em28xx_dvb ),GFP_KERNEL );if (dvb ==NULL ) { -printk (KERN_INFO "em28xx_dvb: memory allocation failed\n" ); +em28xx_info ("em28xx_dvb: memory allocation failed\n" );return -ENOMEM ; } dev->dvb = dvb;
@@ -570,15 +568,12 @@ }break ;default : -printk (KERN_ERR "%s/2: The frontend of your DVB/ATSC card" -" isn't supported yet\n" , - dev->name); +em28xx_errdev ("/2: The frontend of your DVB/ATSC card" +" isn't supported yet\n" );break ; }if (NULL == dvb->frontend) { -printk (KERN_ERR -"%s/2: frontend initialization failed\n" , - dev->name); +em28xx_errdev ("/2: frontend initialization failed\n" ); result = -EINVAL ; goto out_free; }
@@ -592,7 +587,7 @@ goto out_free;em28xx_set_mode (dev,EM28XX_SUSPEND ); -printk (KERN_INFO "Successfully loaded em28xx-dvb\n" ); +em28xx_info ("Successfully loaded em28xx-dvb\n" );return 0 ; out_free:
Quoted 13 lines · Filipe Rosset
Em 28-09-2009 13:23, Devin Heitmueller escreveu:
Quoted 11 lines
Filipe,
Your updated patch is going to effectively print
dev->nametwice. Please look at the definition ofem28xx_errdev()and resubmit an updated patch that takes this into account.Thanks,
Devin
Quoted 7 lines
Hi Devin,
I now resend correct patch.
Sorry for inconvenience.
Thanks,Filipe
Hi Felipe,
Sorry, I'm not trying to be difficult, but could you please include the SOB block in your final patch, as you did with your original version? This is required in order for it to be merged upstream.
Thanks,
Devin
Signature · 2 lines
Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com
Em 28-09-2009 15:05, Devin Heitmueller escreveu:
Quoted 11 lines
Hi Felipe,
Sorry, I'm not trying to be difficult, but could you please include the SOB block in your final patch, as you did with your original version? This is required in order for it to be merged upstream.
Thanks,
Devin
Hi.
Thanks for your tips.
Filipe
em28xx: Convert printks to em28xx_err and em28xx_info
From: Filipe Rosset <[email protected]>
Convert printks to em28xx_err and em28xx_info
Priority: normal
linux/drivers/media/video/em28xx/em28xx-dvb.c +9 -14
@@ -314,22 +314,20 @@ cfg.i2c_addr = addr;if (!dev->dvb->frontend) { -printk (KERN_ERR "%s/2: dvb frontend not attached. " -"Can't attach xc3028\n" , - dev->name); +em28xx_errdev ("/2: dvb frontend not attached. " +"Can't attach xc3028\n" );return -EINVAL ; } fe =dvb_attach (xc2028_attach, dev->dvb->frontend, &cfg);if (!fe) { -printk (KERN_ERR "%s/2: xc3028 attach failed\n" , - dev->name); +em28xx_errdev ("/2: xc3028 attach failed\n" );dvb_frontend_detach (dev->dvb->frontend); dev->dvb->frontend =NULL ;return -EINVAL ; } -printk (KERN_INFO "%s/2: xc3028 attached\n" , dev->name); +em28xx_info ("%s/2: xc3028 attached\n" , dev->name);return 0 ; }
@@ -464,7 +462,7 @@ dvb =kzalloc (sizeof (struct em28xx_dvb ),GFP_KERNEL );if (dvb ==NULL ) { -printk (KERN_INFO "em28xx_dvb: memory allocation failed\n" ); +em28xx_info ("em28xx_dvb: memory allocation failed\n" );return -ENOMEM ; } dev->dvb = dvb;
@@ -570,15 +568,12 @@ }break ;default : -printk (KERN_ERR "%s/2: The frontend of your DVB/ATSC card" -" isn't supported yet\n" , - dev->name); +em28xx_errdev ("/2: The frontend of your DVB/ATSC card" +" isn't supported yet\n" );break ; }if (NULL == dvb->frontend) { -printk (KERN_ERR -"%s/2: frontend initialization failed\n" , - dev->name); +em28xx_errdev ("/2: frontend initialization failed\n" ); result = -EINVAL ; goto out_free; }
@@ -592,7 +587,7 @@ goto out_free;em28xx_set_mode (dev,EM28XX_SUSPEND ); -printk (KERN_INFO "Successfully loaded em28xx-dvb\n" ); +em28xx_info ("Successfully loaded em28xx-dvb\n" );return 0 ; out_free: