1. 04 Mar, 2010 40 commits
    • Andrea Gelmini's avatar
      Staging: rt3070: md4.h: Checkpatch cleanup · aa1468b3
      Andrea Gelmini authored
      WARNING: space prohibited between function name and open parenthesis '('
      +void MD4Init (MD4_CTX *);
      
      WARNING: space prohibited between function name and open parenthesis '('
      +void MD4Update (MD4_CTX *, u8 *, UINT);
      
      WARNING: space prohibited between function name and open parenthesis '('
      +void MD4Final (u8 [16], MD4_CTX *);
      
      ERROR: do not use C99 // comments
      +#endif //__MD4_H__
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      aa1468b3
    • Andrea Gelmini's avatar
      Staging: arlan: arlan.h: Checkpatch cleanup · a5a86959
      Andrea Gelmini authored
      ERROR: trailing whitespace
      + *  Copyright (C) 1998 Elmer.Joandi@ut.ee, +37-255-13500^I$
      
      WARNING: Use #include <linux/io.h> instead of <asm/io.h>
      +#include <asm/io.h>
      
      ERROR: do not use C99 // comments
      +//#define ARLAN_DEBUGGING 1
      
      ERROR: "foo * bar" should be "foo *bar"
      +extern int     arlan_command(struct net_device * dev, int command);
      
      ERROR: trailing whitespace
      + $
      
      ERROR: trailing whitespace
      +#define IFDEBUG( L ) if ( (L) & arlan_debug ) $
      
      ERROR: space prohibited after that open parenthesis '('
      +#define IFDEBUG( L ) if ( (L) & arlan_debug )
      
      ERROR: space prohibited before that close parenthesis ')'
      +#define IFDEBUG( L ) if ( (L) & arlan_debug )
      
      ERROR: trailing whitespace
      +#define ARLAN_FAKE_HDR_LEN 12 $
      
      ERROR: space required after that ',' (ctx:VxV)
      +	#define ARLAN_DEBUG(a,b) printk(KERN_DEBUG a, b)
       	                     ^
      
      ERROR: trailing whitespace
      +^I#define ARLAN_DEBUG(a,b) $
      
      ERROR: space required after that ',' (ctx:VxV)
      +	#define ARLAN_DEBUG(a,b)
       	                     ^
      
      ERROR: open brace '{' following struct go on the same line
      +struct arlan_shmem
      +{
      
      ERROR: trailing whitespace
      +      /* Header Signature */ $
      
      ERROR: trailing whitespace
      +      $
      
      ERROR: trailing whitespace
      +      $
      
      ERROR: trailing whitespace
      +      $
      
      ERROR: trailing whitespace
      +     $
      
      ERROR: trailing whitespace
      +      int systemId; $
      
      ERROR: open brace '{' following struct go on the same line
      +struct TxParam
      +{
      
      ERROR: "foo * bar" should be "foo *bar"
      +      struct arlan_shmem __iomem * card;
      
      ERROR: "foo * bar" should be "foo *bar"
      +      struct arlan_shmem * conf;
      
      ERROR: trailing whitespace
      +      struct arlan_conf_stru * Conf;^I     $
      
      ERROR: "foo * bar" should be "foo *bar"
      +      struct arlan_conf_stru * Conf;
      
      ERROR: trailing whitespace
      + $
      
      ERROR: space required after that ',' (ctx:VxV)
      +#define READSHM(to,from,atype) {\
                         ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +#define READSHM(to,from,atype) {\
                              ^
      
      ERROR: space required after that ',' (ctx:VxO)
      +	memcpy_fromio(&(tmp),&(from),sizeof(atype));\
       	                    ^
      
      ERROR: space required before that '&' (ctx:OxV)
      +	memcpy_fromio(&(tmp),&(from),sizeof(atype));\
       	                     ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +	memcpy_fromio(&(tmp),&(from),sizeof(atype));\
       	                            ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +#define READSHMEM(from,atype)\
                             ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +#define WRITESHM(to,from,atype) \
                          ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +#define WRITESHM(to,from,atype) \
                               ^
      
      ERROR: space required after that ',' (ctx:VxO)
      +	memcpy_toio(&(to),&tmpSHM,sizeof(atype));\
       	                 ^
      
      ERROR: space required before that '&' (ctx:OxV)
      +	memcpy_toio(&(to),&tmpSHM,sizeof(atype));\
       	                  ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +	memcpy_toio(&(to),&tmpSHM,sizeof(atype));\
       	                         ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \
                                ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \
                                          ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +#define DEBUGSHM(levelSHM,stringSHM,stuff,atype) \
                                                ^
      
      ERROR: space required after that ',' (ctx:VxO)
      +		memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\
       		                     ^
      
      ERROR: space required before that '&' (ctx:OxV)
      +		memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\
       		                      ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +		memcpy_fromio(&tmpSHM,&(stuff),sizeof(atype));\
       		                              ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +		IFDEBUG(levelSHM) printk(stringSHM,tmpSHM);\
       		                                  ^
      
      ERROR: space required after that ',' (ctx:VxO)
      +	writeb(val,&(to))
       	          ^
      
      ERROR: space required before that '&' (ctx:OxV)
      +	writeb(val,&(to))
       	           ^
      
      ERROR: space required after that ',' (ctx:VxO)
      +	writew(val,&(to))
       	          ^
      
      ERROR: space required before that '&' (ctx:OxV)
      +	writew(val,&(to))
       	           ^
      
      ERROR: space required after that ',' (ctx:VxO)
      +	writel(val,&(to))
       	          ^
      
      ERROR: space required before that '&' (ctx:OxV)
      +	writel(val,&(to))
       	           ^
      
      ERROR: space prohibited after that open parenthesis '('
      +   ( (   READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationMode)    > 0) && \
      
      ERROR: space prohibited after that open parenthesis '('
      +     (   READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationStatus) == 0)    )
      
      ERROR: space prohibited before that close parenthesis ')'
      +     (   READSHMB(((struct arlan_private *)netdev_priv(dev))->card->registrationStatus) == 0)    )
      
      ERROR: code indent should use tabs where possible
      + ^IREADSHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage)$
      
      ERROR: space required before the open brace '{'
      +#define writeControlRegister(dev, v){\
      
      ERROR: space required after that ',' (ctx:WxV)
      +   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage	,((v) &0xF) );\
                                                                                   	^
      
      ERROR: need consistent spacing around '&' (ctx:WxV)
      +   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage	,((v) &0xF) );\
                                                                                   	      ^
      
      ERROR: space prohibited before that close parenthesis ')'
      +   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->cntrlRegImage	,((v) &0xF) );\
      
      ERROR: space required after that ',' (ctx:WxV)
      +   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister	,(v) 	);}
                                                                                     	^
      
      ERROR: space required after that ';' (ctx:VxV)
      +   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister	,(v) 	);}
                                                                                     	     	 ^
      
      ERROR: space prohibited before that close parenthesis ')'
      +   WRITESHMB(((struct arlan_private *)netdev_priv(dev))->card->controlRegister	,(v) 	);}
      
      WARNING: suspect code indent for conditional statements (3, 6)
      +   if (cr & ARLAN_CHANNEL_ATTENTION){ \
      +      writeControlRegister(dev, (cr & ~ARLAN_CHANNEL_ATTENTION));\
      
      ERROR: space required before the open brace '{'
      +   if (cr & ARLAN_CHANNEL_ATTENTION){ \
      
      ERROR: space required after that close brace '}'
      +   }else  \
      
      ERROR: space required before the open brace '{'
      +#define clearChannelAttention(dev){ \
      
      ERROR: space required after that ',' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CHANNEL_ATTENTION);}
                                  ^
      
      ERROR: space required after that ';' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CHANNEL_ATTENTION);}
                                                                                       ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) | ARLAN_RESET);}
                                  ^
      
      ERROR: space required after that ';' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) | ARLAN_RESET);}
                                                                          ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_RESET);}
                                  ^
      
      ERROR: space required after that ';' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_RESET);}
                                                                           ^
      
      ERROR: space required before the open brace '{'
      +#define setInterruptEnable(dev){\
      
      ERROR: space required after that ',' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) | ARLAN_INTERRUPT_ENABLE)  ;}
                                  ^
      
      ERROR: space required after that ';' (ctx:WxV)
      +   writeControlRegister(dev,readControlRegister(dev) | ARLAN_INTERRUPT_ENABLE)  ;}
                                                                                       ^
      
      ERROR: space required before the open brace '{'
      +#define clearInterruptEnable(dev){\
      
      ERROR: space required after that ',' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_INTERRUPT_ENABLE)  ;}
                                  ^
      
      ERROR: space required after that ';' (ctx:WxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_INTERRUPT_ENABLE)  ;}
                                                                                        ^
      
      ERROR: space required before the open brace '{'
      +#define setClearInterrupt(dev){\
      
      ERROR: space required after that ',' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) | ARLAN_CLEAR_INTERRUPT)   ;}
                                  ^
      
      ERROR: space required after that ';' (ctx:WxV)
      +   writeControlRegister(dev,readControlRegister(dev) | ARLAN_CLEAR_INTERRUPT)   ;}
                                                                                       ^
      
      ERROR: space required before the open brace '{'
      +#define clearClearInterrupt(dev){\
      
      ERROR: space required after that ',' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CLEAR_INTERRUPT);}
                                  ^
      
      ERROR: space required after that ';' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_CLEAR_INTERRUPT);}
                                                                                     ^
      
      ERROR: space required before the open brace '{'
      +#define setPowerOff(dev){\
      
      ERROR: space required after that ',' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) | (ARLAN_POWER && ARLAN_ACCESS));\
                                  ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
                                  ^
      
      ERROR: space required after that ';' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
                                                                            ^
      
      ERROR: space required before the open brace '{'
      +#define setPowerOn(dev){\
      
      ERROR: space required after that ',' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~(ARLAN_POWER));   }
                                  ^
      
      ERROR: space required before the open brace '{'
      +#define arlan_lock_card_access(dev){\
      
      ERROR: space required after that ',' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
                                  ^
      
      ERROR: space required after that ';' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) & ~ARLAN_ACCESS);}
                                                                            ^
      
      ERROR: space required before the open brace '{'
      +#define arlan_unlock_card_access(dev){\
      
      ERROR: trailing whitespace
      +   writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); }  $
      
      ERROR: space required after that ',' (ctx:VxV)
      +   writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); }
                                  ^
      
      ERROR: space prohibited before that close parenthesis ')'
      +   writeControlRegister(dev,readControlRegister(dev) | ARLAN_ACCESS ); }
      
      ERROR: trailing whitespace
      + $
      
      ERROR: trailing whitespace
      + $
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a5a86959
    • Andrea Gelmini's avatar
      Staging: comedi: dt2801.c: Checkpatch cleanup · fa93e19d
      Andrea Gelmini authored
      ERROR: code indent should use tabs where possible
      +          0 = [-10,10]$
      
      ERROR: code indent should use tabs where possible
      +          0 = [-10,10]$
      
      WARNING: braces {} are not necessary for single statement blocks
      +		if (stat & (DT_S_COMPOSITE_ERROR | DT_S_READY)) {
      +			return stat;
      +		}
      
      WARNING: braces {} are not necessary for single statement blocks
      +		if (stat & DT_S_COMPOSITE_ERROR) {
      +			return stat;
      +		}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (stat & DT_S_READY) {
      +		return 0;
      +	}
      
      WARNING: braces {} are not necessary for single statement blocks
      +		if (stat & DT_S_COMPOSITE_ERROR) {
      +			return stat;
      +		}
      
      WARNING: braces {} are not necessary for single statement blocks
      +		if (stat & DT_S_READY) {
      +			return 0;
      +		}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (!(stat & DT_S_READY)) {
      +		printk("dt2801: !ready in dt2801_writecmd(), ignoring\n");
      +	}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (!timeout) {
      +		printk("dt2801: timeout 1 status=0x%02x\n", stat);
      +	}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (!timeout) {
      +		printk("dt2801: timeout 2 status=0x%02x\n", stat);
      +	}
      
      WARNING: braces {} are not necessary for any arm of this statement
      +		if (stat == -ETIME) {
      [...]
      +		} else {
      [...]
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      fa93e19d
    • Andrea Gelmini's avatar
      Staging: comedi: dmm32at.c: Checkpatch cleanup · 20962c10
      Andrea Gelmini authored
      WARNING: braces {} are not necessary for any arm of this statement
      +	if (data[0] == COMEDI_OUTPUT) {
      [...]
      +	} else {
      [...]
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      20962c10
    • Andrea Gelmini's avatar
      Staging: comedi: cb_pcimdas.c: more Checkpatch cleanup · 882e5b32
      Andrea Gelmini authored
      WARNING: braces {} are not necessary for single statement blocks
      +		if (fifo_empty) {
      +			break;
      +		}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (irq) {
      +		printk(", irq %u", irq);
      +	}
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      882e5b32
    • Andrea Gelmini's avatar
      Staging: comedi: das6402.c: Checkpatch cleanup · ecd89ddc
      Andrea Gelmini authored
      ERROR: Macros with complex values should be enclosed in parenthesis
      +#define N_WORDS 3000*64
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ecd89ddc
    • Andrea Gelmini's avatar
      Staging: comedi: hwdrv_apci3120.c: Checkpatch cleanup · dd105f08
      Andrea Gelmini authored
      ERROR: do not initialise statics to 0 or NULL
      +static unsigned int ui_Temp = 0;
      
      WARNING: braces {} are not necessary for any arm of this statement
      +		if (data[1]) {
      [...]
      +		} else
      [...]
      
      WARNING: braces {} are not necessary for single statement blocks
      +		for (i = 0; i < devpriv->ui_AiNbrofChannels; i++) {
      +			devpriv->ui_AiChannelList[i] = data[4 + i];
      +		}
      
      ERROR: that open brace { should be on the previous line
      +	} else			/*  EOC */
      +	{
      
      WARNING: braces {} are not necessary for any arm of this statement
      +		if (data[1]) {
      [...]
      +		} else {
      [...]
      
      ERROR: that open brace { should be on the previous line
      +	if (insn->unused[0] == 222)	/*  second insn read */
      +	{
      
      WARNING: braces {} are not necessary for single statement blocks
      +		for (i = 0; i < insn->n; i++) {
      +			data[i] = devpriv->ui_AiReadData[i];
      +		}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (cmd->start_src != TRIG_NOW && cmd->start_src != TRIG_EXT) {
      +		err++;
      +	}
      
      ERROR: that open brace { should be on the previous line
      +	if (cmd->scan_begin_src == TRIG_TIMER)	/*  Test Delay timing */
      +	{
      
      ERROR: that open brace { should be on the previous line
      +	if (cmd->convert_src == TRIG_TIMER)	/*  Test Acquisition timing */
      +	{
      
      WARNING: braces {} are not necessary for any arm of this statement
      +	if (cmd->stop_src == TRIG_COUNT) {
      [...]
      +	} else {
      [...]
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (devpriv->b_ExttrigEnable == APCI3120_ENABLE) {
      +		i_APCI3120_ExttrigEnable(dev);	/*  activate EXT trigger */
      +	}
      
      WARNING: braces {} are not necessary for single statement blocks
      +			if (dmalen0 > (devpriv->ui_AiDataLength)) {
      +				dmalen0 = devpriv->ui_AiDataLength;
      +			}
      
      WARNING: braces {} are not necessary for single statement blocks
      +			if (dmalen1 > (devpriv->ui_AiDataLength)) {
      +				dmalen1 = devpriv->ui_AiDataLength;
      +			}
      
      WARNING: braces {} are not necessary for any arm of this statement
      +		if (CR_RANGE(chanlist[i]) < APCI3120_BIPOLAR_RANGES) {
      [...]
      +		} else {
      [...]
      
      ERROR: that open brace { should be on the previous line
      +		if (devpriv->b_EocEosInterrupt == APCI3120_ENABLE)	/*  enable this in without DMA ??? */
      +		{
      
      ERROR: that open brace { should be on the previous line
      +	if (data[0] == APCI3120_TIMER)	/* initialize timer */
      +	{
      
      ERROR: that open brace { should be on the previous line
      +	} else			/*  Initialize Watch dog */
      +	{
      
      ERROR: that open brace { should be on the previous line
      +	if (data[0] == 2)	/*  write new value */
      +	{
      
      ERROR: that open brace { should be on the previous line
      +		if (devpriv->b_Timer2Mode == APCI3120_TIMER)	/* start timer */
      +		{
      
      ERROR: that open brace { should be on the previous line
      +		} else		/* start watch dog */
      +		{
      
      ERROR: that open brace { should be on the previous line
      +		if (devpriv->b_Timer2Mode == APCI3120_TIMER)	/* start timer */
      +		{
      
      ERROR: that open brace { should be on the previous line
      +	} else			/*  Read watch dog status */
      +	{
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (!devpriv->b_OutputMemoryStatus) {
      +		ui_Temp = 0;
      +
      +	}			/* if(!devpriv->b_OutputMemoryStatus ) */
      
      ERROR: code indent should use tabs where possible
      +                      data[0]     Value to be written$
      
      ERROR: code indent should use tabs where possible
      +                      data[1]    :1 Set digital o/p ON$
      
      ERROR: code indent should use tabs where possible
      +                      data[1]     2 Set digital o/p OFF with memory ON$
      
      ERROR: that open brace { should be on the previous line
      +	if (ui_Range)		/*  if 1 then unipolar */
      +	{
      
      ERROR: that open brace { should be on the previous line
      +	} else			/*  if 0 then   bipolar */
      +	{
      
      ERROR: that open brace { should be on the previous line
      +	do			/* Waiting of DA_READY BIT */
      +	{
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      dd105f08
    • Andrea Gelmini's avatar
      Staging: comedi: das08_cs.c: Checkpatch cleanup · d539047c
      Andrea Gelmini authored
      ERROR: code indent should use tabs where possible
      +        NONE$
      
      ERROR: do not initialise statics to 0 or NULL
      +static struct pcmcia_device *cur_dev = NULL;
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      d539047c
    • Andrea Gelmini's avatar
      Staging: comedi: contec_pci_dio.c: Checkpatch cleanup · 426054ce
      Andrea Gelmini authored
      WARNING: braces {} are not necessary for single statement blocks
      +		if (dev->iobase) {
      +			comedi_pci_disable(devpriv->pci_dev);
      +		}
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      426054ce
    • Andrea Gelmini's avatar
      Staging: comedi: cb_pcimdda.c: Checkpatch cleanup · f1c54e82
      Andrea Gelmini authored
      WARNING: braces {} are not necessary for any arm of this statement
      +	if (it->options[2]) {
      [...]
      +	} else {
      [...]
      
      WARNING: braces {} are not necessary for single statement blocks
      +			if (devpriv->registers) {
      +				comedi_pci_disable(devpriv->pci_dev);
      +			}
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      f1c54e82
    • Andrea Gelmini's avatar
      Staging: comedi: cb_pcimdas.c: Checkpatch cleanup · 7c2f1946
      Andrea Gelmini authored
      WARNING: braces {} are not necessary for any arm of this statement
      +	if (thisboard->has_dio) {
      [...]
      +	} else {
      [...]
      
      WARNING: braces {} are not necessary for single statement blocks
      +			if (devpriv->BADR0) {
      +				comedi_pci_disable(devpriv->pci_dev);
      +			}
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      7c2f1946
    • Andrea Gelmini's avatar
      Staging: comedi: cb_pcidio.c: Checkpatch cleanup · e3a21d0a
      Andrea Gelmini authored
      WARNING: braces {} are not necessary for single statement blocks
      +			if (devpriv->dio_reg_base) {
      +				comedi_pci_disable(devpriv->pci_dev);
      +			}
      
      WARNING: braces {} are not necessary for single statement blocks
      +		for (i = 0; i < thisboard->n_8255; i++) {
      +			subdev_8255_cleanup(dev, dev->subdevices + i);
      +		}
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e3a21d0a
    • Andrea Gelmini's avatar
      Staging: comedi: cb_pcidda.c: Checkpatch cleanup · 20db7d7d
      Andrea Gelmini authored
      WARNING: braces {} are not necessary for single statement blocks
      +			if (devpriv->dac) {
      +				comedi_pci_disable(devpriv->pci_dev);
      +			}
      
      WARNING: braces {} are not necessary for single statement blocks
      +		if (inw_p(devpriv->dac + DACALIBRATION1) & SERIAL_OUT_BIT) {
      +			value |= 1 << (value_width - i);
      +		}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	for (i = 0; i < max_num_caldacs; i++) {
      +		cal2_bits |= DESELECT_CALDAC_BIT(i);
      +	}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	for (i = 0; i < max_num_caldacs; i++) {
      +		cal2_bits |= DESELECT_CALDAC_BIT(i);
      +	}
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      20db7d7d
    • Andrea Gelmini's avatar
      Staging: comedi: cb_pcidas.c: Checkpatch cleanup · 2d238b29
      Andrea Gelmini authored
      ERROR: "foo * bar" should be "foo *bar"
      +		      uint8_t * data);
      
      WARNING: braces {} are not necessary for single statement blocks
      +		if (devpriv->s5933_config) {
      +			comedi_pci_disable(devpriv->pci_dev);
      +		}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (cmd->stop_src == TRIG_COUNT) {
      +		devpriv->count = cmd->chanlist_len * cmd->stop_arg;
      +	}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (cmd->stop_src == TRIG_COUNT) {
      +		devpriv->ao_count = cmd->chanlist_len * cmd->stop_arg;
      +	}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (cmd->stop_src == TRIG_COUNT) {
      +		devpriv->ao_count -= num_points;
      +	}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (dev->attached == 0) {
      +		return IRQ_NONE;
      +	}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if ((status & (INT | EOAI | LADFUL | DAHFI | DAEMI)) == 0) {
      +		comedi_error(dev, "spurious interrupt");
      +	}
      
      WARNING: braces {} are not necessary for single statement blocks
      +	if (status & (DAHFI | DAEMI)) {
      +		handle_ao_interrupt(dev, status);
      +	}
      
      WARNING: braces {} are not necessary for single statement blocks
      +		if (async->cmd.stop_src == TRIG_COUNT) {
      +			devpriv->ao_count -= num_points;
      +		}
      
      ERROR: "foo * bar" should be "foo *bar"
      +		      uint8_t * data)
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2d238b29
    • Andrea Gelmini's avatar
      Staging: comedi: hwdrv_apci1032.c: Checkpatch cleanup · 882e1233
      Andrea Gelmini authored
      ERROR: do not initialise externals to 0 or NULL
      +unsigned int ui_InterruptStatus = 0;
      
      WARNING: braces {} are not necessary for single statement blocks
      +		else {
      +			outl(0x6, devpriv->iobase + APCI1032_DIGITAL_IP_IRQ);
      +		}		/* else if(data[1] == ADDIDATA_OR) */
      
      WARNING: braces {} are not necessary for single statement blocks
      +		if (data[1] == 1) {
      +			*data = ui_InterruptStatus;
      +		}		/* if(data[1]==1) */
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      882e1233
    • Andrea Gelmini's avatar
      Staging: comedi: addi_common.h: Checkpatch cleanup · a9ecb5bb
      Andrea Gelmini authored
      ERROR: code indent should use tabs where possible
      +        const struct comedi_lrange *pr_AiRangelist;^I/* rangelist for A/D */$
      
      ERROR: code indent should use tabs where possible
      +        const struct comedi_lrange *pr_AoRangelist;^I/* rangelist for D/A */$
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a9ecb5bb
    • Andrea Gelmini's avatar
      Staging: comedi: addi_amcc_S5920.c: Checkpatch cleanup · 015fadba
      Andrea Gelmini authored
      WARNING: braces {} are not necessary for any arm of this statement
      +			if (i_Counter == 0) {
      [...]
      +			} else {
      [...]
      Signed-off-by: default avatarAndrea Gelmini <andrea.gelmini@gelma.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      015fadba
    • d binderman's avatar
    • Alessio Igor Bogani's avatar
      Staging: Cleanup useless headers · 02c7b237
      Alessio Igor Bogani authored
      BKL isn't anymore present into these files thus it is no necessary still include smp_lock.h.
      Signed-off-by: default avatarAlessio Igor Bogani <abogani@texware.it>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      02c7b237
    • Florian Schilhabel's avatar
    • Florian Schilhabel's avatar
      Staging: rtl8192su: re-enable tx-stats · a99840b1
      Florian Schilhabel authored
      currently, interface statistics look like this:
      
      wlan0     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
                inet addr:xxx.xxx.xxx.xxx  Bcast:xxx.xxx.xxx.xxx  Mask:xxx.xxx.xxx.xxx
                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                RX packets:435 errors:0 dropped:1 overruns:0 frame:0
                TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000
                RX bytes:456758 (446.0 Kb)  TX bytes:0 (0.0 b)
      
      after re-enabling the tx-stats it looks like this:
      
      wlan0     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
                inet addr:xxx.xxx.xxx.xxx  Bcast:xxx.xxx.xxx.xxx  Mask:xxx.xxx.xxx.xxx
                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                RX packets:1269 errors:0 dropped:1 overruns:0 frame:0
                TX packets:1049 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000
                RX bytes:1667442 (1.5 Mb)  TX bytes:82606 (80.6 Kb)
      Signed-off-by: default avatarFlorian Schilhabel <florian.c.schilhabel@googlemail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      a99840b1
    • Florian Schilhabel's avatar
      Staging: rtl8192su: fix for rtl819xU:Error TX URB for zero byte xxx, error -2 · 29a1fbc8
      Florian Schilhabel authored
      according to 'linux device drivers',
      ENOENT, ECONNRESET, ESHUTDOWN are not real transmission errors.
      also, a little cosmetics.
      Signed-off-by: default avatarFlorian Schilhabel <florian.c.schilhabel@googlemail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      29a1fbc8
    • Florian Schilhabel's avatar
      Staging: rtl8192su: Remove Firmware from r8192SU_HWImg.c · 2f225608
      Florian Schilhabel authored
      Because the Firmware is loaded from RTL8192SU/rtl8192sfw.bin,
      it it save, to remove it from r8192SU_HWImg.c
      Signed-off-by: default avatarFlorian Schilhabel <florian.c.schilhabel@googlemail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      2f225608
    • Sven-Thorsten Dietrich's avatar
      Staging: make drivers use spin_lock_init() · c852ab66
      Sven-Thorsten Dietrich authored
      This fixes some RT-triggered compile errors and typos.
      Signed-off-by: default avatarSven-Thorsten Dietrich <sdietrich@novell.com>
      Acked-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
      Acked-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      c852ab66
    • Ameya Palande's avatar
      Staging: crystalhd: Misc improvements for crystalhd_lnx.c · 21b0838c
      Ameya Palande authored
      This patch does following improvements:
      
      1. Follow kernel style for comments
      2. Reorganize code for readability improvement
      3. Use PCI helper macros
      4. Use __devinit, __devexit, __devexit_p at necessary places
      5. Mark functions and data as static when it is not exported
      Signed-off-by: default avatarAmeya Palande <2ameya@gmail.com>
      Cc: Naren Sankar <nsankar@broadcom.com>
      Cc: Jarod Wilson <jarod@wilsonet.com>
      Cc: Scott Davilla <davilla@4pi.com>
      Cc: Manu Abraham <abraham.manu@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      21b0838c
    • Jim Dog's avatar
      Staging: wlan-ng: Fixed line length issues in prism2usb.c · 09257969
      Jim Dog authored
      This is a patch to the prism2usb.c that fixes one line which was over
      the 80 character limit by wrapping it to a new line and removes a
      commented out configuration for a ZyDAS ZD1201 device since support for
      this device with this driver is now deprecated.
      Signed-off-by: default avatarJim Dog <jimdog@northern-indymedia.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      09257969
    • Randy Dunlap's avatar
      Staging/pohmelfs: fix write_inode parameter warning · 582de7ca
      Randy Dunlap authored
      sparse warns that:
      drivers/staging/pohmelfs/inode.c:1797: warning: initialization from incompatible pointer type
      
      so fix pohmelfs_write_inode() to have the expected parameters.
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Evgeniy Polyakov <zbr@ioremap.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      582de7ca
    • Randy Dunlap's avatar
      Staging: fix wlan-ng printk format warning · 83a0f9bc
      Randy Dunlap authored
      Fix prism2fw.c printk format warning:
      
      drivers/staging/wlan-ng/prism2fw.c:209: warning: format '%d' expects type 'int', but argument 3 has type 'size_t'
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      83a0f9bc
    • Randy Dunlap's avatar
      Staging: rtl8192* needs semaphore.h · 128a5d02
      Randy Dunlap authored
      The rtl8192* drivers in staging use semaphores, so they need
      to #include <linux/semaphore.h>.
      
      (similar to staging-rtl8187se-needs-semaphore.h.patch)
      
      drivers/staging/rtl8192e/ieee80211/ieee80211.h:2038: error: field 'ips_sem' has incomplete type
      drivers/staging/rtl8192e/ieee80211/ieee80211.h:2249: error: field 'wx_sem' has incomplete type
      drivers/staging/rtl8192e/ieee80211/ieee80211.h:2250: error: field 'scan_sem' has incomplete type
      drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c:442: error: implicit declaration of function 'down'
      drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c:500: error: implicit declaration of function 'up'
      drivers/staging/rtl8192e/ieee80 211/ieee80211_softmac.c:3165: error: implicit declaration of function 'sema_init'
      
      drivers/staging/rtl8192su/ieee80211/ieee80211.h:1330: error: field 'wx_sem' has incomplete type
      drivers/staging/rtl8192su/ieee80211/ieee80211.h:1331: error: field 'scan_sem' has incomplete type
      
      drivers/staging/rtl8192u/ieee80211/ieee80211.h:2010: error: field 'wx_sem' has incomplete type
      drivers/staging/rtl8192u/ieee80211/ieee80211.h:2011: error: field 'scan_sem' has incomplete type
      Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      128a5d02
    • Sylvain Trias's avatar
      Staging: line6: variax.c: fixed a space a "x ? a : b" coding style issue · 0f7cf003
      Sylvain Trias authored
      Fixed a coding style issue.
      Signed-off-by: default avatarSylvain Trias <bozo@nobodix.org>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      0f7cf003
    • Frank Mori Hess's avatar
      Staging: comedi: Increased timeout for digital output dma loading · ea12ac4f
      Frank Mori Hess authored
      Increased timeout for digital output dma loading, due to report of it
      being too short for some hardware.
      Signed-off-by: default avatarFrank Mori Hess <fmhess@users.sourceforge.net>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      ea12ac4f
    • OGAWA Hirofumi's avatar
    • Benjamin Adolphi's avatar
      Staging: comedi: amplc_pc236: Checkpatch cleanups · 9f7a344b
      Benjamin Adolphi authored
      This fixes all checkpatch issues in the amplc_pc236 comedi driver.
      Signed-off-by: default avatarBenjamin Adolphi <b.adolphi@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      9f7a344b
    • Benjamin Adolphi's avatar
      Staging: comedi: amplc_dio200: Checkpatch cleanups · 669c930c
      Benjamin Adolphi authored
      This fixes all checkpatch issues in the amplc_dio200 comedi driver.
      Signed-off-by: default avatarBenjamin Adolphi <b.adolphi@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      669c930c
    • Benjamin Adolphi's avatar
      Staging: comedi: aio_iiro_16: Checkpatch cleanups · e20ad20d
      Benjamin Adolphi authored
      This fixes all checkpatch issues in the aio_iiro_16 comedi driver.
      Signed-off-by: default avatarBenjamin Adolphi <b.adolphi@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      e20ad20d
    • Stewart Robertson's avatar
      Staging: comedi: fix coding style issues in ni_labpc.c · e41a6f6d
      Stewart Robertson authored
      This is a patch to the ni_labpc.c file that fixes the brace warnings and
      comments over 80 characters found by the checkpatch.pl tool. Some code
      still goes over 80 characters because I didn't know what to do with it.
      Signed-off-by: default avatarStewart Robertson <stewart_r@aliencamel.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      
      e41a6f6d
    • Marek Lindner's avatar
      Staging: batman-adv: fix module initialization · af71b816
      Marek Lindner authored
      Make sure that batman-adv does not process packets before its
      initialization is complete. Some sanity checks added to the receiver
      function.
      Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: default avatarSimon Wunderlich <siwu@hrz.tu-chemnitz.de>
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      af71b816
    • Marek Lindner's avatar
      Staging: batman-adv: avoid crash on memory allocation error · da6d6c7a
      Marek Lindner authored
      skb_share_check() returns NULL if it can't allocate more memory but
      it still frees the skbuff.
      Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      da6d6c7a
    • Andrew Lunn's avatar
      Staging: batman-adv: Fix skbuff leak in VIS code. · 8d03847c
      Andrew Lunn authored
      The vis code takes a copy of the data inside the skbuf if it is interesting
      for us, so we always need to release the skbuf.
      Reported-by: default avatarLinus Luessing <linus.luessing@web.de>
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      8d03847c
    • Linus Luessing's avatar
      Staging: batman-adv: atomic variable for vis-srv activation · 837b8248
      Linus Luessing authored
      This fixes the bug discovered by Marek Lindner which did not allow
      turning on the vis-server before an interface has been added. With this
      patch we are using a global atomic variable for activating and
      deactiating the vis-server-mode, which can be used before
      inserting an interface.
      Signed-off-by: default avatarLinus Luessing <linus.luessing@web.de>
      Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
      837b8248