Skip to contentSkip to conversation

Staging: comedi: fix trailing whitespace and quoted string split across lines in ni_labpc.c

PATCH Greg KH 3 participants 4 messages Apr 24, 2012 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Greg KH

author
#1 lore raw
Quoted 2 lines · Stéphane Pajot

This is a patch to the ni_labpc.c file that fixes up trailing whitespace error and quoted string split across lines warning found by the checkpatch.pl tool

Please only fix one type of thing per patch, so this should be a two patch series at the least.

But...

Review static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) · line 742

Quoted 7 lines
(quoted diff) +1 -1
@@ -738,7 +738,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 		irq = it->options[1];
 		dma_chan = it->options[2];
 #else
-		printk(KERN_ERR " this driver has not been built with ISA DMA "
+		printk(KERN_ERR " this driver has not been built with ISA DMA\n"
 								"support.\n");

What? Why did you do this? Do you understand what you just did to the message printed out?

greg k-h

#2 lore raw
Quoted 6 lines · Greg KH
Quoted 2 lines · Stéphane Pajot

This is a patch to the ni_labpc.c file that fixes up trailing whitespace error and quoted string split across lines warning found by the checkpatch.pl tool

Please only fix one type of thing per patch, so this should be a two patch series at the least.

Ok for that.

Quoted 13 lines

But...

Review static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) · line 742

Quoted 7 lines
(quoted diff) +1 -1
@@ -738,7 +738,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 		irq = it->options[1];
 		dma_chan = it->options[2];
 #else
-		printk(KERN_ERR " this driver has not been built with ISA DMA "
+		printk(KERN_ERR " this driver has not been built with ISA DMA\n"
 								"support.\n");

What? Why did you do this? Do you understand what you just did to the message printed out?

... It was just to patch this "quoted string split across lines warning", i saw this solution on the web. Now i think i understand that i cannot modify AT ALL a printk(KERN_ERR* even if it's just with a \n ?

Stef

Quoted 2 lines

greg k-h

#3 lore raw

Hehe. :P

Stéphane you seem like a nice person but you're a bit of a beginner to be working on the kernel... Come back in couple years after you have done a little bit more C programming and you know the answer to that question. We'll still be around waiting for you. :) There is no rush.

regards,
dan carpenter

author
#4 lore raw
In reply to Stéphane Pajot
Quoted 13 lines · Stéphane Pajot
Quoted 11 lines · Greg KH

Review static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it) · line 742

Quoted 7 lines · Stéphane Pajot
(quoted diff) +1 -1
@@ -738,7 +738,7 @@ static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 		irq = it->options[1];
 		dma_chan = it->options[2];
 #else
-		printk(KERN_ERR " this driver has not been built with ISA DMA "
+		printk(KERN_ERR " this driver has not been built with ISA DMA\n"
 								"support.\n");

What? Why did you do this? Do you understand what you just did to the message printed out?

Quoted 3 lines

... It was just to patch this "quoted string split across lines warning", i saw this solution on the web. Now i think i understand that i cannot modify AT ALL a printk(KERN_ERR* even if it's just with a \n ?

Think about what is actually happening here. You do know C, right? What is the output of the line before you made the change, and now after?

thanks,

greg k-h