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-next>] [day] [month] [year] [list]
Message-Id: <1311141439-15920-1-git-send-email-ravishankarkm32@gmail.com>
Date:	Wed, 20 Jul 2011 11:27:19 +0530
From:	Ravishankar <ravishankarkm32@...il.com>
To:	gregkh@...e.de, wfp5p@...ginia.edu
Cc:	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
	Ravishankar <ravi.shankar@...enturtles.in>,
	Ravishankar <ravishankarkm32@...il.com>
Subject: [PATCH 1/1] Staging: comedi: fix printk issue in das6402.c

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

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

Signed-off-by: Ravishankar <ravishankarkm32@...il.com>
---
 drivers/staging/comedi/drivers/das6402.c |   27 +++++++++++++++------------
 1 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/comedi/drivers/das6402.c b/drivers/staging/comedi/drivers/das6402.c
index 6328f52..f9db533 100644
--- a/drivers/staging/comedi/drivers/das6402.c
+++ b/drivers/staging/comedi/drivers/das6402.c
@@ -171,13 +171,13 @@ static irqreturn_t intr_handler(int irq, void *d)
 	struct comedi_subdevice *s = dev->subdevices;
 
 	if (!dev->attached || devpriv->das6402_ignoreirq) {
-		printk("das6402: BUG: spurious interrupt\n");
+		printk(KERN_WARNING "das6402: BUG: spurious interrupt\n");
 		return IRQ_HANDLED;
 	}
 #ifdef DEBUG
-	printk("das6402: interrupt! das6402_irqcount=%i\n",
-	       devpriv->das6402_irqcount);
-	printk("das6402: iobase+2=%i\n", inw_p(dev->iobase + 2));
+	printk(KERN_DEBUG "das6402: interrupt! das6402_irqcount=%i\n",
+			devpriv->das6402_irqcount);
+	printk(KERN_DEBUG "das6402: iobase+2=%i\n", inw_p(dev->iobase + 2));
 #endif
 
 	das6402_ai_fifo_dregs(dev, s);
@@ -186,8 +186,8 @@ static irqreturn_t intr_handler(int irq, void *d)
 		outw_p(SCANL, dev->iobase + 2);	/* clears the fifo */
 		outb(0x07, dev->iobase + 8);	/* clears all flip-flops */
 #ifdef DEBUG
-		printk("das6402: Got %i samples\n\n",
-		       devpriv->das6402_wordsread - diff);
+		printk(KERN_DEBUG "das6402: Got %i samples\n\n",
+			devpriv->das6402_wordsread - diff);
 #endif
 		s->async->events |= COMEDI_CB_EOA;
 		comedi_event(dev, s);
@@ -229,7 +229,7 @@ static int das6402_ai_cancel(struct comedi_device *dev,
 
 	devpriv->das6402_ignoreirq = 1;
 #ifdef DEBUG
-	printk("das6402: Stopping acquisition\n");
+	printk(KERN_DEBUG "das6402: Stopping acquisition\n");
 #endif
 	devpriv->das6402_ignoreirq = 1;
 	outb_p(0x02, dev->iobase + 10);	/* disable external trigging */
@@ -248,7 +248,7 @@ static int das6402_ai_mode2(struct comedi_device *dev,
 	devpriv->das6402_ignoreirq = 1;
 
 #ifdef DEBUG
-	printk("das6402: Starting acquisition\n");
+	printk(KERN_DEBUG "das6402: Starting acquisition\n");
 #endif
 	outb_p(0x03, dev->iobase + 10);	/* enable external trigging */
 	outw_p(SCANL, dev->iobase + 2);	/* resets the card fifo */
@@ -329,10 +329,12 @@ static int das6402_attach(struct comedi_device *dev,
 	if (iobase == 0)
 		iobase = 0x300;
 
-	printk("comedi%d: das6402: 0x%04lx", dev->minor, iobase);
+	printk(KERN_INFO "comedi%d: das6402: 0x%04lx", dev->minor, iobase);
 
 	if (!request_region(iobase, DAS6402_SIZE, "das6402")) {
-		printk(" I/O port conflict\n");
+		printk(KERN_CONT "\n");
+		printk(KERN_ERR "comedi%d: das6402: 0x%04lx: I/O port conflict\n",
+		dev->minor, iobase);
 		return -EIO;
 	}
 	dev->iobase = iobase;
@@ -340,10 +342,11 @@ static int das6402_attach(struct comedi_device *dev,
 	/* should do a probe here */
 
 	irq = it->options[0];
-	printk(" ( irq = %u )", irq);
+	printk(KERN_DEBUG " ( irq = %u )", irq);
 	ret = request_irq(irq, intr_handler, 0, "das6402", dev);
 	if (ret < 0) {
-		printk("irq conflict\n");
+		printk(KERN_CONT "\n");
+		printk(KERN_DEBUG "( irq = %u)irq conflict\n", irq);
 		return ret;
 	}
 	dev->irq = irq;
-- 
1.6.5.2

--
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