public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Staging: comedi: addi_common.c: checkpatch.pl fixes
@ 2013-01-05 14:12 Lijo Antony
  2013-01-05 14:12 ` [PATCH 2/2] Staging: comedi: addi_common.h: " Lijo Antony
  0 siblings, 1 reply; 5+ messages in thread
From: Lijo Antony @ 2013-01-05 14:12 UTC (permalink / raw)
  To: gregkh; +Cc: abbotti, fmhess, devel, linux-kernel, Lijo Antony

checkpatch.pl style fixes:
- Broken license text into 80 char lines
- fixed two space before tab issues
- Removed unnecessary braces from if-else

Signed-off-by: Lijo Antony <lijo.kernel@gmail.com>
---
 .../staging/comedi/drivers/addi-data/addi_common.c |   26 +++++++++++++-------
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c
index 90cc432..1051fa5 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_common.c
+++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c
@@ -11,13 +11,21 @@ Copyright (C) 2004,2005  ADDI-DATA GmbH for the source code of this module.
 	http://www.addi-data.com
 	info@addi-data.com
 
-This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation; either version 2 of the License, or (at your option) any later
+version.
 
-This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
 
-You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+You should have received a copy of the GNU General Public License along with
+this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
-You should also find the complete GPL in the COPYING file accompanying this source code.
+You should also find the complete GPL in the COPYING file accompanying this
+source code.
 
 @endverbatim
 */
@@ -29,10 +37,10 @@ You should also find the complete GPL in the COPYING file accompanying this sour
   | Tel : +49 (0) 7223/9493-0     | email    : info@addi-data.com         |
   | Fax : +49 (0) 7223/9493-92    | Internet : http://www.addi-data.com   |
   +-----------------------------------------------------------------------+
-  | Project   : ADDI DATA         | Compiler : GCC 		          |
+  | Project   : ADDI DATA         | Compiler : GCC                        |
   | Modulname : addi_common.c     | Version  : 2.96                       |
   +-------------------------------+---------------------------------------+
-  | Author    :           | Date     :                    		  |
+  | Author    :           | Date     :                                    |
   +-----------------------------------------------------------------------+
   | Description : ADDI COMMON Main Module                                 |
   +-----------------------------------------------------------------------+
@@ -167,11 +175,11 @@ static int addi_auto_attach(struct comedi_device *dev,
 	if (this_board->i_PCIEeprom) {
 		if (!(strcmp(this_board->pc_EepromChip, "S5920"))) {
 			/*  Set 3 wait stait */
-			if (!(strcmp(dev->board_name, "apci035"))) {
+			if (!(strcmp(dev->board_name, "apci035")))
 				outl(0x80808082, devpriv->i_IobaseAmcc + 0x60);
-			} else {
+			else
 				outl(0x83838383, devpriv->i_IobaseAmcc + 0x60);
-			}
+
 			/*  Enable the interrupt for the controller */
 			dw_Dummy = inl(devpriv->i_IobaseAmcc + 0x38);
 			outl(dw_Dummy | 0x2000, devpriv->i_IobaseAmcc + 0x38);
-- 
1.7.10.4


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

* [PATCH 2/2] Staging: comedi: addi_common.h: checkpatch.pl fixes
  2013-01-05 14:12 [PATCH 1/2] Staging: comedi: addi_common.c: checkpatch.pl fixes Lijo Antony
@ 2013-01-05 14:12 ` Lijo Antony
  2013-01-07 22:39   ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Lijo Antony @ 2013-01-05 14:12 UTC (permalink / raw)
  To: gregkh; +Cc: abbotti, fmhess, devel, linux-kernel, Lijo Antony

Reduced line lengths to 80 chars by removing extra spaces.

Signed-off-by: Lijo Antony <lijo.kernel@gmail.com>
---
 .../staging/comedi/drivers/addi-data/addi_common.h |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.h b/drivers/staging/comedi/drivers/addi-data/addi_common.h
