All of lore.kernel.org
 help / color / mirror / Atom feed
* Updated: [PATCH] staging: comedi: CodingStyle cleanup for drivers/acl7225b.c
@ 2009-09-28 22:10 Bruce Jones
  2009-09-28 22:18 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Bruce Jones @ 2009-09-28 22:10 UTC (permalink / raw)
  To: gregkh; +Cc: wfp5, Joe Perches, devel, linux-kernel

Updated based on feedback from Joe, thanks Joe!

	-- brucej

---------------

Cleanup the printk's in this driver to use KERN_foo log
levels.
---
 drivers/staging/comedi/drivers/acl7225b.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/acl7225b.c b/drivers/staging/comedi/drivers/acl7225b.c
index c3652ef..8086903 100644
--- a/drivers/staging/comedi/drivers/acl7225b.c
+++ b/drivers/staging/comedi/drivers/acl7225b.c
@@ -94,10 +94,10 @@ static int acl7225b_attach(struct comedi_device *dev,
 
 	iobase = it->options[0];
 	iorange = this_board->io_range;
-	printk("comedi%d: acl7225b: board=%s 0x%04x ", dev->minor,
+	printk(KERN_INFO "comedi%d: acl7225b: board=%s 0x%04x\n", dev->minor,
 	       this_board->name, iobase);
 	if (!request_region(iobase, iorange, "acl7225b")) {
-		printk("I/O port conflict\n");
+		printk(KERN_CONT "I/O port conflict\n");
 		return -EIO;
 	}
 	dev->board_name = this_board->name;
@@ -137,14 +137,12 @@ static int acl7225b_attach(struct comedi_device *dev,
 	s->range_table = &range_digital;
 	s->private = (void *)ACL7225_DI_LO;
 
-	printk("\n");
-
 	return 0;
 }
 
 static int acl7225b_detach(struct comedi_device *dev)
 {
-	printk("comedi%d: acl7225b: remove\n", dev->minor);
+	printk(KERN_INFO "comedi%d: acl7225b: remove\n", dev->minor);
 
 	if (dev->iobase)
 		release_region(dev->iobase, this_board->io_range);
-- 
1.6.5.rc2

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

* Re: Updated: [PATCH] staging: comedi: CodingStyle cleanup for drivers/acl7225b.c
  2009-09-28 22:10 Updated: [PATCH] staging: comedi: CodingStyle cleanup for drivers/acl7225b.c Bruce Jones
@ 2009-09-28 22:18 ` Joe Perches
  2009-09-29 17:26   ` Bruce Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2009-09-28 22:18 UTC (permalink / raw)
  To: Bruce Jones; +Cc: gregkh, wfp5, devel, linux-kernel

On Mon, 2009-09-28 at 15:10 -0700, Bruce Jones wrote:
> Cleanup the printk's in this driver to use KERN_foo log
> levels.
> +	printk(KERN_INFO "comedi%d: acl7225b: board=%s 0x%04x\n", dev->minor,
>  	       this_board->name, iobase);
>  	if (!request_region(iobase, iorange, "acl7225b")) {
> -		printk("I/O port conflict\n");
> +		printk(KERN_CONT "I/O port conflict\n");

This should not be KERN_CONT but KERN_INFO or KERN_ERR
and should probably have a "comedi%d:" leader.

Maybe:
	printk(KERN_ERR "comedi%d: request_region failed - I/O port conflict\n");

cheers, Joe


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

* Re: Updated: [PATCH] staging: comedi: CodingStyle cleanup for drivers/acl7225b.c
  2009-09-28 22:18 ` Joe Perches
@ 2009-09-29 17:26   ` Bruce Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Bruce Jones @ 2009-09-29 17:26 UTC (permalink / raw)
  To: Joe Perches, gregkh; +Cc: wfp5, devel, linux-kernel

Joe Perches wrote:
> On Mon, 2009-09-28 at 15:10 -0700, Bruce Jones wrote:
>> Cleanup the printk's in this driver to use KERN_foo log
>> levels.
>> +	printk(KERN_INFO "comedi%d: acl7225b: board=%s 0x%04x\n", dev->minor,
>>  	       this_board->name, iobase);
>>  	if (!request_region(iobase, iorange, "acl7225b")) {
>> -		printk("I/O port conflict\n");
>> +		printk(KERN_CONT "I/O port conflict\n");
> 
> This should not be KERN_CONT but KERN_INFO or KERN_ERR
> and should probably have a "comedi%d:" leader.
> 
> Maybe:
> 	printk(KERN_ERR "comedi%d: request_region failed - I/O port conflict\n");
> 
> cheers, Joe

Joe, thanks!  Greg, here's an updated patch.

	-- brucej

------------------

Clean up the printk's in this driver.

Signed-off-by: Bruce Jones <brucej@linux.com>
---
 drivers/staging/comedi/drivers/acl7225b.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/acl7225b.c b/drivers/staging/comedi/drivers/acl7225b.c
index c3652ef..e20c354 100644
--- a/drivers/staging/comedi/drivers/acl7225b.c
+++ b/drivers/staging/comedi/drivers/acl7225b.c
@@ -94,10 +94,11 @@ static int acl7225b_attach(struct comedi_device *dev,
 
 	iobase = it->options[0];
 	iorange = this_board->io_range;
-	printk("comedi%d: acl7225b: board=%s 0x%04x ", dev->minor,
+	printk(KERN_INFO "comedi%d: acl7225b: board=%s 0x%04x\n", dev->minor,
 	       this_board->name, iobase);
 	if (!request_region(iobase, iorange, "acl7225b")) {
-		printk("I/O port conflict\n");
+		printk(KERN_ERR "comedi%d: request_region failed - I/O port conflict\n",
+			dev->minor);
 		return -EIO;
 	}
 	dev->board_name = this_board->name;
@@ -137,14 +138,12 @@ static int acl7225b_attach(struct comedi_device *dev,
 	s->range_table = &range_digital;
 	s->private = (void *)ACL7225_DI_LO;
 
-	printk("\n");
-
 	return 0;
 }
 
 static int acl7225b_detach(struct comedi_device *dev)
 {
-	printk("comedi%d: acl7225b: remove\n", dev->minor);
+	printk(KERN_INFO "comedi%d: acl7225b: remove\n", dev->minor);
 
 	if (dev->iobase)
 		release_region(dev->iobase, this_board->io_range);
-- 
1.6.5.rc2

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

end of thread, other threads:[~2009-09-29 17:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-28 22:10 Updated: [PATCH] staging: comedi: CodingStyle cleanup for drivers/acl7225b.c Bruce Jones
2009-09-28 22:18 ` Joe Perches
2009-09-29 17:26   ` Bruce Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.