The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 30/30] Staging: comedi: fix printk() issue in das16m1.c
       [not found] <[PATCH 3/3]Staging: comedi: fix printk warning issue in das16m1.c>
@ 2011-07-14  4:42 ` Ravishankar
  2011-07-14  7:41   ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Ravishankar @ 2011-07-14  4:42 UTC (permalink / raw)
  To: gregkh, wfp5p; +Cc: devel, linux-kernel, Ravishankar, Ravishankar

From: Ravishankar <ravi.shankar@greenturtles.in>

This is a patch to the das16m1.c file that fixes up a printk() warning found by the checkpatch.pl tool

Signed-off-by: Ravishankar <ravishankarkm32@gmail.com>
---
 drivers/staging/comedi/drivers/das16m1.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c
index ccb7991..efc6132 100644
--- a/drivers/staging/comedi/drivers/das16m1.c
+++ b/drivers/staging/comedi/drivers/das16m1.c
@@ -672,7 +672,7 @@ static int das16m1_attach(struct comedi_device *dev,
 
 	iobase = it->options[0];
 
-	printk("comedi%d: das16m1:", dev->minor);
+	printk(KERN_INFO "comedi%d: das16m1:", dev->minor);
 
 	ret = alloc_private(dev, sizeof(struct das16m1_private_struct));
 	if (ret < 0)
@@ -690,7 +690,7 @@ static int das16m1_attach(struct comedi_device *dev,
 	if (!request_region(iobase + DAS16M1_82C55, DAS16M1_SIZE2,
 			    driver_das16m1.driver_name)) {
 		release_region(iobase, DAS16M1_SIZE);
-		printk(" I/O port conflict\n");
+		printk(KERN_ERR " I/O port conflict\n");
 		return -EIO;
 	}
 	dev->iobase = iobase;
@@ -710,7 +710,7 @@ static int das16m1_attach(struct comedi_device *dev,
 	} else if (irq == 0) {
 		printk(", no irq\n");
 	} else {
-		printk(", invalid irq\n"
+		printk(KERN_ERR ", invalid irq\n"
 		       " valid irqs are 2, 3, 5, 7, 10, 11, 12, or 15\n");
 		return -EINVAL;
 	}
@@ -776,7 +776,7 @@ static int das16m1_attach(struct comedi_device *dev,
 
 static int das16m1_detach(struct comedi_device *dev)
 {
-	printk("comedi%d: das16m1: remove\n", dev->minor);
+	printk(KERN_INFO "comedi%d: das16m1: remove\n", dev->minor);
 
 /* das16m1_reset(dev); */
 
-- 
1.6.5.2


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

* Re: [PATCH 30/30] Staging: comedi: fix printk() issue in das16m1.c
  2011-07-14  4:42 ` [PATCH 30/30] Staging: comedi: fix printk() issue in das16m1.c Ravishankar
@ 2011-07-14  7:41   ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2011-07-14  7:41 UTC (permalink / raw)
  To: Ravishankar; +Cc: gregkh, wfp5p, devel, linux-kernel, Ravishankar

On Thu, Jul 14, 2011 at 10:12:27AM +0530, Ravishankar wrote:
> @@ -690,7 +690,7 @@ static int das16m1_attach(struct comedi_device *dev,
>  	if (!request_region(iobase + DAS16M1_82C55, DAS16M1_SIZE2,
>  			    driver_das16m1.driver_name)) {
>  		release_region(iobase, DAS16M1_SIZE);
> -		printk(" I/O port conflict\n");
> +		printk(KERN_ERR " I/O port conflict\n");

This is a continuation of the last printk line.

>  		return -EIO;
>  	}
>  	dev->iobase = iobase;
> @@ -710,7 +710,7 @@ static int das16m1_attach(struct comedi_device *dev,
>  	} else if (irq == 0) {
>  		printk(", no irq\n");
>  	} else {
> -		printk(", invalid irq\n"
> +		printk(KERN_ERR ", invalid irq\n"

Same.

If you want you can just rewrite the printks completely.  You're not
just limited to adding the KERN_ prefixes, you could make larger
changes than that.

regards,
dan carpenter

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

end of thread, other threads:[~2011-07-14  7:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <[PATCH 3/3]Staging: comedi: fix printk warning issue in das16m1.c>
2011-07-14  4:42 ` [PATCH 30/30] Staging: comedi: fix printk() issue in das16m1.c Ravishankar
2011-07-14  7:41   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox