1. 18 Mar, 2014 40 commits
    • Aybuke Ozdemir's avatar
      staging/silicom/bypasslib/bp_ioctl.h Fix do not add new typedefs. · 78508655
      Aybuke Ozdemir authored
      Fix checkpatch.pl issues with do not add
      new typedefs in bp_ioctl.h
      Signed-off-by: default avatarAybuke Ozdemir <aybuke.147@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      78508655
    • Jade Bilkey's avatar
      staging: bcm: Remove unneeded boolean comparisons and reflow lines · 9b144596
      Jade Bilkey authored
      Removes needless boolean TRUE and false comparisons and reflows some lines to
      eliminate over 80 character if statments.
      Signed-off-by: default avatarJade Bilkey <herself@thefumon.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9b144596
    • Jade Bilkey's avatar
      staging: bcm: Fix space before semicolon · 6246432f
      Jade Bilkey authored
      Fixes several checkpatch
      
      WARNING: space prohibited before semicolon
      Signed-off-by: default avatarJade Bilkey <herself@thefumon.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6246432f
    • Jade Bilkey's avatar
    • Jade Bilkey's avatar
      staging: bcm: Cleanup unneeded boolean comparisons · c6e50baf
      Jade Bilkey authored
      Cleans up a few needless comparisons with booleans and cleans up an
      interupt handler to take advantage of earlier bailout shortcircuit.
      Signed-off-by: default avatarJade Bilkey <herself@thefumon.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c6e50baf
    • Jade Bilkey's avatar
      staging: bcm: Cleanup CreateInterruptUrb() and StartInterruptUrb() · 6a259d9b
      Jade Bilkey authored
      Fixes checkpatch.pl warnings and errors:
      
      ERROR: that open brace { should be on the previous line
      +	if (!psIntfAdapter->psInterruptUrb)
      +	{
      
      WARNING: line over 80 characters
      +		BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot allocate interrupt urb");
      
      ERROR: space required after that ',' (ctx:VxV)
      +		BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot allocate interrupt urb");
       		                                        ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +		BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot allocate interrupt urb");
       		                                                                                ^
      
      WARNING: line over 80 characters
      +								psIntfAdapter->ulInterruptData;
      
      WARNING: line over 80 characters
      +							sizeof(psIntfAdapter->ulInterruptData);
      
      WARNING: line over 80 characters
      +						psIntfAdapter->sIntrIn.int_in_endpointAddr);
      
      WARNING: line over 80 characters
      +					psIntfAdapter->psInterruptUrb->transfer_buffer,
      
      WARNING: line over 80 characters
      +					psIntfAdapter->psInterruptUrb->transfer_buffer_length,
      
      WARNING: line over 80 characters
      +	BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt Interval: %d\n",
      
      ERROR: space required after that ',' (ctx:VxV)
      +	BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt Interval: %d\n",
       	                                        ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +	BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt Interval: %d\n",
       	                                                                                ^
      
      ERROR: that open brace { should be on the previous line
      +	if( false == psIntfAdapter->psAdapter->device_removed &&
      +		false == psIntfAdapter->psAdapter->bEndPointHalted &&
      +		false == psIntfAdapter->bSuspended &&
      +		false == psIntfAdapter->bPreparingForBusSuspend &&
      +		false == psIntfAdapter->psAdapter->StopAllXaction)
      +	{
      
      ERROR: space prohibited after that open parenthesis '('
      +	if( false == psIntfAdapter->psAdapter->device_removed &&
      
      ERROR: space required before the open parenthesis '('
      +	if( false == psIntfAdapter->psAdapter->device_removed &&
      
      WARNING: line over 80 characters
      +		status = usb_submit_urb(psIntfAdapter->psInterruptUrb, GFP_ATOMIC);
      
      ERROR: that open brace { should be on the previous line
      +		if (status)
      +		{
      
      WARNING: line over 80 characters
      +			BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot send int urb %d\n", status);
      
      ERROR: space required after that ',' (ctx:VxV)
      +			BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot send int urb %d\n", status);
       			                                        ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +			BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Cannot send int urb %d\n", status);
       			                                                                                ^
      
      ERROR: that open brace { should be on the previous line
      +			if(status == -EPIPE)
      +			{
      
      ERROR: space required before the open parenthesis '('
      +			if(status == -EPIPE)
      
      WARNING: line over 80 characters
      +				psIntfAdapter->psAdapter->bEndPointHalted = TRUE ;
      
      WARNING: space prohibited before semicolon
      +				psIntfAdapter->psAdapter->bEndPointHalted = TRUE ;
      
      WARNING: line over 80 characters
      +				wake_up(&psIntfAdapter->psAdapter->tx_packet_wait_queue);
      Signed-off-by: default avatarJade Bilkey <herself@thefumon.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      6a259d9b
    • Jade Bilkey's avatar
      staging: bcm: Cleanup switch statement · 94e74333
      Jade Bilkey authored
      Fixes checkpatch.pl warnings and errors:
      
      ERROR: switch and case should be at the same indent
      +	switch (status) {
      [...]
      +	    case STATUS_SUCCESS:
      [...]
      +		case -ENOENT :
      [...]
      +		case -EINPROGRESS:
      [...]
      +		case -EPIPE:
      [...]
      +	    case -ECONNRESET: //URB got unlinked.
      +	    case -ESHUTDOWN:		// hardware gone. this is the serious problem.
      [...]
      +	    case -ENODEV : //Device got removed
      +		case -EINVAL : //Some thing very bad happened with the URB. No description is available.
      [...]
      +	    default:
      
      ERROR: that open brace { should be on the previous line
      +		if ( urb->actual_length )
      +		{
      
      ERROR: space prohibited after that open parenthesis '('
      +		if ( urb->actual_length )
      
      ERROR: space prohibited before that close parenthesis ')'
      +		if ( urb->actual_length )
      
      ERROR: that open brace { should be on the previous line
      +			if(psIntfAdapter->ulInterruptData[1] & 0xFF)
      +			{
      
      ERROR: space required before the open parenthesis '('
      +			if(psIntfAdapter->ulInterruptData[1] & 0xFF)
      
      WARNING: line over 80 characters
      +				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL, "Got USIM interrupt");
      
      ERROR: space required after that ',' (ctx:VxV)
      +				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL, "Got USIM interrupt");
       				                       ^
      ERROR: that open brace { should be on the previous line
      +			if(psIntfAdapter->ulInterruptData[1] & 0xFF00)
      +			{
      
      ERROR: space required before the open parenthesis '('
      +			if(psIntfAdapter->ulInterruptData[1] & 0xFF00)
      
      WARNING: line over 80 characters
      +					(psIntfAdapter->ulInterruptData[1] & 0xFF00) >> 8);
      
      WARNING: space prohibited between function name and open parenthesis '('
      +				atomic_set (&Adapter->uiMBupdate, TRUE);
      
      WARNING: line over 80 characters
      +				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL, "TX mailbox contains %d",
      
      ERROR: space required after that ',' (ctx:VxV)
      +				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL, "TX mailbox contains %d",
       				                       ^
      +					atomic_read(&Adapter->CurrNumFreeTxDesc));
      
      ERROR: that open brace { should be on the previous line
      +			if(psIntfAdapter->ulInterruptData[1] >> 16)
      +			{
      
      ERROR: space required before the open parenthesis '('
      +			if(psIntfAdapter->ulInterruptData[1] >> 16)
      
      ERROR: spaces required around that '=' (ctx:VxE)
      +				Adapter->CurrNumRecvDescs=
       				                         ^
      
      WARNING: line over 80 characters
      +					(psIntfAdapter->ulInterruptData[1]  >> 16);
      +				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"RX mailbox contains %d",
      
      ERROR: space required after that ',' (ctx:VxV)
      +				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"RX mailbox contains %d",
       				                       ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"RX mailbox contains %d",
       				                                                               ^
      
      ERROR: that open brace { should be on the previous line
      +			if(Adapter->fw_download_done &&
      +				!Adapter->downloadDDR &&
      +				atomic_read(&Adapter->CurrNumFreeTxDesc))
      +			{
      
      ERROR: space required before the open parenthesis '('
      +			if(Adapter->fw_download_done &&
      
      ERROR: spaces required around that '+=' (ctx:WxV)
      +				psIntfAdapter->psAdapter->downloadDDR +=1;
       				                                      ^
      
      ERROR: that open brace { should be on the previous line
      +			if(false == Adapter->waiting_to_fw_download_done)
      +			{
      
      ERROR: space required before the open parenthesis '('
      +			if(false == Adapter->waiting_to_fw_download_done)
      
      ERROR: that open brace { should be on the previous line
      +			if(!atomic_read(&Adapter->TxPktAvail))
      +			{
      
      ERROR: space required before the open parenthesis '('
      +			if(!atomic_read(&Adapter->TxPktAvail))
      
      WARNING: line over 80 characters
      +			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Firing interrupt in URB");
      
      ERROR: space required after that ',' (ctx:VxV)
      +			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Firing interrupt in URB");
       			                       ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Firing interrupt in URB");
       			                                                               ^
      
      ERROR: space prohibited before that ':' (ctx:WxE)
      +		case -ENOENT :
       		             ^
      
      WARNING: line over 80 characters
      +			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"URB has got disconnected ....");
      
      ERROR: space required after that ',' (ctx:VxV)
      +			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"URB has got disconnected ....");
       			                       ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"URB has got disconnected ....");
       			                                                               ^
      
      WARNING: space prohibited before semicolon
      +			return ;
      
      WARNING: line over 80 characters
      +			//This situation may happened when URBunlink is used. for detail check usb_unlink_urb documentation.
      
      ERROR: do not use C99 // comments
      +			//This situation may happened when URBunlink is used. for detail check usb_unlink_urb documentation.
      
      WARNING: line over 80 characters
      +			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Impossibe condition has occurred... something very bad is going on");
      
      ERROR: space required after that ',' (ctx:VxV)
      +			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Impossibe condition has occurred... something very bad is going on");
       			                       ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Impossibe condition has occurred... something very bad is going on");
       			                                                               ^
      
      WARNING: space prohibited before semicolon
      +			break ;
      
      ERROR: do not use C99 // comments
      +			//return;
      
      WARNING: line over 80 characters
      +				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt IN endPoint  has got halted/stalled...need to clear this");
      
      ERROR: space required after that ',' (ctx:VxV)
      +				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt IN endPoint  has got halted/stalled...need to clear this");
       				                       ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +				BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"Interrupt IN endPoint  has got halted/stalled...need to clear this");
       				                                                               ^
      
      WARNING: space prohibited before semicolon
      +				Adapter->bEndPointHalted = TRUE ;
      
      WARNING: space prohibited before semicolon
      +				urb->status = STATUS_SUCCESS ;
      
      ERROR: do not use C99 // comments
      +	    case -ECONNRESET: //URB got unlinked.
      
      WARNING: line over 80 characters
      +	    case -ESHUTDOWN:		// hardware gone. this is the serious problem.
      
      ERROR: do not use C99 // comments
      +	    case -ESHUTDOWN:		// hardware gone. this is the serious problem.
      
      WARNING: line over 80 characters
      +	    						//Occurs only when something happens with the host controller device
      
      ERROR: code indent should use tabs where possible
      +^I    ^I^I^I^I^I^I//Occurs only when something happens with the host controller device$
      
      WARNING: please, no space before tabs
      +^I    ^I^I^I^I^I^I//Occurs only when something happens with the host controller device$
      
      ERROR: do not use C99 // comments
      +	    						//Occurs only when something happens with the host controller device
      
      ERROR: do not use C99 // comments
      +	    case -ENODEV : //Device got removed
      
      ERROR: space prohibited before that ':' (ctx:WxW)
      +	    case -ENODEV : //Device got removed
       	                 ^
      
      WARNING: line over 80 characters
      +		case -EINVAL : //Some thing very bad happened with the URB. No description is available.
      
      ERROR: do not use C99 // comments
      +		case -EINVAL : //Some thing very bad happened with the URB. No description is available.
      
      ERROR: space prohibited before that ':' (ctx:WxW)
      +		case -EINVAL : //Some thing very bad happened with the URB. No description is available.
       		             ^
      
      WARNING: line over 80 characters
      +	    	BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"interrupt urb error %d", status);
      
      ERROR: code indent should use tabs where possible
      +^I    ^IBCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"interrupt urb error %d", status);$
      
      WARNING: please, no space before tabs
      +^I    ^IBCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"interrupt urb error %d", status);$
      
      ERROR: space required after that ',' (ctx:VxV)
      +	    	BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"interrupt urb error %d", status);
       	    	                       ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +	    	BCM_DEBUG_PRINT(Adapter,DBG_TYPE_OTHERS, INTF_INIT, DBG_LVL_ALL,"interrupt urb error %d", status);
       	    	                                                               ^
      
      WARNING: space prohibited before semicolon
      +			urb->status = STATUS_SUCCESS ;
      
      WARNING: space prohibited before semicolon
      +			break ;
      
      ERROR: do not use C99 // comments
      +			//return;
      
      ERROR: spaces required around that ':' (ctx:VxE)
      +	    default:
       	           ^
      
      WARNING: line over 80 characters
      +			//This is required to check what is the defaults conditions when it occurs..
      
      ERROR: do not use C99 // comments
      +			//This is required to check what is the defaults conditions when it occurs..
      
      WARNING: line over 80 characters
      +			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"GOT DEFAULT INTERRUPT URB STATUS :%d..Please Analyze it...", status);
      
      ERROR: space required after that ',' (ctx:VxV)
      +			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"GOT DEFAULT INTERRUPT URB STATUS :%d..Please Analyze it...", status);
       			                       ^
      
      ERROR: space required after that ',' (ctx:VxV)
      +			BCM_DEBUG_PRINT(Adapter,DBG_TYPE_TX, NEXT_SEND, DBG_LVL_ALL,"GOT DEFAULT INTERRUPT URB STATUS :%d..Please Analyze it...", status);
       			                                                           ^
      Signed-off-by: default avatarJade Bilkey <herself@thefumon.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      94e74333
    • Jade Bilkey's avatar
      staging: bcm: Cleanup real_int_callback() · 54585d5e
      Jade Bilkey authored
      Fixes checkpatch.pl warnings and errors and removes some dead code.
      
      Checkpath warnings and errors fixed:
      
      WARNING: line over 80 characters
      WARNING: space prohibited before semicolon
      
      ERROR: that open brace { should be on the previous line
      ERROR: space required before the open parenthesis '('
      ERROR: space required after that ',' (ctx:VxV)
      Signed-off-by: default avatarJade Bilkey <herself@thefumon.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      54585d5e
    • Jade Bilkey's avatar
      staging: bcm: Fix checkpatch errors · 9cb516bd
      Jade Bilkey authored
      This patch fixes the following checkpatch errors:
      
      ERROR: space prohibited after that '&' (ctx:WxW)
      +			memcpy((PVOID) & pstHostMibs->
       			               ^
      
      ERROR: space prohibited after that '&' (ctx:WxW)
      +			       (PVOID) & Adapter->
       			               ^
      
      ERROR: space prohibited after that '&' (ctx:WxW)
      +			memcpy((PVOID) & pstHostMibs->astSFtable[nSfIndex],
       			               ^
      
      ERROR: space prohibited after that '&' (ctx:WxW)
      +			       (PVOID) & Adapter->PackInfo[nSfIndex],
       			               ^
      Signed-off-by: default avatarJade Bilkey <herself@thefumon.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9cb516bd
    • Tugce Sirin's avatar
      Staging: wlan-ng: Fix quoted string split across lines · b3f441bc
      Tugce Sirin authored
      This patch fixes checkpatch.pl warning quoted string split across lines
      in wlan-ng driver.
      Signed-off-by: default avatarTugce Sirin <ztugcesirin@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b3f441bc
    • Tugce Sirin's avatar
      Staging: wlan-ng: Fix prefer netdev_info to printk · 1f997411
      Tugce Sirin authored
      This patch fixes checkpatch.pl error prefer netdev_info to printk in
      wlan-ng driver.
      Signed-off-by: default avatarTugce Sirin <ztugcesirin@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1f997411
    • Tugce Sirin's avatar
      Staging: wlan-ng: Fix prefer netdev_err to printk · 80135b18
      Tugce Sirin authored
      This patch fixes checkpatch.pl error prefer netdev_error to printk in
      wlan-ng driver.
      Signed-off-by: default avatarTugce Sirin <ztugcesirin@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      80135b18
    • Ebru Akagunduz's avatar
      Staging: winbond: Fix printk() should include KERN_ facility level in wb35rx.c · 74a1fb67
      Ebru Akagunduz authored
      Fix checkpatch.pl issues with printk() should include
      KERN_ facility level in wb35rx.c
      Signed-off-by: default avatarEbru Akagunduz <ebru.akagunduz@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      74a1fb67
    • Gulsah Kose's avatar
      staging:imx-drm: Fix line over 80 characters. · 256a38b0
      Gulsah Kose authored
      Fix checkpatch.pl issues with line over 80 characters in imx-hdmi.c
      Signed-off-by: default avatarGulsah Kose <gulsah.1004@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      256a38b0
    • Aybuke Ozdemir's avatar
      staging: imx-drm: imx-ldb.c Fix line over 80 characters. · e5e1b166
      Aybuke Ozdemir authored
      Fix checkpatch.pl issues with line over 80 characters in imx-ldb.c
      Signed-off-by: default avatarAybuke Ozdemir <aybuke.147@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      e5e1b166
    • Monam Agarwal's avatar
      Staging: gdm724x: Fix unchecked sscanf values in gdm_lte.c · a28bfd11
      Monam Agarwal authored
      This patch fixes following checkpatch.pl warning:
      WARNING: unchecked sscanf value in gdm_lte.c
      Signed-off-by: default avatarMonam Agarwal <monamagarwal123@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a28bfd11
    • Gulsah Kose's avatar
      staging: rtl8821ae: Fix no space before tabs. · d2a5d36c
      Gulsah Kose authored
      Fix checkpatch.pl issues with no space before tabs in base.c
      Signed-off-by: default avatarGulsah Kose <gulsah.1004@gmail.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d2a5d36c
    • Himangi Saraogi's avatar
      staging:rtl8821ae: Fix sparse warnings of cast truncates bits from constant value · 9e245f41
      Himangi Saraogi authored
      This patch fixes the following sparse warnings:
      drivers/staging/rtl8821ae/rtl8821ae/phy.c:444:39: warning: cast truncates bits from constant value (ffffff01 becomes 1)
      drivers/staging/rtl8821ae/rtl8821ae/phy.c:445:39: warning: cast truncates bits from constant value (ffffff01 becomes 1)
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9e245f41
    • Gulsah Kose's avatar
      staging: rtl8821ae: Fix quoted string split across lines · b22f1360
      Gulsah Kose authored
      Fix checkpatch.pl issues with quoted string split across lines in base.c
      Signed-off-by: default avatarGulsah Kose <gulsah.1004@gmail.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b22f1360
    • Gulsah Kose's avatar
      staging: rtl8821ae: Fix space required before the open parenthesis '(' · c8baa8af
      Gulsah Kose authored
      Fix checkpatch.pl issues with space required before the open parenthesis
      '(' error in base.c
      Signed-off-by: default avatarGulsah Kose <gulsah.1004@gmail.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c8baa8af
    • Gulsah Kose's avatar
      staging: rtl8821ae: Fix do not use C99 // comments · 80dbca37
      Gulsah Kose authored
      Fix checkpatch.pl issues with do not use C99 // comments in base.c
      Signed-off-by: default avatarGulsah Kose <gulsah.1004@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      80dbca37
    • Gulsah Kose's avatar
      staging: rtl8821ae: Fix unnecessary whitespace before a quoted newline · ebd68c23
      Gulsah Kose authored
      Fix checkpatch.pl issues with unnecessary whitespace before a quoted
      newline in base.c
      Signed-off-by: default avatarGulsah Kose <gulsah.1004@gmail.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ebd68c23
    • Gulsah Kose's avatar
      staging: rtl8821ae: Fix code indent should use tabs where possible · 67ca1b06
      Gulsah Kose authored
      Fix checkpatch.pl issues with code indent should use tabs where possible in base.c
      Signed-off-by: default avatarGulsah Kose <gulsah.1004@gmail.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      67ca1b06
    • Aybuke Ozdemir's avatar
      drivers/staging/serqt_usb2:serqt_usb2.c Fix line over 80 characters. · 53a3e475
      Aybuke Ozdemir authored
      Fix checkpatch.pl issues with line over 80
      characters in serqt_usb2.c
      Signed-off-by: default avatarAybuke Ozdemir <aybuke.147@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      53a3e475
    • Jelena Bjelja's avatar
      staging: wlags49_h2: Fix sparse warning for static declaration · 97f25265
      Jelena Bjelja authored
      Fix the following sparse warning:
      drivers/staging/wlags49_h2/wl_netdev.c:533:6: warning: symbol 'wl_poll'
      was not declared. Should it be static?
      Signed-off-by: default avatarJelena Bjelja <jelena.bjelja.ing@gmail.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      97f25265
    • Keerthimai Janarthanan's avatar
      staging: speakup: Prefer pr_err instead of printk(KERN_ERR) · 3a046c19
      Keerthimai Janarthanan authored
      Prefer pr_err instead of printk(KERN_ERR)
      Signed-off-by: default avatarKeerthimai Janarthanan <keerthimaipb@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3a046c19
    • Ana Rey's avatar
      staging: rtl8192u: Convert from printk into netdev_err or netdev_info · 14108510
      Ana Rey authored
      Convert from printk functions into netdev_err or netdev_info in
      ieee80211/dot11d.c
      
      Fix checkpatch.pl warning:
      WARNING: printk() should include KERN_ facility level
      WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
      Signed-off-by: default avatarAna Rey <anarey@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      14108510
    • Ana Rey's avatar
      staging: rtl8192u: Move export_symbol below its function · db11196e
      Ana Rey authored
      Move export_symbol below its function in ieee80211/dot11d.c
      
      Fix checkpatch.pl warning:
      WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable
      Signed-off-by: default avatarAna Rey <anarey@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      db11196e
    • Ana Rey's avatar
      staging: rtl8192u: fix coding style in function definition · fee5a5fb
      Ana Rey authored
      Remove innecessary spaces and indentation errors in function definition
      Signed-off-by: default avatarAna Rey <anarey@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      fee5a5fb
    • Ana Rey's avatar
      staging: rtl8192u: Add whitespace in ieee80211/dot11d.c · 3777aac5
      Ana Rey authored
      Add whitespace in ieee80211/dot11d.c and fix coding style these lines
      when It is necessary
      Signed-off-by: default avatarAna Rey <anarey@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      3777aac5
    • Ana Rey's avatar
      staging: rtl8192u: Delete unnecesary braces in ieee80211/dot11d.c · faec7c97
      Ana Rey authored
      Delete unnecesary braces and fix coding style these lines when It is
      necessary in ieee80211/dot11d.c
      
      Fix checkpatch.pl errors:
      WARNING: braces {} are not necessary for single statement blocks
      Signed-off-by: default avatarAna Rey <anarey@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      faec7c97
    • Ana Rey's avatar
      staging: rtl8192u: Move open brace on the previous line · 0d86eba5
      Ana Rey authored
      Move open brace on the previous line and fix coding style in
      these lines when It is necessary in ieee80211/dot11d.c
      
      Fix checkpatch.pl errors:
      ERROR: that open brace { should be on the previous line
      Signed-off-by: default avatarAna Rey <anarey@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0d86eba5
    • Ana Rey's avatar
      staging: rtl8192u: Clean-up comment line style in ieee80211/dot11d.c · c21ce6c7
      Ana Rey authored
      Convert style of comments from C99-style to C89 and fix coding style in
      these lines when It is necessary.
      Signed-off-by: default avatarAna Rey <anarey@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c21ce6c7
    • Ana Rey's avatar
      staging: rtl8192u: Delete commented code in ieee80211/dot11d.c · abc79b18
      Ana Rey authored
      Delete all commented code in ieee80211/dot11d.c that are not necessary.
      Signed-off-by: default avatarAna Rey <anarey@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      abc79b18
    • Himangi Saraogi's avatar
      staging:rtl8192u: drop explicit externs · c541fa87
      Himangi Saraogi authored
      This patch removes use of explicit extern specifier and quietens the
      sparse warnings:
      drivers/staging/rtl8192u/r8192U_dm.c:159:1: warning: function 'init_hal_dm' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:179:13: warning: function 'deinit_hal_dm' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:245:17: warning: function 'hal_dm_watchdog' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:278:13: warning: function 'init_rate_adaptive' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:878:17: warning: function 'dm_txpower_trackingcallback' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:1609:13: warning: function 'dm_cck_txpower_adjust' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:1776:13: warning: function 'dm_change_dynamic_initgain_thresh' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:1846:1: warning: function 'dm_change_fsync_setting' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:1863:1: warning: function 'dm_change_rxpath_selection_setting' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:2543:13: warning: function 'dm_init_edca_turbo' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:2663:13: warning: function 'DM_CTSToSelfSetting' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:2782:17: warning: function 'dm_rf_pathcheck_workitemcallback' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:3142:13: warning: function 'dm_fsync_timer_callback' with external linkage has definition
      drivers/staging/rtl8192u/r8192U_dm.c:3481:13: warning: function 'dm_shadow_init' with external linkage has definition
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c541fa87
    • Aybuke Ozdemir's avatar
      staging: media: omap24xx: tcm825x.c Fix that open brace { should be on the previous line · da54e4a5
      Aybuke Ozdemir authored
      The patch fixes the following checkpatch.pl errors:
      ERROR: that open brace { should be on the previous line.
      Signed-off-by: default avatarAybuke Ozdemir <aybuke.147@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      da54e4a5
    • Chi Pham's avatar
      staging:media: Removed assignments from if statements. · 86a7dacc
      Chi Pham authored
      The following coccinelle script found the match:
      
      @simple@
      expression E1, E2;
      statement S1, S2;
      @@
      
      + E1 = E2;
      if (
      - (E1 = E2)
      + E1
       )
      S1 else S2
      
      @left@
      expression E0, E1, E2;
      statement S0, S1;
      @@
      - if ((E1 = E2) < E0)
      + E1 = E2;
      + if (E1 < E0)
      S1
      Signed-off-by: default avatarChi Pham <fempsci@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      86a7dacc
    • Himangi Saraogi's avatar
      staging: vt6656: Fix sparse warnings · f4d636dd
      Himangi Saraogi authored
      This patch fixes the following sparse warnings:
      drivers/staging/vt6656/aes_ccmp.c:272:32: warning: restricted __le16 degrades to integer
      drivers/staging/vt6656/aes_ccmp.c:274:32: warning: restricted __le16 degrades to integer
      drivers/staging/vt6656/aes_ccmp.c:282:32: warning: restricted __le16 degrades to integer
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f4d636dd
    • Himangi Saraogi's avatar
      staging:vt6655: Fix sparse warnings of using plain integer as NULL pointer · 625fd1a9
      Himangi Saraogi authored
      This patch fixes the following sparse warnings:
      drivers/staging/vt6655/wmgr.c:970:42: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:971:41: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:972:38: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:973:43: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:4110:37: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:4111:41: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:4112:34: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:4113:30: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:4114:35: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:4123:32: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:1815:41: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:1816:34: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:1817:30: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:1818:35: warning: Using plain integer as NULL pointer
      drivers/staging/vt6655/wmgr.c:2075:63: warning: Using plain integer as NULL pointer
      
      The following coccinelle script was used to achieve this:
      @rule1@
      expression *x;
      @@
      (
      - x = 0;
      + x = NULL;
      |
      - (x == 0)
      + (x == NULL)
      |
      - (x != 0)
      + (x != NULL)
      )
      Signed-off-by: default avatarHimangi Saraogi <himangi774@gmail.com>
      Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      625fd1a9
    • Chi Pham's avatar
      staging:lustre: Removed assignments from if statements. · 4a87df3e
      Chi Pham authored
      Fixed some minor checkpatch warnings such as whitespace.
      
      Coccinelle was used for this patch (NOTE: some of the changes were made by hand). The script is not complete (semantically) and might raise some checkpatch warnings in terms of indentation depending on existing code.
      
      *** IFASSIGNMENT.COCCI START ***
      
      /* Coccinelle script to handle assignments in if statements
       * For compound statements, can so far only handle statements with the
       * assignment on either extreme */
      
      /* This rule is for simple cases
       * e.g. just an assignment in if, possibly with unary operator */
      @simple@
      expression E1, E2;
      statement S1, S2;
      @@
      
      + E1 = E2;
      if (
      - (E1 = E2)
      + E1
       )
      S1 else S2
      
      /* This rule is for compound statements where the assignment is on the right.*/
      @right@
      expression E, E1, E2;
      statement S1, S2;
      @@
      
      (
      /* and */
      - if (E && (E1 = E2))
      + if (E) {
      + E1 = E2;
      + if (E1)
      S1 else S2
      + } else S2
      |
      - if (E && (E1 = E2))
      + if (E) {
      + E1 = E2;
      + if (E1)
      S1
      + }
      
      /* or */
      |
      - if (E || (E1 = E2))
      + if (!E) {
      + E1 = E2;
      + if (E1)
      S1 else S2
      + }
      + else S1
      |
      - if (E || (E1 = E2))
      + if (!E) {
      + E1 = E2;
      + if (E1) S1
      + } else
      S1
      
      /* not equal */
      |
      - if (E != (E1 = E2))
      + E1 = E2;
      + if (E != E1)
      S1 else S2
      |
      - if (E != (E1 = E2))
      + E1 = E2;
      + if (E != E1)
      S1
      
      /* equal */
      |
      - if (E == (E1 = E2))
      + E1 = E2;
      + if (E == E1)
      S1 else S2
      |
      - if (E == (E1 = E2))
      + E1 = E2;
      + if (E == E1)
      S1
      
      /* greater than */
      |
      - if (E > (E1 = E2))
      + E1 = E2;
      + if (E > E1)
      S1 else S2
      |
      - if (E > (E1 = E2))
      + E1 = E2;
      + if (E > E1)
      S1
      
      /* less than */
      |
      - if (E < (E1 = E2))
      + E1 = E2;
      + if (E < E1)
      S1 else S2
      |
      - if (E < (E1 = E2))
      + E1 = E2;
      + if (E < E1)
      S1
      
      /* lesser than or equal to */
      |
      - if (E <= (E1 = E2))
      + E1 = E2;
      + if (E <= E1)
      S1 else S2
      |
      - if (E <= (E1 = E2))
      + E1 = E2;
      + if (E <= E1)
      S1
      
      /* greater than or equal to */
      |
      - if (E >= (E1 = E2))
      + E1 = E2;
      + if (E >= E1)
      S1 else S2
      |
      - if (E >= (E1 = E2))
      + E1 = E2;
      + if (E >= E1)
      S1
      )
      
      /* This rule is for compound statements where the assignment is on the left.*/
      @left@
      expression E, E1, E2;
      statement S1, S2;
      @@
      
      (
      /* and */
      - if ((E1 = E2) && E)
      + E1 = E2;
      + if (E1 && E)
      S1 else S2
      |
      - if ((E1 = E2) && E)
      + E1 = E2;
      + if (E1 && E)
      S1
      |
      
      /* or */
      - if ((E1 = E2) || E)
      + E1 = E2;
      + if (E1 || E)
      S1
      |
      - if ((E1 = E2) || E)
      + E1 = E2;
      + if (E1 || E)
      S1 else S2
      |
      
      /* not equal */
      - if ((E1 = E2) != E)
      + E1 = E2;
      + if (E1 != E)
      S1
      |
      - if ((E1 = E2) != E)
      + E1 = E2;
      + if (E1 != E)
      S1 else S2
      |
      
      /* equal */
      - if ((E1 = E2) == E)
      + E1 = E2;
      + if (E1 == E)
      S1
      |
      - if ((E1 = E2) == E)
      + E1 = E2;
      + if (E1 == E)
      S1 else S2
      |
      /* greater */
      - if ((E1 = E2) > E)
      + E1 = E2;
      + if (E1 > E)
      S1
      |
      - if ((E1 = E2) > E)
      + E1 = E2;
      + if (E1 > E)
      S1 else S2
      |
      
      /* less */
      - if ((E1 = E2) < E)
      + E1 = E2;
      + if (E1 < E)
      S1
      |
      - if ((E1 = E2) < E)
      + E1 = E2;
      + if (E1 < E)
      S1 else S2
      
      /* lesser than or equal to */
      - if ((E1 = E2) <= E)
      + E1 = E2;
      + if (E1 <= E)
      S1
      |
      - if ((E1 = E2) <= E)
      + E1 = E2;
      + if (E1 <= E)
      S1 else S2
      
      /* greater than or equal to */
      - if ((E1 = E2) >= E)
      + E1 = E2;
      + if (E1 >= E)
      S1
      |
      - if ((E1 = E2) >= E)
      + E1 = E2;
      + if (E1 >= E)
      S1 else S2
      )
      
      *** IFASSIGNMENT.COCCI END ***
      Signed-off-by: default avatarChi Pham <fempsci@gmail.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4a87df3e