public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] Staging: comedi: fix tabulation and over 80 chars issues in amplc_pci224.c This is a patch to the amplc_pci224.c file that fixes up tabulation style errors and over 80 chars warning found by the checkpatch.pl tool Signed-off-by: Stephane Pajot <pajot.stephane@gmail.com>
@ 2011-05-12 16:44 Stephane Pajot
  2011-05-12 17:23 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Stephane Pajot @ 2011-05-12 16:44 UTC (permalink / raw)
  To: gregkh, arun.thomas; +Cc: devel, linux-kernel, Stephane Pajot

---
 drivers/staging/comedi/drivers/amplc_pci224.c |   63 +++++++++++++------------
 1 files changed, 33 insertions(+), 30 deletions(-)

diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c
index 1b5ba1c..2f61358 100644
--- a/drivers/staging/comedi/drivers/amplc_pci224.c
+++ b/drivers/staging/comedi/drivers/amplc_pci224.c
@@ -52,33 +52,33 @@ Supports:
 Configuration options - PCI224:
   [0] - PCI bus of device (optional).
   [1] - PCI slot of device (optional).
-          If bus/slot is not specified, the first available PCI device
-          will be used.
+	If bus/slot is not specified, the first available PCI device
+	will be used.
   [2] - Select available ranges according to jumper LK1.  All channels
-        are set to the same range:
-        0=Jumper position 1-2 (factory default), 4 software-selectable
-          internal voltage references, giving 4 bipolar and 4 unipolar
-          ranges:
-            [-10V,+10V], [-5V,+5V], [-2.5V,+2.5V], [-1.25V,+1.25V],
-            [0,+10V], [0,+5V], [0,+2.5V], [0,1.25V].
-        1=Jumper position 2-3, 1 external voltage reference, giving
-          1 bipolar and 1 unipolar range:
-            [-Vext,+Vext], [0,+Vext].
+	are set to the same range :
+	0 = Jumper position 1-2 (factory default), 4 software-selectable
+	internal voltage references, giving 4 bipolar and 4 unipolar
+	ranges :
+	[-10V, + 10V][-5V, + 5V][-2.5V, + 2.5V][-1.25V, + 1.25V]
+	[0, + 10V][0, + 5V][0, + 2.5V][0, 1.25V].
+	1 = Jumper position 2-3, 1 external voltage reference, giving
+	1 bipolar and 1 unipolar range :
+	[-Vext, + Vext][0, + Vext].
 
 Configuration options - PCI234:
   [0] - PCI bus of device (optional).
   [1] - PCI slot of device (optional).
-          If bus/slot is not specified, the first available PCI device
-          will be used.
+	If bus/slot is not specified, the first available PCI device
+	will be used.
   [2] - Select internal or external voltage reference according to
-        jumper LK1.  This affects all channels:
-        0=Jumper position 1-2 (factory default), Vref=5V internal.
-        1=Jumper position 2-3, Vref=Vext external.
+	jumper LK1.  This affects all channels :
+	0 = Jumper position 1-2 (factory default), Vref = 5V internal.
+	1 = Jumper position 2-3, Vref = Vext external.
   [3] - Select channel 0 range according to jumper LK2:
-        0=Jumper position 2-3 (factory default), range [-2*Vref,+2*Vref]
-          (10V bipolar when options[2]=0).
-        1=Jumper position 1-2, range [-Vref,+Vref]
-          (5V bipolar when options[2]=0).
+	0 = Jumper position 2-3 (factory default), range[-2*Vref, + 2*Vref]
+	(10V bipolar when options[2] = 0).
+	1 = Jumper position 1-2, range[-Vref, + Vref]
+	(5V bipolar when options[2] = 0).
   [4] - Select channel 1 range according to jumper LK3: cf. options[3].
   [5] - Select channel 2 range according to jumper LK4: cf. options[3].
   [6] - Select channel 3 range according to jumper LK5: cf. options[3].
