Re: Staging: comedi: fix bracing and 80 character style in ni_at_a2150.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 12, 2010 at 11:05:37PM +0000, Graham M Howe wrote:
> 
> This is a patch to the ni_at_a2150.c file to fix up bracing and 80 character
> warnings found by the checkpatch.pl tool
> 
> Signed-off-by: Graham M Howe <gman.1352@xxxxxxxxxxxxxx>
> 
> ---
>  drivers/staging/comedi/drivers/ni_at_a2150.c |   78 ++++++++++++++-------------
>  1 file changed, 43 insertions(+), 35 deletions(-)
> 
> --- a/drivers/staging/comedi/drivers/ni_at_a2150.c
> +++ b/drivers/staging/comedi/drivers/ni_at_a2150.c
> @@ -86,8 +86,10 @@ TRIG_WAKE_EOS
>  #define   CLOCK_SELECT_BITS(x)		(((x) & 0x3) << 3)
>  #define   CLOCK_DIVISOR_BITS(x)		(((x) & 0x3) << 5)
>  #define   CLOCK_MASK		(0xf << 3)
> -#define   ENABLE0_BIT		0x80	/*  enable (don't internally ground) channels 0 and 1 */
> -#define   ENABLE1_BIT		0x100	/*  enable (don't internally ground) channels 2 and 3 */
> +/*  enable (don't internally ground) channels 0 and 1 */
> +#define   ENABLE0_BIT		0x80
> +/*  enable (don't internally ground) channels 2 and 3 */
> +#define   ENABLE1_BIT		0x100
>  #define   AC0_BIT		0x200	/*  ac couple channels 0,1 */
>  #define   AC1_BIT		0x400	/*  ac couple channels 2,3 */
>  #define   APD_BIT		0x800	/*  analog power down */
> @@ -99,26 +101,29 @@ TRIG_WAKE_EOS
>  #define FIFO_START_REG		0x6	/*  software start aquistion trigger */
>  #define FIFO_RESET_REG		0x8	/*  clears fifo + fifo flags */
>  #define FIFO_DATA_REG		0xa	/*  read data */
> -#define DMA_TC_CLEAR_REG		0xe	/*  clear dma terminal count interrupt */
> +#define DMA_TC_CLEAR_REG	0xe	/* clear dma terminal count interrupt*/
>  #define STATUS_REG		0x12	/*  read only */
>  #define   FNE_BIT		0x1	/*  fifo not empty */
>  #define   OVFL_BIT		0x8	/*  fifo overflow */
>  #define   EDAQ_BIT		0x10	/*  end of aquisition interrupt */
>  #define   DCAL_BIT		0x20	/*  offset calibration in progress */
>  #define   INTR_BIT		0x40	/*  interrupt has occured */
> -#define   DMA_TC_BIT		0x80	/*  dma terminal count interrupt has occured */
> +#define   DMA_TC_BIT		0x80	/*  dma terminal count interrupt
> +							has occured */
>  #define   ID_BITS(x)	(((x) >> 8) & 0x3)
>  #define IRQ_DMA_CNTRL_REG		0x12	/*  write only */
>  #define   DMA_CHAN_BITS(x)		((x) & 0x7)	/*  sets dma channel */
>  #define   DMA_EN_BIT		0x8	/*  enables dma */
> -#define   IRQ_LVL_BITS(x)		(((x) & 0xf) << 4)	/*  sets irq level */
> +#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
> -#define   HW_COUNT_DISABLE		0x30	/*  disable hardware counting of conversions */
> +#define   HW_COUNT_DISABLE	0x30	/*  disable hardware counting of
> +							conversions */
>  
>  struct a2150_board {
>  	const char *name;
> @@ -158,8 +163,8 @@ static const struct a2150_board a2150_bo
>  #define thisboard ((const struct a2150_board *)dev->board_ptr)
>  
>  struct a2150_private {
> -
> -	volatile unsigned int count;	/* number of data points left to be taken */
> +	/* number of data points left to be taken */
> +	volatile unsigned int count;
>  	unsigned int dma;	/*  dma channel */
>  	s16 *dma_buffer;	/*  dma buffer */
>  	unsigned int dma_transfer_size;	/*  size in bytes of dma transfers */
> @@ -336,16 +341,16 @@ static int a2150_attach(struct comedi_de
>  
>  	printk("comedi%d: %s: io 0x%lx", dev->minor, driver_a2150.driver_name,
>  	       iobase);
> -	if (irq) {
> +	if (irq)
>  		printk(", irq %u", irq);
> -	} else {
> +	 else
>  		printk(", no irq");
> -	}
> -	if (dma) {
> +
> +	if (dma)
>  		printk(", dma %u", dma);
> -	} else {
> +	 else
>  		printk(", no dma");
> -	}
> +
>  	printk("\n");
>  
>  	/* allocate and initialize dev->private */
> @@ -527,7 +532,8 @@ static int a2150_ai_cmdtest(struct comed
>  	if (err)
>  		return 1;
>  
> -	/* step 2: make sure trigger sources are unique and mutually compatible */
> +	/* step 2: make sure trigger sources are unique
> +				and mutually compatible */
>  
>  	if (cmd->start_src != TRIG_NOW && cmd->start_src != TRIG_EXT)
>  		err++;
> @@ -590,13 +596,13 @@ static int a2150_ai_cmdtest(struct comed
>  		for (i = 1; i < cmd->chanlist_len; i++) {
>  			if (CR_CHAN(cmd->chanlist[i]) != (startChan + i)) {
>  				comedi_error(dev,
> -					     "entries in chanlist must be consecutive channels, counting upwards\n");
> +       "entries in chanlist must be consecutive channels, counting upwards\n");
>  				err++;
>  			}
>  		}
>  		if (cmd->chanlist_len == 2 && CR_CHAN(cmd->chanlist[0]) == 1) {
>  			comedi_error(dev,
> -				     "length 2 chanlist must be channels 0,1 or channels 2,3");
> +		"length 2 chanlist must be channels 0,1 or channels 2,3");
>  			err++;
>  		}
>  		if (cmd->chanlist_len == 3) {
> @@ -607,7 +613,7 @@ static int a2150_ai_cmdtest(struct comed
>  		if (CR_AREF(cmd->chanlist[0]) != CR_AREF(cmd->chanlist[1]) ||
>  		    CR_AREF(cmd->chanlist[2]) != CR_AREF(cmd->chanlist[3])) {
>  			comedi_error(dev,
> -				     "channels 0/1 and 2/3 must have the same analog reference");
> +		vvv"channels 0/1 and 2/3 must have the same analog reference");
>  			err++;

This patch does not build properly :(

Please always build test your changes.

Care to redo this one?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux