Skip to contentSkip to conversation

staging: comedi: dmm32at: fix style issues

PATCH In review David Decotigny 3 participants 5 messages Dec 25, 2014 – Dec 30, 2014 1 message not in the archive Staging

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 staging: comedi: dmm32at: fix style issues

Before:
1 ERROR: code indent should use tabs where possible 1 WARNING: please, no spaces at the start of a line

After:
(none)

---
 drivers/staging/comedi/drivers/dmm32at.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/drivers/dmm32at.c +1 -1
index 6df298a..31919b8 100644
@@ -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)
Signature · 1 line
2.2.0.rc0.207.ga3a616c
#1 lore raw
Quoted 17 lines · David Decotigny

Before:
1 ERROR: code indent should use tabs where possible 1 WARNING: please, no spaces at the start of a line

After:
(none)

---
 drivers/staging/comedi/drivers/dmm32at.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/drivers/dmm32at.c +0 -0
index 6df298a..31919b8 100644

drivers/staging/comedi/drivers/dmm32at.c static void dmm32at_setaitimer(struct comedi_device *dev, unsigned int nansec) · line 368

Quoted 5 lines
drivers/staging/comedi/drivers/dmm32at.c +1 -1
@@ -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);

another suggestion:
if you do like the following patch (use 2 tabs) then you do not need to give spaces to indent the code.

drivers/staging/comedi/drivers/dmm32at.c +0 -0
index 6df298a..cedf8ed 100644
@@ -364,8 +364,8 @@ 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);
+ DMM32AT_INTCLK_CLKEN | DMM32AT_INTCLK_CLKSEL,
+ dev->iobase + DMM32AT_INTCLK_REG);
}

static int dmm32at_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)

thanks
sudip

Quoted 11 lines
drivers/staging/comedi/drivers/dmm32at.c +0 -0
 }
 
 static int dmm32at_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
Signature · 7 lines
2.2.0.rc0.207.ga3a616c

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
#2 lore raw

thanks! I have a preference for the v2 I sent: my $EDITOR handles the indentation for me; using 2 tabs forces me to manually override my editor's behavior. But if there is a strong push for a v3 of this patch with 2 tabs instead of current v2 indentation, I'll do it, please let me know.

Quoted 58 lines · Sudip Mukherjee
Quoted 17 lines · David Decotigny

Before:
1 ERROR: code indent should use tabs where possible 1 WARNING: please, no spaces at the start of a line

After:
(none)

---
 drivers/staging/comedi/drivers/dmm32at.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/drivers/dmm32at.c +0 -0
index 6df298a..31919b8 100644

drivers/staging/comedi/drivers/dmm32at.c static void dmm32at_setaitimer(struct comedi_device *dev, unsigned int nansec) · line 368

Quoted 5 lines
drivers/staging/comedi/drivers/dmm32at.c +1 -1
@@ -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);

another suggestion:
if you do like the following patch (use 2 tabs) then you do not need to give spaces to indent the code.

drivers/staging/comedi/drivers/dmm32at.c +2 -2
index 6df298a..cedf8ed 100644
@@ -364,8 +364,8 @@ 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);
+               DMM32AT_INTCLK_CLKEN | DMM32AT_INTCLK_CLKSEL,
+               dev->iobase + DMM32AT_INTCLK_REG);
 }
 
 static int dmm32at_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)

thanks
sudip

Quoted 11 lines
drivers/staging/comedi/drivers/dmm32at.c +0 -1
 }
 
 static int dmm32at_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
--

2.2.0.rc0.207.ga3a616c

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

A message that is not in the archive (sent off-list or not yet received): CAG88wWZjqr8U=TtSaTGHnn=05d2QFQ3en7ndeK2sPq+-PFT=0w@mail.gmail.com

#4 lore raw
Quoted 4 lines · David Decotigny

thanks! I have a preference for the v2 I sent: my $EDITOR handles the indentation for me; using 2 tabs forces me to manually override my editor's behavior. But if there is a strong push for a v3 of this patch with 2 tabs instead of current v2 indentation, I'll do it, please let me know.

well, if you check CodingStyle in Documentation, it clearly says:
"Outside of comments, documentation and except in Kconfig, spaces are never used for indentation".

Sudip

Quoted 73 lines
Quoted 69 lines · Sudip Mukherjee
Quoted 7 lines · David Decotigny

Before:
1 ERROR: code indent should use tabs where possible 1 WARNING: please, no spaces at the start of a line

After:
(none)

Review

Quoted 6 lines
---
 drivers/staging/comedi/drivers/dmm32at.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/staging/comedi/drivers/dmm32at.c

drivers/staging/comedi/drivers/dmm32at.c static void dmm32at_setaitimer(struct comedi_device

Quoted 4 lines

index 6df298a..31919b8 100644

drivers/staging/comedi/drivers/dmm32at.c +0 -0
@@ -365,7 +365,7 @@ static void dmm32at_setaitimer(struct comedi_device

*dev, unsigned int nansec)

drivers/staging/comedi/drivers/dmm32at.c static void dmm32at_setaitimer(struct comedi_device · line 365

Quoted 1 line
drivers/staging/comedi/drivers/dmm32at.c +0 -0
      /* enable the ai conversion interrupt and the clock to start scans

*/

drivers/staging/comedi/drivers/dmm32at.c static void dmm32at_setaitimer(struct comedi_device · line 368

Quoted 4 lines
drivers/staging/comedi/drivers/dmm32at.c +1 -1
      outb(DMM32AT_INTCLK_ADINT |
           DMM32AT_INTCLK_CLKEN | DMM32AT_INTCLK_CLKSEL,
-             dev->iobase + DMM32AT_INTCLK_REG);
+          dev->iobase + DMM32AT_INTCLK_REG);

another suggestion:
if you do like the following patch (use 2 tabs) then you do not need to give spaces to indent the code.

drivers/staging/comedi/drivers/dmm32at.c +2 -2
index 6df298a..cedf8ed 100644
@@ -364,8 +364,8 @@ 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);
+               DMM32AT_INTCLK_CLKEN | DMM32AT_INTCLK_CLKSEL,
+               dev->iobase + DMM32AT_INTCLK_REG);
 }

static int dmm32at_ai_cmd(struct comedi_device *dev, struct
comedi_subdevice *s)

thanks
sudip

drivers/staging/comedi/drivers/dmm32at.c static void dmm32at_setaitimer(struct comedi_device · line 371

Quoted 3 lines
drivers/staging/comedi/drivers/dmm32at.c +0 -0
 }
 
 static int dmm32at_ai_cmd(struct comedi_device *dev, struct

comedi_subdevice *s)

Quoted 5 lines

--
2.2.0.rc0.207.ga3a616c

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel"

in

Quoted 3 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Reviewed-by on v2 1/1
#5 lore raw
In reply to David Decotigny
Quoted 18 lines · David Decotigny

Before:
1 ERROR: code indent should use tabs where possible 1 WARNING: please, no spaces at the start of a line

After:

   (none)
---
  drivers/staging/comedi/drivers/dmm32at.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/comedi/drivers/dmm32at.c +0 -0
index 6df298a..31919b8 100644

drivers/staging/comedi/drivers/dmm32at.c static void dmm32at_setaitimer(struct comedi_device *dev, unsigned int nansec) · line 371

Quoted 8 lines
drivers/staging/comedi/drivers/dmm32at.c +1 -1
@@ -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)
Signature · 2 lines
-=( Ian Abbott @ MEV Ltd.    E-mail: <[email protected]> )=-
-=(                          Web: http://www.mev.co.uk/  )=-