index 6d8b29f94..1996a68 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_common.h
+++ b/drivers/staging/comedi/drivers/addi-data/addi_common.h
@@ -298,7 +298,7 @@ struct addi_private {
 	unsigned char b_AiInitialisation;
 	unsigned int ui_AiActualScan;	/* how many scans we finished */
 	unsigned int ui_AiBufferPtr;	/*  data buffer ptr in samples */
-	unsigned int ui_AiNbrofChannels;	/*  how many channels is measured */
+	unsigned int ui_AiNbrofChannels; /*  how many channels is measured */
 	unsigned int ui_AiScanLength;	/*  Length of actual scanlist */
 	unsigned int ui_AiActualScanPosition;	/*  position in actual scan */
 	unsigned int *pui_AiChannelList;	/*  actual chanlist */
@@ -313,14 +313,14 @@ struct addi_private {
 	short *AiData;	/*  Pointer to sample data */
 	unsigned int ui_AiNbrofScans;	/*  number of scans to do */
 	unsigned short us_UseDma;	/*  To use Dma or not */
-	unsigned char b_DmaDoubleBuffer;	/*  we can use double buffering */
+	unsigned char b_DmaDoubleBuffer; /*  we can use double buffering */
 	unsigned int ui_DmaActualBuffer;	/*  which buffer is used now */
 	/* UPDATE-0.7.57->0.7.68 */
 	/* unsigned int               ul_DmaBufferVirtual[2]; pointers to begin of DMA buffer */
 	short *ul_DmaBufferVirtual[2];	/*  pointers to begin of DMA buffer */
 	unsigned int ul_DmaBufferHw[2];	/*  hw address of DMA buff */
-	unsigned int ui_DmaBufferSize[2];	/*  size of dma buffer in bytes */
-	unsigned int ui_DmaBufferUsesize[2];	/*  which size we may now used for transfer */
+	unsigned int ui_DmaBufferSize[2]; /*  size of dma buffer in bytes */
+	unsigned int ui_DmaBufferUsesize[2]; /* size we may use for transfer */
 	unsigned int ui_DmaBufferSamples[2];	/*  size in samples */
 	unsigned int ui_DmaBufferPages[2];	/*  number of pages in buffer */
 	unsigned char b_DigitalOutputRegister;	/*  Digital Output Register */
@@ -331,13 +331,13 @@ struct addi_private {
 	unsigned char b_ModeSelectRegister;	/*  Contain data written at iobase + 0E */
 	unsigned short us_OutputRegister;	/*  Contain data written at iobase + 0 */
 	unsigned char b_InterruptState;
-	unsigned char b_TimerInit;	/*  Specify if InitTimerWatchdog was load */
-	unsigned char b_TimerStarted;	/*  Specify if timer 2 is running or not */
+	unsigned char b_TimerInit; /*  Specify if InitTimerWatchdog was load */
+	unsigned char b_TimerStarted; /* Specify if timer 2 is running or not */
 	unsigned char b_Timer2Mode;	/*  Specify the timer 2 mode */
 	unsigned char b_Timer2Interrupt;	/* Timer2  interrupt enable or disable */
-	unsigned char b_AiCyclicAcquisition;	/*  indicate cyclic acquisition */
+	unsigned char b_AiCyclicAcquisition; /*  indicate cyclic acquisition */
 	unsigned char b_InterruptMode;	/*  eoc eos or dma */
-	unsigned char b_EocEosInterrupt;	/*  Enable disable eoc eos interrupt */
+	unsigned char b_EocEosInterrupt; /*  Enable disable eoc eos interrupt */
 	unsigned int ui_EocEosConversionTime;
 	unsigned char b_EocEosConversionTimeBase;
 	unsigned char b_SingelDiff;
@@ -353,7 +353,7 @@ struct addi_private {
 		unsigned char b_InterruptNbr;	/* Board interrupt number */
 		unsigned char b_SlotNumber;	/* PCI slot number */
 		unsigned char b_BoardVersion;
-		unsigned int dw_MolduleConfiguration[4];	/* Module config */
+		unsigned int dw_MolduleConfiguration[4];  /* Module config */
 	} s_BoardInfos;
 
 	/* Interrupt infos */
@@ -364,7 +364,7 @@ struct addi_private {
 		unsigned int ui_Write;	/* Write FIFO */
 		struct {
 			unsigned char b_OldModuleMask;
-			unsigned int ul_OldInterruptMask;	/* Interrupt mask */
+			unsigned int ul_OldInterruptMask;  /* Interrupt mask */
 			unsigned int ul_OldCounterLatchValue;	/* Interrupt counter value */
 		} s_FIFOInterruptParameters[APCI1710_SAVE_INTERRUPT];
 	} s_InterruptParameters;
-- 
1.7.10.4


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

* Re: [PATCH 2/2] Staging: comedi: addi_common.h: checkpatch.pl fixes
  2013-01-05 14:12 ` [PATCH 2/2] Staging: comedi: addi_common.h: " Lijo Antony
@ 2013-01-07 22:39   ` Greg KH
  2013-01-07 22:50     ` H Hartley Sweeten
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2013-01-07 22:39 UTC (permalink / raw)
  To: Lijo Antony; +Cc: abbotti, fmhess, devel, linux-kernel

On Sat, Jan 05, 2013 at 06:12:55PM +0400, Lijo Antony wrote:
> Reduced line lengths to 80 chars by removing extra spaces.
> 
> Signed-off-by: Lijo Antony <lijo.kernel@gmail.com>
> ---
>  .../staging/comedi/drivers/addi-data/addi_common.h |   20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.h b/drivers/staging/comedi/drivers/addi-data/addi_common.h
> index 6d8b29f94..1996a68 100644
> --- a/drivers/staging/comedi/drivers/addi-data/addi_common.h
> +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.h
> @@ -298,7 +298,7 @@ struct addi_private {
>  	unsigned char b_AiInitialisation;
>  	unsigned int ui_AiActualScan;	/* how many scans we finished */
>  	unsigned int ui_AiBufferPtr;	/*  data buffer ptr in samples */
> -	unsigned int ui_AiNbrofChannels;	/*  how many channels is measured */
> +	unsigned int ui_AiNbrofChannels; /*  how many channels is measured */
>  	unsigned int ui_AiScanLength;	/*  Length of actual scanlist */
>  	unsigned int ui_AiActualScanPosition;	/*  position in actual scan */
>  	unsigned int *pui_AiChannelList;	/*  actual chanlist */
> @@ -313,14 +313,14 @@ struct addi_private {
>  	short *AiData;	/*  Pointer to sample data */
>  	unsigned int ui_AiNbrofScans;	/*  number of scans to do */
>  	unsigned short us_UseDma;	/*  To use Dma or not */
> -	unsigned char b_DmaDoubleBuffer;	/*  we can use double buffering */
> +	unsigned char b_DmaDoubleBuffer; /*  we can use double buffering */
>  	unsigned int ui_DmaActualBuffer;	/*  which buffer is used now */
>  	/* UPDATE-0.7.57->0.7.68 */
>  	/* unsigned int               ul_DmaBufferVirtual[2]; pointers to begin of DMA buffer */
>  	short *ul_DmaBufferVirtual[2];	/*  pointers to begin of DMA buffer */
>  	unsigned int ul_DmaBufferHw[2];	/*  hw address of DMA buff */
> -	unsigned int ui_DmaBufferSize[2];	/*  size of dma buffer in bytes */
> -	unsigned int ui_DmaBufferUsesize[2];	/*  which size we may now used for transfer */
> +	unsigned int ui_DmaBufferSize[2]; /*  size of dma buffer in bytes */
> +	unsigned int ui_DmaBufferUsesize[2]; /* size we may use for transfer */
>  	unsigned int ui_DmaBufferSamples[2];	/*  size in samples */
>  	unsigned int ui_DmaBufferPages[2];	/*  number of pages in buffer */
>  	unsigned char b_DigitalOutputRegister;	/*  Digital Output Register */
> @@ -331,13 +331,13 @@ struct addi_private {
>  	unsigned char b_ModeSelectRegister;	/*  Contain data written at iobase + 0E */
>  	unsigned short us_OutputRegister;	/*  Contain data written at iobase + 0 */
>  	unsigned char b_InterruptState;
> -	unsigned char b_TimerInit;	/*  Specify if InitTimerWatchdog was load */
> -	unsigned char b_TimerStarted;	/*  Specify if timer 2 is running or not */
> +	unsigned char b_TimerInit; /*  Specify if InitTimerWatchdog was load */

As you didn't do this for all fields in the structure, it's not really
worth doing it for just these, right?

The proper thing to do is use kerneldoc format and document it all at
the top of the structure, care to do that instead?

thanks,

greg k-h

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

* RE: [PATCH 2/2] Staging: comedi: addi_common.h: checkpatch.pl fixes
  2013-01-07 22:39   ` Greg KH
@ 2013-01-07 22:50     ` H Hartley Sweeten
  2013-01-08  5:42       ` Lijo Antony
  0 siblings, 1 reply; 5+ messages in thread
From: H Hartley Sweeten @ 2013-01-07 22:50 UTC (permalink / raw)
  To: Greg KH, Lijo Antony
  Cc: devel@driverdev.osuosl.org, fmhess@users.sourceforge.net,
	abbotti@mev.co.uk, linux-kernel@vger.kernel.org

On Monday, January 07, 2013 3:40 PM, Greg KH wrote:
> On Sat, Jan 05, 2013 at 06:12:55PM +0400, Lijo Antony wrote:
>> Reduced line lengths to 80 chars by removing extra spaces.
>> 
>> Signed-off-by: Lijo Antony <lijo.kernel@gmail.com>
>> ---
>>  .../staging/comedi/drivers/addi-data/addi_common.h |   20 ++++++++++----------
>>  1 file changed, 10 insertions(+), 10 deletions(-)

<snip>

> As you didn't do this for all fields in the structure, it's not really
> worth doing it for just these, right?
>
> The proper thing to do is use kerneldoc format and document it all at
> the top of the structure, care to do that instead?

Hopefully I will soon get the rest of the addi-data drivers split off of the
addi_common stuff. This will effectively remove this header file so I'm
not sure it's worth making patches against it.

Regards,
Hartley


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

* Re: [PATCH 2/2] Staging: comedi: addi_common.h: checkpatch.pl fixes
  2013-01-07 22:50     ` H Hartley Sweeten
@ 2013-01-08  5:42       ` Lijo Antony
  0 siblings, 0 replies; 5+ messages in thread
From: Lijo Antony @ 2013-01-08  5:42 UTC (permalink / raw)
  To: H Hartley Sweeten
  Cc: Greg KH, devel@driverdev.osuosl.org, fmhess@users.sourceforge.net,
	abbotti@mev.co.uk, linux-kernel@vger.kernel.org

On 01/08/2013 02:50 AM, H Hartley Sweeten wrote:
> On Monday, January 07, 2013 3:40 PM, Greg KH wrote:
>> On Sat, Jan 05, 2013 at 06:12:55PM +0400, Lijo Antony wrote:
>>> Reduced line lengths to 80 chars by removing extra spaces.
>>>
>>> Signed-off-by: Lijo Antony <lijo.kernel@gmail.com>
>>> ---
>>>   .../staging/comedi/drivers/addi-data/addi_common.h |   20 ++++++++++----------
>>>   1 file changed, 10 insertions(+), 10 deletions(-)
>
> <snip>
>
>> As you didn't do this for all fields in the structure, it's not really
>> worth doing it for just these, right?
>>
>> The proper thing to do is use kerneldoc format and document it all at
>> the top of the structure, care to do that instead?
>
> Hopefully I will soon get the rest of the addi-data drivers split off of the
> addi_common stuff. This will effectively remove this header file so I'm
> not sure it's worth making patches against it.

Ok, I will wait!
If the file is still around after your cleanup, I will make changes as 
per Greg's suggestion.

Thanks,
-lijo



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

end of thread, other threads:[~2013-01-08  5:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-05 14:12 [PATCH 1/2] Staging: comedi: addi_common.c: checkpatch.pl fixes Lijo Antony
2013-01-05 14:12 ` [PATCH 2/2] Staging: comedi: addi_common.h: " Lijo Antony
2013-01-07 22:39   ` Greg KH
2013-01-07 22:50     ` H Hartley Sweeten
2013-01-08  5:42       ` Lijo Antony

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