@@ -401,7 +401,8 @@ MODULE_DEVICE_TABLE(pci, pci224_pci_table);
 
 /* this structure is for data unique to this hardware driver.  If
    several hardware drivers keep similar information in this structure,
-   feel free to suggest moving the variable to the struct comedi_device struct.  */
+   feel free to suggest moving the variable
+   to the struct comedi_device struct.  */
 struct pci224_private {
 	struct pci_dev *pci_dev;	/* PCI device */
 	const unsigned short *hwrange;
@@ -678,12 +679,14 @@ static void pci224_ao_handle_fifo(struct comedi_device *dev,
 	switch (dacstat & PCI224_DACCON_FIFOFL_MASK) {
 	case PCI224_DACCON_FIFOFL_EMPTY:
 		room = PCI224_FIFO_ROOM_EMPTY;
-		if (!devpriv->ao_stop_continuous && devpriv->ao_stop_count == 0) {
-			/* FIFO empty at end of counted acquisition. */
-			pci224_ao_stop(dev, s);
-			s->async->events |= COMEDI_CB_EOA;
-			comedi_event(dev, s);
-			return;
+		if (!devpriv->ao_stop_continuous == 0) {
+			if (devpriv->ao_stop_count == 0) {
+				/* FIFO empty at end of counted acquisition. */
+				pci224_ao_stop(dev, s);
+				s->async->events |= COMEDI_CB_EOA;
+				comedi_event(dev, s);
+				return;
+			}
 		}
 		break;
 	case PCI224_DACCON_FIFOFL_ONETOHALF:
@@ -912,9 +915,9 @@ pci224_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
 		if ((cmd->scan_begin_arg & CR_FLAGS_MASK &
 		     ~(CR_EDGE | CR_INVERT)) != 0) {
 			cmd->scan_begin_arg = COMBINE(cmd->scan_begin_arg, 0,
-						      CR_FLAGS_MASK & ~(CR_EDGE
-									|
-									CR_INVERT));
+						CR_FLAGS_MASK & ~(CR_EDGE
+						|
+						CR_INVERT));
 			err++;
 		}
 		break;
-- 
1.7.1


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

* Re: [PATCH 2/2] Staging: comedi: fix tabulation and over 80 chars issues in amplc_pci224.c This is a patch to the amplc_pci224.c file that fixes up tabulation style errors and over 80 chars warning found by the checkpatch.pl tool Signed-off-by: Stephane Pajot <pajot.stephane@gmail.com>
  2011-05-12 16:44 [PATCH 2/2] Staging: comedi: fix tabulation and over 80 chars issues in amplc_pci224.c This is a patch to the amplc_pci224.c file that fixes up tabulation style errors and over 80 chars warning found by the checkpatch.pl tool Signed-off-by: Stephane Pajot <pajot.stephane@gmail.com> Stephane Pajot
@ 2011-05-12 17:23 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2011-05-12 17:23 UTC (permalink / raw)
  To: Stephane Pajot; +Cc: arun.thomas, devel, linux-kernel

On Thu, May 12, 2011 at 06:44:58PM +0200, Stephane Pajot wrote:
> ---
>  drivers/staging/comedi/drivers/amplc_pci224.c |   63 +++++++++++++------------
>  1 files changed, 33 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c
> index 1b5ba1c..2f61358 100644
> --- a/drivers/staging/comedi/drivers/amplc_pci224.c
> +++ b/drivers/staging/comedi/drivers/amplc_pci224.c
> @@ -52,33 +52,33 @@ Supports:
>  Configuration options - PCI224:
>    [0] - PCI bus of device (optional).
>    [1] - PCI slot of device (optional).
> -          If bus/slot is not specified, the first available PCI device
> -          will be used.
> +	If bus/slot is not specified, the first available PCI device
> +	will be used.

Why did you change these comment lines?

> @@ -401,7 +401,8 @@ MODULE_DEVICE_TABLE(pci, pci224_pci_table);
>  
>  /* this structure is for data unique to this hardware driver.  If
>     several hardware drivers keep similar information in this structure,
> -   feel free to suggest moving the variable to the struct comedi_device struct.  */
> +   feel free to suggest moving the variable
> +   to the struct comedi_device struct.  */

If you are going to change a multi-line comment like this, please use
the proper formatting for it.  Your change didn't really help anything
here.

>  struct pci224_private {
>  	struct pci_dev *pci_dev;	/* PCI device */
>  	const unsigned short *hwrange;
> @@ -678,12 +679,14 @@ static void pci224_ao_handle_fifo(struct comedi_device *dev,
>  	switch (dacstat & PCI224_DACCON_FIFOFL_MASK) {
>  	case PCI224_DACCON_FIFOFL_EMPTY:
>  		room = PCI224_FIFO_ROOM_EMPTY;
> -		if (!devpriv->ao_stop_continuous && devpriv->ao_stop_count == 0) {
> -			/* FIFO empty at end of counted acquisition. */
> -			pci224_ao_stop(dev, s);
> -			s->async->events |= COMEDI_CB_EOA;
> -			comedi_event(dev, s);
> -			return;
> +		if (!devpriv->ao_stop_continuous == 0) {
> +			if (devpriv->ao_stop_count == 0) {

You just changed the logic of this if statment, not good at all.

thanks,

greg k-h

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

end of thread, other threads:[~2011-05-12 17:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-12 16:44 [PATCH 2/2] Staging: comedi: fix tabulation and over 80 chars issues in amplc_pci224.c This is a patch to the amplc_pci224.c file that fixes up tabulation style errors and over 80 chars warning found by the checkpatch.pl tool Signed-off-by: Stephane Pajot <pajot.stephane@gmail.com> Stephane Pajot
2011-05-12 17:23 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox