mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark <reodge@gmail.com>
To: gregkh@suse.de
Cc: Mark <reodge@gmail.com>, Bill Pemberton <wfp5p@virginia.edu>,
	Ben Kero <ben.kero@gmail.com>, Tejun Heo <tj@kernel.org>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Staging: comedi: Altered the way printk is used in 8255.c
Date: Mon, 17 May 2010 19:34:27 +0800	[thread overview]
Message-ID: <1274096068-7330-1-git-send-email-reodge@gmail.com> (raw)

This patch moves around the use of printk calls in 8255.c to include accurate
logging levels and in turn fixes a few warnings from checkpatch.

Signed-off-by: Mark Rankilor <reodge@gmail.com>
---
 drivers/staging/comedi/drivers/8255.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/comedi/drivers/8255.c b/drivers/staging/comedi/drivers/8255.c
index b2e80dd..fe63830 100644
--- a/drivers/staging/comedi/drivers/8255.c
+++ b/drivers/staging/comedi/drivers/8255.c
@@ -396,8 +396,6 @@ static int dev_8255_attach(struct comedi_device *dev,
 	unsigned long iobase;
 	int i;
 
-	printk("comedi%d: 8255:", dev->minor);
-
 	dev->board_name = "8255";
 
 	for (i = 0; i < COMEDI_NDEVCONFOPTS; i++) {
@@ -406,13 +404,20 @@ static int dev_8255_attach(struct comedi_device *dev,
 			break;
 	}
 	if (i == 0) {
-		printk(" no devices specified\n");
+		printk(KERN_WARNING
+		       "comedi%d: 8255: no devices specified\n", dev->minor);
 		return -EINVAL;
 	}
 
 	ret = alloc_subdevices(dev, i);
-	if (ret < 0)
+	if (ret < 0) {
+		/* FIXME this printk call should give a proper message, the
+		 * below line just maintains previous functionality */
+		printk("comedi%d: 8255:", dev->minor);
 		return ret;
+	}
+
+	printk(KERN_INFO "comedi%d: 8255:", dev->minor);
 
 	for (i = 0; i < dev->n_subdevices; i++) {
 		iobase = it->options[i];
@@ -439,7 +444,7 @@ static int dev_8255_detach(struct comedi_device *dev)
 	unsigned long iobase;
 	struct comedi_subdevice *s;
 
-	printk("comedi%d: 8255: remove\n", dev->minor);
+	printk(KERN_INFO "comedi%d: 8255: remove\n", dev->minor);
 
 	for (i = 0; i < dev->n_subdevices; i++) {
 		s = dev->subdevices + i;
-- 
1.7.0.5


                 reply	other threads:[~2010-05-17 11:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1274096068-7330-1-git-send-email-reodge@gmail.com \
    --to=reodge@gmail.com \
    --cc=ben.kero@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=wfp5p@virginia.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®