All of lore.kernel.org
 help / color / mirror / Atom feed
* comedi: checkpatch errors/warnings
@ 2014-12-28 18:56 Andreas Siegling
  2014-12-28 18:56 ` [PATCH 1/3] comedi: checkpatch error: tabs instead of spaces Andreas Siegling
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andreas Siegling @ 2014-12-28 18:56 UTC (permalink / raw)
  To: devel
  Cc: linux-kernel, hsweeten, abbotti, gregkh, devel, linux-kernel,
	ebru.akagunduz, chase.southwood, rickard_strandqvist,
	Andreas Siegling, Zhutao Lu

The following patch-series will fix checkpatch errors and warnings
which are caused by false spacing and missing blank lines.

It will fix those errors/warnings in drivers/staging/comedi/ and all its
subdirectories. The fixed errors/warnings are:
	WARNING: Missing a blank line after declarations	5 times
	ERROR: trailing whitespace                              once
	ERROR: space prohibited before that ',' (ctx:WxW)       once
	WARNING: please, no space before tabs                   8 times
	ERROR: code indent should use tabs where possible	44 times

After applying the series the following checkpatch errors/warnings will remain
in files in drivers/staging/comedi/ and its subdirectories:
	WARNING: line over 80 characters
	WARNING: quoted string split across lines
	WARNING: break quoted strings at a space character
	WARNING: memory barrier without comment
	WARNING: suspect code indent for conditional statements (x, y)
	WARNING: Use of volatile is usually wrong

Signed-off-by: Andreas Siegling <andreas.siegling@fau.de>
Signed-off-by: Zhutao Lu <lvzhutao@gmail.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] comedi: checkpatch error: tabs instead of spaces
  2014-12-28 18:56 comedi: checkpatch errors/warnings Andreas Siegling
@ 2014-12-28 18:56 ` Andreas Siegling
  2014-12-30 22:40   ` Ian Abbott
  2014-12-28 18:56 ` [PATCH 2/3] comedi: checkpatch error/warning: spaces Andreas Siegling
  2014-12-28 18:56 ` [PATCH 3/3] comedi: checkpatch warning: missing blank line Andreas Siegling
  2 siblings, 1 reply; 7+ messages in thread
From: Andreas Siegling @ 2014-12-28 18:56 UTC (permalink / raw)
  To: devel
  Cc: linux-kernel, hsweeten, abbotti, gregkh, devel, linux-kernel,
	ebru.akagunduz, chase.southwood, rickard_strandqvist,
	Andreas Siegling, Zhutao Lu

This patch fixes all occurrences of 8 whitespaces instead of a tab.
It will remove the 8 whitespaces and replace them with a tab, thereby
the checkpatch-error:
		ERROR: code indent should use tabs where possible
is removed from all files in drivers/staging/comedi/
It also brings some consistency of indentation in the comments.

Signed-off-by: Andreas Siegling <andreas.siegling@fau.de>
Signed-off-by: Zhutao Lu <lvzhutao@gmail.com>
---
 drivers/staging/comedi/drivers/daqboard2000.c | 62 +++++++++++++--------------
 drivers/staging/comedi/drivers/das16m1.c      |  4 +-
 drivers/staging/comedi/drivers/dmm32at.c      |  2 +-
 drivers/staging/comedi/drivers/pcl818.c       | 36 ++++++++--------
 4 files changed, 52 insertions(+), 52 deletions(-)

diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 96697fb..4172e99 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -43,7 +43,7 @@ Configuration options: not applicable, uses PCI auto config
       available from http://www.plxtech.com/products/io/pci9080 
 
    2. The initialization done so far is:
-        a. program the FPGA (windows code sans a lot of error messages)
+	a. program the FPGA (windows code sans a lot of error messages)
 	b.
 
    3. Analog out seems to work OK with DAC's disabled, if DAC's are enabled,
@@ -52,52 +52,52 @@ Configuration options: not applicable, uses PCI auto config
       gives me no clues. I'll keep it simple so far.
 
    4. Analog in.
-        Each channel in the scanlist seems to be controlled by four
+	Each channel in the scanlist seems to be controlled by four
 	control words:
 
-        Word0:
-          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-          ! | | | ! | | | ! | | | ! | | | !
-          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	Word0:
+	  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	  ! | | | ! | | | ! | | | ! | | | !
+	  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
-        Word1:
-          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-          ! | | | ! | | | ! | | | ! | | | !
-          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	Word1:
+	  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	  ! | | | ! | | | ! | | | ! | | | !
+	  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 	   |             |       | | | | |
-           +------+------+       | | | | +-- Digital input (??)
+	   +------+------+       | | | | +-- Digital input (??)
 		  |		 | | | +---- 10 us settling time
 		  |		 | | +------ Suspend acquisition (last to scan)
 		  |		 | +-------- Simultaneous sample and hold
 		  |		 +---------- Signed data format
 		  +------------------------- Correction offset low
 
-        Word2:
-          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-          ! | | | ! | | | ! | | | ! | | | !
-          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-           |     | |     | | | | | |     |
-           +-----+ +--+--+ +++ +++ +--+--+
-              |       |     |   |     +----- Expansion channel
+	Word2:
+	  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	  ! | | | ! | | | ! | | | ! | | | !
+	  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	   |     | |     | | | | | |     |
+	   +-----+ +--+--+ +++ +++ +--+--+
+	      |       |     |   |     +----- Expansion channel
 	      |       |     |   +----------- Expansion gain
-              |       |     +--------------- Channel (low)
+	      |       |     +--------------- Channel (low)
 	      |       +--------------------- Correction offset high
 	      +----------------------------- Correction gain low
-        Word3:
-          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-          ! | | | ! | | | ! | | | ! | | | !
-          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-           |             | | | |   | | | |
-           +------+------+ | | +-+-+ | | +-- Low bank enable
-                  |        | |   |   | +---- High bank enable
-                  |        | |   |   +------ Hi/low select
-		  |    	   | |   +---------- Gain (1,?,2,4,8,16,32,64)
-		  |    	   | +-------------- differential/single ended
-		  |    	   +---------------- Unipolar
+	Word3:
+	  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	  ! | | | ! | | | ! | | | ! | | | !
+	  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+	   |             | | | |   | | | |
+	   +------+------+ | | +-+-+ | | +-- Low bank enable
+		  |	   | |   |   | +---- High bank enable
+		  |	   | |   |   +------ Hi/low select
+		  |	   | |   +---------- Gain (1,?,2,4,8,16,32,64)
+		  |	   | +-------------- differential/single ended
+		  |	   +---------------- Unipolar
 		  +------------------------- Correction gain high
 
    999. The card seems to have an incredible amount of capabilities, but
-        trying to reverse engineer them from the Windows source is beyond my
+	trying to reverse engineer them from the Windows source is beyond my
 	patience.
 
  */
diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c
index 80f41b7..3895aa9 100644
--- a/drivers/staging/comedi/drivers/das16m1.c
+++ b/drivers/staging/comedi/drivers/das16m1.c
@@ -46,8 +46,8 @@ list has 2 or more channels in it, then two conditions must be satisfied:
 (2) - the list must have an even number of entries.
 
 Options:
-        [0] - base io address
-        [1] - irq (optional, but you probably want it)
+	[0] - base io address
+	[1] - irq (optional, but you probably want it)
 
 irq can be omitted, although the cmd interface will not work without it.
 */
diff --git a/drivers/staging/comedi/drivers/dmm32at.c b/drivers/staging/comedi/drivers/dmm32at.c
index 6df298a..31919b8 100644
--- a/drivers/staging/comedi/drivers/dmm32at.c
+++ b/drivers/staging/comedi/drivers/dmm32at.c
@@ -365,7 +365,7 @@ static void dmm32at_setaitimer(struct comedi_device *dev, unsigned int nansec)
 	/* enable the ai conversion interrupt and the clock to start scans */
 	outb(DMM32AT_INTCLK_ADINT |
 	     DMM32AT_INTCLK_CLKEN | DMM32AT_INTCLK_CLKSEL,
-             dev->iobase + DMM32AT_INTCLK_REG);
+	     dev->iobase + DMM32AT_INTCLK_REG);
 }
 
 static int dmm32at_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c
index 8edea35..525a471 100644
--- a/drivers/staging/comedi/drivers/pcl818.c
+++ b/drivers/staging/comedi/drivers/pcl818.c
@@ -45,11 +45,11 @@ A word or two about DMA. Driver support DMA operations at two ways:
     [1] - IRQ	(0=disable, 2, 3, 4, 5, 6, 7)
     [2] - DMA	(0=disable, 1, 3)
     [3] - 0, 10=10MHz clock for 8254
-              1= 1MHz clock for 8254
+	      1= 1MHz clock for 8254
     [4] - 0,  5=A/D input  -5V.. +5V
-          1, 10=A/D input -10V..+10V
+	  1, 10=A/D input -10V..+10V
     [5] - 0,  5=D/A output 0-5V  (internal reference -5V)
-          1, 10=D/A output 0-10V (internal reference -10V)
+	  1, 10=D/A output 0-10V (internal reference -10V)
 	  2    =D/A output unknown (external reference)
 
    Options for PCL-818, PCL-818H:
@@ -57,44 +57,44 @@ A word or two about DMA. Driver support DMA operations at two ways:
     [1] - IRQ	(0=disable, 2, 3, 4, 5, 6, 7)
     [2] - DMA	(0=disable, 1, 3)
     [3] - 0, 10=10MHz clock for 8254
-              1= 1MHz clock for 8254
+	      1= 1MHz clock for 8254
     [4] - 0,  5=D/A output 0-5V  (internal reference -5V)
-          1, 10=D/A output 0-10V (internal reference -10V)
+	  1, 10=D/A output 0-10V (internal reference -10V)
 	  2    =D/A output unknown (external reference)
 
    Options for PCL-818HD, PCL-818HG:
     [0] - IO Base
     [1] - IRQ	(0=disable, 2, 3, 4, 5, 6, 7)
     [2] - DMA/FIFO  (-1=use FIFO, 0=disable both FIFO and DMA,
-                      1=use DMA ch 1, 3=use DMA ch 3)
+		      1=use DMA ch 1, 3=use DMA ch 3)
     [3] - 0, 10=10MHz clock for 8254
-              1= 1MHz clock for 8254
+	      1= 1MHz clock for 8254
     [4] - 0,  5=D/A output 0-5V  (internal reference -5V)
-          1, 10=D/A output 0-10V (internal reference -10V)
-   	  2    =D/A output unknown (external reference)
+	  1, 10=D/A output 0-10V (internal reference -10V)
+	  2    =D/A output unknown (external reference)
 
    Options for PCL-718:
     [0] - IO Base
     [1] - IRQ	(0=disable, 2, 3, 4, 5, 6, 7)
     [2] - DMA	(0=disable, 1, 3)
     [3] - 0, 10=10MHz clock for 8254
-              1= 1MHz clock for 8254
+	      1= 1MHz clock for 8254
     [4] -     0=A/D Range is +/-10V
-	      1=             +/-5V
-	      2=             +/-2.5V
-	      3=             +/-1V
-	      4=             +/-0.5V
-	      5=  	     user defined bipolar
+	      1=	     +/-5V
+	      2=	     +/-2.5V
+	      3=	     +/-1V
+	      4=	     +/-0.5V
+	      5=	     user defined bipolar
 	      6=	     0-10V
 	      7=	     0-5V
- 	      8=	     0-2V
+	      8=	     0-2V
 	      9=	     0-1V
 	     10=	     user defined unipolar
     [5] - 0,  5=D/A outputs 0-5V  (internal reference -5V)
-          1, 10=D/A outputs 0-10V (internal reference -10V)
+	  1, 10=D/A outputs 0-10V (internal reference -10V)
 	      2=D/A outputs unknown (external reference)
     [6] - 0, 60=max  60kHz A/D sampling
-          1,100=max 100kHz A/D sampling (PCL-718 with Option 001 installed)
+	  1,100=max 100kHz A/D sampling (PCL-718 with Option 001 installed)
 
 */
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] comedi: checkpatch error/warning: spaces
  2014-12-28 18:56 comedi: checkpatch errors/warnings Andreas Siegling
  2014-12-28 18:56 ` [PATCH 1/3] comedi: checkpatch error: tabs instead of spaces Andreas Siegling
@ 2014-12-28 18:56 ` Andreas Siegling
  2014-12-30 22:51   ` Ian Abbott
  2014-12-28 18:56 ` [PATCH 3/3] comedi: checkpatch warning: missing blank line Andreas Siegling
  2 siblings, 1 reply; 7+ messages in thread
From: Andreas Siegling @ 2014-12-28 18:56 UTC (permalink / raw)
  To: devel
  Cc: linux-kernel, hsweeten, abbotti, gregkh, devel, linux-kernel,
	ebru.akagunduz, chase.southwood, rickard_strandqvist,
	Andreas Siegling, Zhutao Lu

This patch will fix the following checkpatch errors/warnings in
drivers/staging/comedi/ which are brought by wrong spacing:
	ERROR: trailing whitespace
	ERROR: space prohibited before that ',' (ctx:WxW)
	WARNING: please, no space before tabs

Signed-off-by: Andreas Siegling <andreas.siegling@fau.de>
Signed-off-by: Zhutao Lu <lvzhutao@gmail.com>
---
 drivers/staging/comedi/drivers/daqboard2000.c | 2 +-
 drivers/staging/comedi/drivers/das16m1.c      | 2 +-
 drivers/staging/comedi/drivers/ni_at_a2150.c  | 2 +-
 drivers/staging/comedi/drivers/ni_stc.h       | 4 ++--
 drivers/staging/comedi/drivers/s626.c         | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 4172e99..c8daa47 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -40,7 +40,7 @@ Configuration options: not applicable, uses PCI auto config
    for the card, and here are the findings so far.
 
    1. A good document that describes the PCI interface chip is 9080db-106.pdf
-      available from http://www.plxtech.com/products/io/pci9080 
+      available from http://www.plxtech.com/products/io/pci9080
 
    2. The initialization done so far is:
 	a. program the FPGA (windows code sans a lot of error messages)
diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c
index 3895aa9..d8852c6 100644
--- a/drivers/staging/comedi/drivers/das16m1.c
+++ b/drivers/staging/comedi/drivers/das16m1.c
@@ -80,7 +80,7 @@ irq can be omitted, although the cmd interface will not work without it.
   89ab	8254
   cdef	8254
   400	8255
-  404-407 	8254
+  404-407	8254
 
 */
 
diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c
index 69e543a..bff4852 100644
--- a/drivers/staging/comedi/drivers/ni_at_a2150.c
+++ b/drivers/staging/comedi/drivers/ni_at_a2150.c
@@ -108,7 +108,7 @@ TRIG_WAKE_EOS
 #define   IRQ_LVL_BITS(x)		(((x) & 0xf) << 4)	/*  sets irq level */
 #define   FIFO_INTR_EN_BIT		0x100	/*  enable fifo interrupts */
 #define   FIFO_INTR_FHF_BIT		0x200	/*  interrupt fifo half full */
-#define   DMA_INTR_EN_BIT 		0x800	/*  enable interrupt on dma terminal count */
+#define   DMA_INTR_EN_BIT		0x800	/*  enable interrupt on dma terminal count */
 #define   DMA_DEM_EN_BIT	0x1000	/*  enables demand mode dma */
 #define I8253_BASE_REG		0x14
 #define I8253_MODE_REG		0x17
diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
index bd69c3f..bb76fe1 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -166,7 +166,7 @@ enum Interrupt_B_Ack_Bits {
 #define AI_SCAN_IN_PROG_Pulse			_bit4
 #define AI_EXTMUX_CLK_Pulse			_bit3
 #define AI_LOCALMUX_CLK_Pulse			_bit2
-#define AI_SC_TC_Pulse			 	_bit1
+#define AI_SC_TC_Pulse				_bit1
 #define AI_CONVERT_Pulse			_bit0
 
 #define AO_Command_1_Register		9
@@ -642,7 +642,7 @@ static unsigned AO_UPDATE_Output_Select(enum ao_update_output_selection
 #define G_Load_Source_Select		_bit7
 #define G_Reload_Source_Switching	_bit15
 #define G_Loading_On_Gate		_bit14
-#define G_Gate_Polarity 		_bit13
+#define G_Gate_Polarity			_bit13
 
 #define G_Counting_Once(a)		(((a)&0x03)<<10)
 #define G_Stop_Mode(a)			(((a)&0x03)<<5)
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
index 14932c5..fc497dd 100644
--- a/drivers/staging/comedi/drivers/s626.c
+++ b/drivers/staging/comedi/drivers/s626.c
@@ -118,7 +118,7 @@ static void s626_mc_enable(struct comedi_device *dev,
 static void s626_mc_disable(struct comedi_device *dev,
 			    unsigned int cmd, unsigned int reg)
 {
-	writel(cmd << 16 , dev->mmio + reg);
+	writel(cmd << 16, dev->mmio + reg);
 	mmiowb();
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] comedi: checkpatch warning: missing blank line
  2014-12-28 18:56 comedi: checkpatch errors/warnings Andreas Siegling
  2014-12-28 18:56 ` [PATCH 1/3] comedi: checkpatch error: tabs instead of spaces Andreas Siegling
  2014-12-28 18:56 ` [PATCH 2/3] comedi: checkpatch error/warning: spaces Andreas Siegling
@ 2014-12-28 18:56 ` Andreas Siegling
  2014-12-30 22:52   ` Ian Abbott
  2 siblings, 1 reply; 7+ messages in thread
From: Andreas Siegling @ 2014-12-28 18:56 UTC (permalink / raw)
  To: devel
  Cc: linux-kernel, hsweeten, abbotti, gregkh, devel, linux-kernel,
	ebru.akagunduz, chase.southwood, rickard_strandqvist,
	Andreas Siegling, Zhutao Lu

This patch will fix all occurrences of the checkpatch warning:
	 WARNING: Missing a blank line after declarations
in drivers/staging/comedi/.

Signed-off-by: Andreas Siegling <andreas.siegling@fau.de>
Signed-off-by: Zhutao Lu <lvzhutao@gmail.com>
---
 drivers/staging/comedi/drivers/comedi_bond.c | 1 +
 drivers/staging/comedi/drivers/ni_stc.h      | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c
index 85b2f4a..221d381 100644
--- a/drivers/staging/comedi/drivers/comedi_bond.c
+++ b/drivers/staging/comedi/drivers/comedi_bond.c
@@ -261,6 +261,7 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it)
 			{
 				/* Append dev:subdev to devpriv->name */
 				char buf[20];
+
 				snprintf(buf, sizeof(buf), "%u:%u ",
 					 bdev->minor, bdev->subdev);
 				strlcat(devpriv->name, buf,
diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
index bb76fe1..3b8b3c5 100644
--- a/drivers/staging/comedi/drivers/ni_stc.h
+++ b/drivers/staging/comedi/drivers/ni_stc.h
@@ -326,6 +326,7 @@ static inline unsigned RTSI_Output_Bit(unsigned channel, int is_mseries)
 {
 	unsigned max_channel;
 	unsigned base_bit_shift;
+
 	if (is_mseries) {
 		base_bit_shift = 8;
 		max_channel = 7;
@@ -1142,6 +1143,7 @@ static inline unsigned MSeries_AI_Config_Bank_Bits(enum ni_reg_type reg_type,
 						   unsigned channel)
 {
 	unsigned bits = channel & 0x30;
+
 	if (reg_type == ni_reg_622x) {
 		if (channel & 0x40)
 			bits |= 0x400;
@@ -1191,6 +1193,7 @@ enum MSeries_PLL_Control_Bits {
 static inline unsigned MSeries_PLL_Divisor_Bits(unsigned divisor)
 {
 	static const unsigned max_divisor = 0x10;
+
 	if (divisor < 1 || divisor > max_divisor) {
 		pr_err("%s: bug, invalid divisor=%i\n", __func__, divisor);
 		return 0;
@@ -1201,6 +1204,7 @@ static inline unsigned MSeries_PLL_Divisor_Bits(unsigned divisor)
 static inline unsigned MSeries_PLL_Multiplier_Bits(unsigned multiplier)
 {
 	static const unsigned max_multiplier = 0x100;
+
 	if (multiplier < 1 || multiplier > max_multiplier) {
 		pr_err("%s: bug, invalid multiplier=%i\n", __func__,
 		       multiplier);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] comedi: checkpatch error: tabs instead of spaces
  2014-12-28 18:56 ` [PATCH 1/3] comedi: checkpatch error: tabs instead of spaces Andreas Siegling
