lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 29 Sep 2009 10:26:29 -0700
From:	Bruce Jones <brucej97223@...il.com>
To:	Joe Perches <joe@...ches.com>, gregkh@...e.de
CC:	wfp5@...ginia.edu, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: Updated: [PATCH] staging: comedi: CodingStyle cleanup for drivers/acl7225b.c

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@...ux.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