Skip to contentSkip to conversation

staging/comedi: Fix trailing statements should be on next line in drivers/quatech_daqp_cs.c

PATCH New YAMANE Toshiaki 1 participant 2 messages Oct 27, 2012 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 staging/comedi: Fix trailing statements should be on next line in drivers/quatech_daqp_cs.c

fixed below checkpatch errors.
- ERROR: trailing statements should be on next line

---
 drivers/staging/comedi/drivers/quatech_daqp_cs.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/comedi/drivers/quatech_daqp_cs.c +4 -2
index d15bd8a..806523c 100644
@@ -395,7 +395,8 @@ static int daqp_ai_insn_read(struct comedi_device *dev,
 	 */
 
 	while (--counter
-	       && (inb(dev->iobase + DAQP_STATUS) & DAQP_STATUS_EVENTS)) ;
+	       && (inb(dev->iobase + DAQP_STATUS) & DAQP_STATUS_EVENTS))
+		;
 	if (!counter) {
 		printk("daqp: couldn't clear interrupts in status register\n");
 		return -1;
@@ -732,7 +733,8 @@ static int daqp_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 	 */
 	counter = 100;
 	while (--counter
-	       && (inb(dev->iobase + DAQP_STATUS) & DAQP_STATUS_EVENTS)) ;
+	       && (inb(dev->iobase + DAQP_STATUS) & DAQP_STATUS_EVENTS))
+		;
 	if (!counter) {
 		dev_err(dev->class_dev,
 			"couldn't clear interrupts in status register\n");
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/2 staging/comedi: Use dev_ printks in drivers/quatech_daqp_cs.c

fixed below checkpatch warnings.
- WARNING: printk() should include KERN_ facility level

---
 drivers/staging/comedi/drivers/quatech_daqp_cs.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
drivers/staging/comedi/drivers/quatech_daqp_cs.c +5 -4
index 806523c..ee9158b 100644
@@ -300,7 +300,7 @@ static enum irqreturn daqp_interrupt(int irq, void *dev_id)
 			if (status & DAQP_STATUS_DATA_LOST) {
 				s->async->events |=
 				    COMEDI_CB_EOA | COMEDI_CB_OVERFLOW;
-				printk("daqp: data lost\n");
+				dev_warn(dev->class_dev, "data lost\n");
 				daqp_ai_cancel(dev, s);
 				break;
 			}
@@ -398,7 +398,8 @@ static int daqp_ai_insn_read(struct comedi_device *dev,
 	       && (inb(dev->iobase + DAQP_STATUS) & DAQP_STATUS_EVENTS))
 		;
 	if (!counter) {
-		printk("daqp: couldn't clear interrupts in status register\n");
+		dev_err(dev->class_dev,
+			"couldn't clear interrupts in status register\n");
 		return -1;
 	}
 
@@ -824,8 +825,8 @@ static int daqp_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	struct comedi_subdevice *s;
 
 	if (it->options[0] < 0 || it->options[0] >= MAX_DEV || !local) {
-		printk("comedi%d: No such daqp device %d\n",
-		       dev->minor, it->options[0]);
+		dev_err(dev->class_dev, "No such daqp device %d\n",
+			it->options[0]);
 		return -EIO;
 	}
 
Signature · 1 line
1.7.9.5