@ 2014-12-30 22:40   ` Ian Abbott
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Abbott @ 2014-12-30 22:40 UTC (permalink / raw)
  To: Andreas Siegling, devel
  Cc: linux-kernel, hsweeten, gregkh, devel, linux-kernel,
	ebru.akagunduz, chase.southwood, rickard_strandqvist, Zhutao Lu

On 28/12/14 18:56, Andreas Siegling wrote:
> This patch fixes all occurrences of 8 whitespaces instead of a tab.
> It will remove the 8 whitespaces and replace them with a tab, thereby
> the checkpatch-error:
> 		ERROR: code indent should use tabs where possible
> is removed from all files in drivers/staging/comedi/
> It also brings some consistency of indentation in the comments.
>
> Signed-off-by: Andreas Siegling <andreas.siegling@fau.de>
> Signed-off-by: Zhutao Lu <lvzhutao@gmail.com>
> ---
>   drivers/staging/comedi/drivers/daqboard2000.c | 62 +++++++++++++--------------
>   drivers/staging/comedi/drivers/das16m1.c      |  4 +-
>   drivers/staging/comedi/drivers/dmm32at.c      |  2 +-
>   drivers/staging/comedi/drivers/pcl818.c       | 36 ++++++++--------
>   4 files changed, 52 insertions(+), 52 deletions(-)

Most of these aren't worth doing as they only affect multi-line comments 
that should be reformatted to the usual block comment style anyway.


> diff --git a/drivers/staging/comedi/drivers/dmm32at.c b/drivers/staging/comedi/drivers/dmm32at.c
> index 6df298a..31919b8 100644
> --- a/drivers/staging/comedi/drivers/dmm32at.c
> +++ b/drivers/staging/comedi/drivers/dmm32at.c
> @@ -365,7 +365,7 @@ static void dmm32at_setaitimer(struct comedi_device *dev, unsigned int nansec)
>   	/* enable the ai conversion interrupt and the clock to start scans */
>   	outb(DMM32AT_INTCLK_ADINT |
>   	     DMM32AT_INTCLK_CLKEN | DMM32AT_INTCLK_CLKSEL,
> -             dev->iobase + DMM32AT_INTCLK_REG);
> +	     dev->iobase + DMM32AT_INTCLK_REG);
>   }
>

That bit of the patch is fine, but has already been tackled in a patch 
by David Decotigny.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] comedi: checkpatch error/warning: spaces
  2014-12-28 18:56 ` [PATCH 2/3] comedi: checkpatch error/warning: spaces Andreas Siegling
@ 2014-12-30 22:51   ` Ian Abbott
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Abbott @ 2014-12-30 22:51 UTC (permalink / raw)
  To: Andreas Siegling, devel
  Cc: linux-kernel, hsweeten, gregkh, devel, linux-kernel,
	ebru.akagunduz, chase.southwood, rickard_strandqvist, Zhutao Lu

On 28/12/14 18:56, Andreas Siegling wrote:
> This patch will fix the following checkpatch errors/warnings in
> drivers/staging/comedi/ which are brought by wrong spacing:
> 	ERROR: trailing whitespace
> 	ERROR: space prohibited before that ',' (ctx:WxW)
> 	WARNING: please, no space before tabs
>
> Signed-off-by: Andreas Siegling <andreas.siegling@fau.de>
> Signed-off-by: Zhutao Lu <lvzhutao@gmail.com>
> ---
>   drivers/staging/comedi/drivers/daqboard2000.c | 2 +-
>   drivers/staging/comedi/drivers/das16m1.c      | 2 +-
>   drivers/staging/comedi/drivers/ni_at_a2150.c  | 2 +-
>   drivers/staging/comedi/drivers/ni_stc.h       | 4 ++--
>   drivers/staging/comedi/drivers/s626.c         | 2 +-
>   5 files changed, 6 insertions(+), 6 deletions(-)

Those should really be split into separate patches, but as for your 
PATCH 1/3 it's not worth fixing up the comments this way as they need 
reformatting anyway.

> diff --git a/drivers/staging/comedi/drivers/ni_at_a2150.c b/drivers/staging/comedi/drivers/ni_at_a2150.c
> index 69e543a..bff4852 100644
> --- a/drivers/staging/comedi/drivers/ni_at_a2150.c
> +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c
> @@ -108,7 +108,7 @@ TRIG_WAKE_EOS
>   #define   IRQ_LVL_BITS(x)		(((x) & 0xf) << 4)	/*  sets irq level */
>   #define   FIFO_INTR_EN_BIT		0x100	/*  enable fifo interrupts */
>   #define   FIFO_INTR_FHF_BIT		0x200	/*  interrupt fifo half full */
> -#define   DMA_INTR_EN_BIT 		0x800	/*  enable interrupt on dma terminal count */
> +#define   DMA_INTR_EN_BIT		0x800	/*  enable interrupt on dma terminal count */
>   #define   DMA_DEM_EN_BIT	0x1000	/*  enables demand mode dma */
>   #define I8253_BASE_REG		0x14
>   #define I8253_MODE_REG		0x17
> diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
> index bd69c3f..bb76fe1 100644
> --- a/drivers/staging/comedi/drivers/ni_stc.h
> +++ b/drivers/staging/comedi/drivers/ni_stc.h
> @@ -166,7 +166,7 @@ enum Interrupt_B_Ack_Bits {
>   #define AI_SCAN_IN_PROG_Pulse			_bit4
>   #define AI_EXTMUX_CLK_Pulse			_bit3
>   #define AI_LOCALMUX_CLK_Pulse			_bit2
> -#define AI_SC_TC_Pulse			 	_bit1
> +#define AI_SC_TC_Pulse				_bit1
>   #define AI_CONVERT_Pulse			_bit0
>
>   #define AO_Command_1_Register		9
> @@ -642,7 +642,7 @@ static unsigned AO_UPDATE_Output_Select(enum ao_update_output_selection
>   #define G_Load_Source_Select		_bit7
>   #define G_Reload_Source_Switching	_bit15
>   #define G_Loading_On_Gate		_bit14
> -#define G_Gate_Polarity 		_bit13
> +#define G_Gate_Polarity			_bit13
>
>   #define G_Counting_Once(a)		(((a)&0x03)<<10)
>   #define G_Stop_Mode(a)			(((a)&0x03)<<5)

Those parts of the patch are okay.

> diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c
> index 14932c5..fc497dd 100644
> --- a/drivers/staging/comedi/drivers/s626.c
> +++ b/drivers/staging/comedi/drivers/s626.c
> @@ -118,7 +118,7 @@ static void s626_mc_enable(struct comedi_device *dev,
>   static void s626_mc_disable(struct comedi_device *dev,
>   			    unsigned int cmd, unsigned int reg)
>   {
> -	writel(cmd << 16 , dev->mmio + reg);
> +	writel(cmd << 16, dev->mmio + reg);
>   	mmiowb();
>   }

That part of the patch has also been tackled in a separate patch by 
jitendra kumar khasdev.  Your patch predates it, but jitendra's patch is 
split better.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] comedi: checkpatch warning: missing blank line
  2014-12-28 18:56 ` [PATCH 3/3] comedi: checkpatch warning: missing blank line Andreas Siegling
@ 2014-12-30 22:52   ` Ian Abbott
  0 siblings, 0 replies; 7+ messages in thread
From: Ian Abbott @ 2014-12-30 22:52 UTC (permalink / raw)
  To: Andreas Siegling, devel
  Cc: linux-kernel, hsweeten, gregkh, devel, linux-kernel,
	ebru.akagunduz, chase.southwood, rickard_strandqvist, Zhutao Lu

On 28/12/14 18:56, Andreas Siegling wrote:
> This patch will fix all occurrences of the checkpatch warning:
> 	 WARNING: Missing a blank line after declarations
> in drivers/staging/comedi/.
>
> Signed-off-by: Andreas Siegling <andreas.siegling@fau.de>
> Signed-off-by: Zhutao Lu <lvzhutao@gmail.com>
> ---
>   drivers/staging/comedi/drivers/comedi_bond.c | 1 +
>   drivers/staging/comedi/drivers/ni_stc.h      | 4 ++++
>   2 files changed, 5 insertions(+)
>
> diff --git a/drivers/staging/comedi/drivers/comedi_bond.c b/drivers/staging/comedi/drivers/comedi_bond.c
> index 85b2f4a..221d381 100644
> --- a/drivers/staging/comedi/drivers/comedi_bond.c
> +++ b/drivers/staging/comedi/drivers/comedi_bond.c
> @@ -261,6 +261,7 @@ static int do_dev_config(struct comedi_device *dev, struct comedi_devconfig *it)
>   			{
>   				/* Append dev:subdev to devpriv->name */
>   				char buf[20];
> +
>   				snprintf(buf, sizeof(buf), "%u:%u ",
>   					 bdev->minor, bdev->subdev);
>   				strlcat(devpriv->name, buf,
> diff --git a/drivers/staging/comedi/drivers/ni_stc.h b/drivers/staging/comedi/drivers/ni_stc.h
> index bb76fe1..3b8b3c5 100644
> --- a/drivers/staging/comedi/drivers/ni_stc.h
> +++ b/drivers/staging/comedi/drivers/ni_stc.h
> @@ -326,6 +326,7 @@ static inline unsigned RTSI_Output_Bit(unsigned channel, int is_mseries)
>   {
>   	unsigned max_channel;
>   	unsigned base_bit_shift;
> +
>   	if (is_mseries) {
>   		base_bit_shift = 8;
>   		max_channel = 7;
> @@ -1142,6 +1143,7 @@ static inline unsigned MSeries_AI_Config_Bank_Bits(enum ni_reg_type reg_type,
>   						   unsigned channel)
>   {
>   	unsigned bits = channel & 0x30;
> +
>   	if (reg_type == ni_reg_622x) {
>   		if (channel & 0x40)
>   			bits |= 0x400;
> @@ -1191,6 +1193,7 @@ enum MSeries_PLL_Control_Bits {
>   static inline unsigned MSeries_PLL_Divisor_Bits(unsigned divisor)
>   {
>   	static const unsigned max_divisor = 0x10;
> +
>   	if (divisor < 1 || divisor > max_divisor) {
>   		pr_err("%s: bug, invalid divisor=%i\n", __func__, divisor);
>   		return 0;
> @@ -1201,6 +1204,7 @@ static inline unsigned MSeries_PLL_Divisor_Bits(unsigned divisor)
>   static inline unsigned MSeries_PLL_Multiplier_Bits(unsigned multiplier)
>   {
>   	static const unsigned max_multiplier = 0x100;
> +
>   	if (multiplier < 1 || multiplier > max_multiplier) {
>   		pr_err("%s: bug, invalid multiplier=%i\n", __func__,
>   		       multiplier);
>

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-12-30 22:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-28 18:56 comedi: checkpatch errors/warnings Andreas Siegling
2014-12-28 18:56 ` [PATCH 1/3] comedi: checkpatch error: tabs instead of spaces Andreas Siegling
2014-12-30 22:40   ` Ian Abbott
2014-12-28 18:56 ` [PATCH 2/3] comedi: checkpatch error/warning: spaces Andreas Siegling
2014-12-30 22:51   ` Ian Abbott
2014-12-28 18:56 ` [PATCH 3/3] comedi: checkpatch warning: missing blank line Andreas Siegling
2014-12-30 22:52   ` Ian Abbott

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.