platform/kernel/linux-rpi.git
10 years agostaging: addac: adt7316.c: Fix line over 80 characters
Aybuke Ozdemir [Mon, 17 Mar 2014 22:25:56 +0000 (00:25 +0200)]
staging: addac: adt7316.c: Fix line over 80 characters

Fix checkpatch.pl issues with line over 80 characters in adt7316.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192e: Fix quoted string split across lines
Gulsah Kose [Sun, 16 Mar 2014 13:21:52 +0000 (15:21 +0200)]
staging: rtl8192e: Fix quoted string split across lines

Fix checkpatch.pl issues with quoted string split across lines in
dot11d.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: lirc: Fix warning: assignment of bool to 0/1
Andreea-Cristina Bernat [Sun, 16 Mar 2014 20:21:41 +0000 (22:21 +0200)]
Staging: lirc: Fix warning: assignment of bool to 0/1

This patch solves the warning "Assignment of bool to 0/1"

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: slicoss: free IO remapping on failure
Kristina Martšenko [Tue, 18 Mar 2014 15:05:56 +0000 (17:05 +0200)]
staging: slicoss: free IO remapping on failure

Make sure iounmap is always called after ioremap when module loading
fails. Also remove a call to release_mem_region because that region is
never reserved in the first place.

Fixes the following issue reported by Coccinelle:
drivers/staging/slicoss/slicoss.c:3727:1-7: ERROR: missing iounmap; ioremap on line 3661 and execution via conditional on line 3677

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8712: Fix multiple spaces after return type
Gulsah Kose [Sun, 16 Mar 2014 13:42:32 +0000 (15:42 +0200)]
staging: rtl8712: Fix multiple spaces after return type

Fix checkpatch.pl issues with multiple spaces after return type in
drv_types.h

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/rtl8712/osdep_service.h Fix line over 80 characters.
Aybuke Ozdemir [Mon, 17 Mar 2014 23:39:25 +0000 (01:39 +0200)]
staging/rtl8712/osdep_service.h Fix line over 80 characters.

Fix checkpatch.pl issues with
line over 80 characters in osdep_service.h

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:ozwpan:Fix sparse warning of cast to restricted __le16
Himangi Saraogi [Wed, 12 Mar 2014 16:51:13 +0000 (22:21 +0530)]
staging:ozwpan:Fix sparse warning of cast to restricted __le16

This patch fixes the following sparse warnings:
drivers/staging/ozwpan/ozusbsvc1.c:391:36: warning: cast to restricted __le16
drivers/staging/ozwpan/ozusbsvc1.c:393:33: warning: cast to restricted __le16

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:ozwpan:Fix sparse warning of incorrect argument type
Himangi Saraogi [Wed, 12 Mar 2014 16:50:32 +0000 (22:20 +0530)]
staging:ozwpan:Fix sparse warning of incorrect argument type

This patch fixes the following sparse warning:
drivers/staging/ozwpan/ozusbsvc1.c:208:50: warning: incorrect type in argument 6 (different base types)
drivers/staging/ozwpan/ozusbsvc1.c:208:50:    expected unsigned short [unsigned] [usertype] windex
drivers/staging/ozwpan/ozusbsvc1.c:208:50:    got restricted __le16 [usertype] wIndex

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rts5208: Fix line over 80 characters.
Gulsah Kose [Wed, 12 Mar 2014 19:30:32 +0000 (21:30 +0200)]
staging: rts5208: Fix line over 80 characters.

Fix checkpatch.pl issues with line over 80 characters in rtsx_card.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/silicom/bypasslib/bp_ioctl.h Fix do not add new typedefs.
Aybuke Ozdemir [Sun, 16 Mar 2014 15:32:28 +0000 (17:32 +0200)]
staging/silicom/bypasslib/bp_ioctl.h Fix do not add new typedefs.

Fix checkpatch.pl issues with do not add
new typedefs in bp_ioctl.h

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: Remove unneeded boolean comparisons and reflow lines
Jade Bilkey [Mon, 17 Mar 2014 23:45:31 +0000 (19:45 -0400)]
staging: bcm: Remove unneeded boolean comparisons and reflow lines

Removes needless boolean TRUE and false comparisons and reflows some lines to
eliminate over 80 character if statments.

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: Fix space before semicolon
Jade Bilkey [Mon, 17 Mar 2014 23:45:30 +0000 (19:45 -0400)]
staging: bcm: Fix space before semicolon

Fixes several checkpatch

WARNING: space prohibited before semicolon

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: Fix lines over 80 characters
Jade Bilkey [Mon, 17 Mar 2014 23:45:29 +0000 (19:45 -0400)]
staging: bcm: Fix lines over 80 characters

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: Cleanup unneeded boolean comparisons
Jade Bilkey [Mon, 17 Mar 2014 23:45:28 +0000 (19:45 -0400)]
staging: bcm: Cleanup unneeded boolean comparisons

Cleans up a few needless comparisons with booleans and cleans up an
interupt handler to take advantage of earlier bailout shortcircuit.

Signed-off-by: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: Cleanup CreateInterruptUrb() and StartInterruptUrb()
Jade Bilkey [Mon, 17 Mar 2014 23:45:27 +0000 (19:45 -0400)]
staging: bcm: Cleanup CreateInterruptUrb() and StartInterruptUrb()

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: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: Cleanup switch statement
Jade Bilkey [Mon, 17 Mar 2014 23:45:26 +0000 (19:45 -0400)]
staging: bcm: Cleanup switch statement

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: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: Cleanup real_int_callback()
Jade Bilkey [Mon, 17 Mar 2014 23:45:25 +0000 (19:45 -0400)]
staging: bcm: Cleanup real_int_callback()

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: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: bcm: Fix checkpatch errors
Jade Bilkey [Mon, 17 Mar 2014 23:45:24 +0000 (19:45 -0400)]
staging: bcm: Fix checkpatch errors

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: Jade Bilkey <herself@thefumon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: wlan-ng: Fix quoted string split across lines
Tugce Sirin [Mon, 17 Mar 2014 14:02:13 +0000 (16:02 +0200)]
Staging: wlan-ng: Fix quoted string split across lines

This patch fixes checkpatch.pl warning quoted string split across lines
in wlan-ng driver.

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: wlan-ng: Fix prefer netdev_info to printk
Tugce Sirin [Mon, 17 Mar 2014 14:02:05 +0000 (16:02 +0200)]
Staging: wlan-ng: Fix prefer netdev_info to printk

This patch fixes checkpatch.pl error prefer netdev_info to printk in
wlan-ng driver.

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: wlan-ng: Fix prefer netdev_err to printk
Tugce Sirin [Mon, 17 Mar 2014 14:01:51 +0000 (16:01 +0200)]
Staging: wlan-ng: Fix prefer netdev_err to printk

This patch fixes checkpatch.pl error prefer netdev_error to printk in
wlan-ng driver.

Signed-off-by: Tugce Sirin <ztugcesirin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: winbond: Fix printk() should include KERN_ facility level in wb35rx.c
Ebru Akagunduz [Sun, 9 Mar 2014 18:36:21 +0000 (20:36 +0200)]
Staging: winbond: Fix printk() should include KERN_ facility level in wb35rx.c

Fix checkpatch.pl issues with printk() should include
KERN_ facility level in wb35rx.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:imx-drm: Fix line over 80 characters.
Gulsah Kose [Sun, 9 Mar 2014 18:11:07 +0000 (20:11 +0200)]
staging:imx-drm: Fix line over 80 characters.

Fix checkpatch.pl issues with line over 80 characters in imx-hdmi.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: imx-drm: imx-ldb.c Fix line over 80 characters.
Aybuke Ozdemir [Mon, 17 Mar 2014 21:55:53 +0000 (23:55 +0200)]
staging: imx-drm: imx-ldb.c Fix line over 80 characters.

Fix checkpatch.pl issues with line over 80 characters in imx-ldb.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: gdm724x: Fix unchecked sscanf values in gdm_lte.c
Monam Agarwal [Sun, 16 Mar 2014 10:08:39 +0000 (15:38 +0530)]
Staging: gdm724x: Fix unchecked sscanf values in gdm_lte.c

This patch fixes following checkpatch.pl warning:
WARNING: unchecked sscanf value in gdm_lte.c

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8821ae: Fix no space before tabs.
Gulsah Kose [Sun, 16 Mar 2014 14:59:43 +0000 (16:59 +0200)]
staging: rtl8821ae: Fix no space before tabs.

Fix checkpatch.pl issues with no space before tabs in base.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:rtl8821ae: Fix sparse warnings of cast truncates bits from constant value
Himangi Saraogi [Sun, 16 Mar 2014 18:25:00 +0000 (23:55 +0530)]
staging:rtl8821ae: Fix sparse warnings of cast truncates bits from constant value

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: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8821ae: Fix quoted string split across lines
Gulsah Kose [Sun, 16 Mar 2014 14:51:56 +0000 (16:51 +0200)]
staging: rtl8821ae: Fix quoted string split across lines

Fix checkpatch.pl issues with quoted string split across lines in base.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8821ae: Fix space required before the open parenthesis '('
Gulsah Kose [Sun, 16 Mar 2014 14:44:10 +0000 (16:44 +0200)]
staging: rtl8821ae: Fix space required before the open parenthesis '('

Fix checkpatch.pl issues with space required before the open parenthesis
'(' error in base.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8821ae: Fix do not use C99 // comments
Gulsah Kose [Sun, 16 Mar 2014 14:40:07 +0000 (16:40 +0200)]
staging: rtl8821ae: Fix do not use C99 // comments

Fix checkpatch.pl issues with do not use C99 // comments in base.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8821ae: Fix unnecessary whitespace before a quoted newline
Gulsah Kose [Sun, 16 Mar 2014 14:22:06 +0000 (16:22 +0200)]
staging: rtl8821ae: Fix unnecessary whitespace before a quoted newline

Fix checkpatch.pl issues with unnecessary whitespace before a quoted
newline in base.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8821ae: Fix code indent should use tabs where possible
Gulsah Kose [Sun, 16 Mar 2014 14:16:38 +0000 (16:16 +0200)]
staging: rtl8821ae: Fix code indent should use tabs where possible

Fix checkpatch.pl issues with code indent should use tabs where possible in base.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers/staging/serqt_usb2:serqt_usb2.c Fix line over 80 characters.
Aybuke Ozdemir [Sun, 9 Mar 2014 14:30:57 +0000 (16:30 +0200)]
drivers/staging/serqt_usb2:serqt_usb2.c Fix line over 80 characters.

Fix checkpatch.pl issues with line over 80
characters in serqt_usb2.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: wlags49_h2: Fix sparse warning for static declaration
Jelena Bjelja [Sun, 16 Mar 2014 14:08:48 +0000 (15:08 +0100)]
staging: wlags49_h2: Fix sparse warning for static declaration

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: Jelena Bjelja <jelena.bjelja.ing@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: speakup: Prefer pr_err instead of printk(KERN_ERR)
Keerthimai Janarthanan [Tue, 18 Mar 2014 08:40:13 +0000 (14:10 +0530)]
staging: speakup: Prefer pr_err instead of printk(KERN_ERR)

Prefer pr_err instead of printk(KERN_ERR)

Signed-off-by: Keerthimai Janarthanan <keerthimaipb@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: Convert from printk into netdev_err or netdev_info
Ana Rey [Tue, 18 Mar 2014 16:50:47 +0000 (17:50 +0100)]
staging: rtl8192u: Convert from printk into netdev_err or netdev_info

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: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: Move export_symbol below its function
Ana Rey [Tue, 18 Mar 2014 16:50:46 +0000 (17:50 +0100)]
staging: rtl8192u: Move export_symbol below its function

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: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: fix coding style in function definition
Ana Rey [Tue, 18 Mar 2014 16:50:45 +0000 (17:50 +0100)]
staging: rtl8192u: fix coding style in function definition

Remove innecessary spaces and indentation errors in function definition

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: Add whitespace in ieee80211/dot11d.c
Ana Rey [Tue, 18 Mar 2014 16:50:44 +0000 (17:50 +0100)]
staging: rtl8192u: Add whitespace in ieee80211/dot11d.c

Add whitespace in ieee80211/dot11d.c and fix coding style these lines
when It is necessary

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: Delete unnecesary braces in ieee80211/dot11d.c
Ana Rey [Tue, 18 Mar 2014 16:50:43 +0000 (17:50 +0100)]
staging: rtl8192u: Delete unnecesary braces in ieee80211/dot11d.c

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: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: Move open brace on the previous line
Ana Rey [Tue, 18 Mar 2014 16:50:42 +0000 (17:50 +0100)]
staging: rtl8192u: Move open brace on the previous line

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: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: Clean-up comment line style in ieee80211/dot11d.c
Ana Rey [Tue, 18 Mar 2014 16:50:41 +0000 (17:50 +0100)]
staging: rtl8192u: Clean-up comment line style in ieee80211/dot11d.c

Convert style of comments from C99-style to C89 and fix coding style in
these lines when It is necessary.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8192u: Delete commented code in ieee80211/dot11d.c
Ana Rey [Tue, 18 Mar 2014 16:50:40 +0000 (17:50 +0100)]
staging: rtl8192u: Delete commented code in ieee80211/dot11d.c

Delete all commented code in ieee80211/dot11d.c that are not necessary.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:rtl8192u: drop explicit externs
Himangi Saraogi [Sun, 16 Mar 2014 22:37:56 +0000 (04:07 +0530)]
staging:rtl8192u: drop explicit externs

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: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: media: omap24xx: tcm825x.c Fix that open brace { should be on the previous...
Aybuke Ozdemir [Sun, 16 Mar 2014 05:27:54 +0000 (07:27 +0200)]
staging: media: omap24xx: tcm825x.c Fix that open brace { should be on the previous line

The patch fixes the following checkpatch.pl errors:
ERROR: that open brace { should be on the previous line.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:media: Removed assignments from if statements.
Chi Pham [Sun, 9 Mar 2014 13:55:14 +0000 (14:55 +0100)]
staging:media: Removed assignments from if statements.

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: Chi Pham <fempsci@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: Fix sparse warnings
Himangi Saraogi [Mon, 17 Mar 2014 13:58:44 +0000 (19:28 +0530)]
staging: vt6656: Fix sparse warnings

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: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:vt6655: Fix sparse warnings of using plain integer as NULL pointer
Himangi Saraogi [Mon, 17 Mar 2014 09:23:10 +0000 (14:53 +0530)]
staging:vt6655: Fix sparse warnings of using plain integer as NULL pointer

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: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:lustre: Removed assignments from if statements.
Chi Pham [Sun, 9 Mar 2014 11:51:19 +0000 (12:51 +0100)]
staging:lustre: Removed assignments from if statements.

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: Chi Pham <fempsci@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agodrivers/staging/dgrp:dgrp_tty.c: Fix line over 80 characters.
Aybuke Ozdemir [Sun, 9 Mar 2014 10:33:21 +0000 (12:33 +0200)]
drivers/staging/dgrp:dgrp_tty.c: Fix line over 80 characters.

Fix checkpatch.pl issues with line over 80
characters in dgrp_tty.c

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: nokia_h4p: move firmware macros to firmware part
Kristina Martšenko [Sun, 9 Mar 2014 10:01:46 +0000 (12:01 +0200)]
staging: nokia_h4p: move firmware macros to firmware part

As the TODO file suggests, move firmware file macros from the header
file to the file that deals with firmware. In the process also move
MODULE_FIRMWARE() instances to the same file. Remove the relevant item
from the TODO file.

Signed-off-by: Kristina Martšenko <kristina.martsenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: nokia_h4p: Fix line over 80 characters.
Gulsah Kose [Sun, 9 Mar 2014 19:13:54 +0000 (21:13 +0200)]
staging: nokia_h4p: Fix line over 80 characters.

Fix checkpatch.pl issues with line over 80 characters in nokia_core.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:rtl8188eu: Remove unnecessary variable assignments
Himangi Saraogi [Sun, 16 Mar 2014 22:03:50 +0000 (03:33 +0530)]
staging:rtl8188eu: Remove unnecessary variable assignments

This patch removes unnecessary variable assignments which are
assigned immediately after the first initialization.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:rtl8188eu: Removed assignments in if statements.
Chi Pham [Sun, 9 Mar 2014 14:07:15 +0000 (15:07 +0100)]
staging:rtl8188eu: Removed assignments in if statements.

Fixed some indentation to silence (some) checkpatch errors.
The following coccinelle script found the match:

@@
expression E0, E1, E2;
statement S0, S1;
@@
- if ((E1 = E2) != E)
+ E1 = E2;
+ if (E1 != E)
S1 else S2

Signed-off-by: Chi Pham <fempsci@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8188eu: Replace rtw_zmalloc with kzalloc.
Elena Oat [Sun, 9 Mar 2014 12:04:40 +0000 (14:04 +0200)]
Staging: rtl8188eu: Replace rtw_zmalloc with kzalloc.

This patch replaces rtw_zmalloc with kzalloc in function
rtw_setstandby_cmd. There are no locks, hence GFP_KERNEL flag is used.

Signed-off-by: Elena Oat <oat.elena@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: Fix Sparse Warning for Static Declarations in linux.c
Himangi Saraogi [Sun, 16 Mar 2014 20:47:17 +0000 (02:17 +0530)]
staging: cxt1e1: Fix Sparse Warning for Static Declarations in linux.c

This patch fixes the following sparse warnings:
drivers/staging/cxt1e1/linux.c:106:13: warning: symbol 'log_level_default' was not declared. Should it be static?
drivers/staging/cxt1e1/linux.c:110:13: warning: symbol 'max_mru_default' was not declared. Should it be static?
drivers/staging/cxt1e1/linux.c:255:1: warning: symbol 'c4_linux_interrupt' was not declared. Should it be static?
drivers/staging/cxt1e1/linux.c:265:1: warning: symbol 'c4_ebus_interrupt' was not declared. Should it be static?

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: Fix do not use // c99 comments
Gulsah Kose [Sun, 16 Mar 2014 11:21:06 +0000 (13:21 +0200)]
staging: cxt1e1: Fix do not use // c99 comments

This patch fixes "do not use // C99 comments" errors in linux.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: cxt1e1: Fix line over 80 characters.
Gulsah Kose [Sun, 9 Mar 2014 13:49:09 +0000 (15:49 +0200)]
staging: cxt1e1: Fix line over 80 characters.

Fix checkpatch.pl issues with line over 80
characters in comet.c

Signed-off-by: Gulsah Kose <gulsah.1004@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: octeon: octeon-ethernet.h Fix Unnecessary space after function pointer name
Aybuke Ozdemir [Sun, 16 Mar 2014 05:08:46 +0000 (07:08 +0200)]
staging: octeon: octeon-ethernet.h Fix Unnecessary space after function pointer name

The patch fixes the following checkpatch.pl warnings:
WARNING: Unnecessary space after function pointer name.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: Clean-up comment line style in r8180_rtl8225.h
Ana Rey [Mon, 17 Mar 2014 20:22:21 +0000 (21:22 +0100)]
staging: rtl8187se: Clean-up comment line style in r8180_rtl8225.h

This patch clean-up comment-line style in r8180_rtl8225.h as the
CodingStyle recommends.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: Delete commented code and whiteline
Ana Rey [Mon, 17 Mar 2014 20:22:22 +0000 (21:22 +0100)]
staging: rtl8187se: Delete commented code and whiteline

Delete all commented code and whitelines in
ieee80211/ieee80211_crypt_wep.c that are not necessary.

Fix sparse warnings:
ERROR: do not use C99 // comments

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: Delete unnecessary comment in r8180_core.c
Ana Rey [Mon, 17 Mar 2014 20:22:24 +0000 (21:22 +0100)]
staging: rtl8187se: Delete unnecessary comment in r8180_core.c

Delete unnecessary comments in r8180_core.c

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: Use min_t instead of min
Ana Rey [Mon, 17 Mar 2014 20:22:29 +0000 (21:22 +0100)]
staging: rtl8187se: Use min_t instead of min

Use min_t instead of min function in ieee80211/ieee80211_wx.c

Fix sparse warnings:
WARNING: min() should probably be min_t(u8, network->ssid_len, 32)

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: Use ether_addr_copy function
Ana Rey [Mon, 17 Mar 2014 20:22:28 +0000 (21:22 +0100)]
staging: rtl8187se: Use ether_addr_copy function

Use ether_addr_copy instead of memcpy function for fast copy an
Ethernet address in ieee80211/ieee80211_wx.c

Fixes sparse warnings:
WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: Convert from printk into netdev_err or netdev_info
Ana Rey [Mon, 17 Mar 2014 20:22:27 +0000 (21:22 +0100)]
staging: rtl8187se: Convert from printk into netdev_err or netdev_info

Convert from printk functions into netdev_err or netdev_info.

Fix checkpatch.pl warning:
WARNING: printk() should include KERN_ facility level

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: Fix indent in switch statement.
Ana Rey [Mon, 17 Mar 2014 20:22:26 +0000 (21:22 +0100)]
staging: rtl8187se: Fix indent in switch statement.

Fix indent in switch statement in ieee80211/ieee80211_wx.c.

Fix checkpatch.pl error:
ERROR: switch and case should be at the same indent.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: Fix commend line
Ana Rey [Mon, 17 Mar 2014 20:22:25 +0000 (21:22 +0100)]
staging: rtl8187se: Fix commend line

Fix commend line in ieee80211/ieee80211_wx.c as the codingStyle of the
kernel recommends.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8187se: Delete commented code
Ana Rey [Mon, 17 Mar 2014 20:22:23 +0000 (21:22 +0100)]
staging: rtl8187se: Delete commented code

Delete all commented code in ieee80211/ieee80211_wx.c
that are not necessary.

Signed-off-by: Ana Rey <anarey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: rtl8187se: Fix warning symbol should be static
Andreea-Cristina Bernat [Mon, 17 Mar 2014 17:58:28 +0000 (19:58 +0200)]
Staging: rtl8187se: Fix warning symbol should be static

This patch solves the sparse warning: "symbol 'ieee80211_ccmp_aes_encrypt' was
not declared. Should it be static?"

Signed-off-by: Andreea-Cristina Bernat <bernat.ada@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:rtl8187se: Fix sparse warning restricted __le16 degrades to integer
Himangi Saraogi [Mon, 10 Mar 2014 03:19:23 +0000 (08:49 +0530)]
staging:rtl8187se: Fix sparse warning restricted __le16 degrades to integer

This patch fixes the following sparse warning in r8180_core.c - warning:
restricted __le16 degrades to integer. Also, the variable morefrag is
changed to bool as it is being used as a bool.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Reviewed-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: iio: light: Checkpatch fixes tsl2x7x_core.c
Aybuke Ozdemir [Sun, 16 Mar 2014 14:56:27 +0000 (16:56 +0200)]
staging: iio: light: Checkpatch fixes tsl2x7x_core.c

This patch fixes these errors and warning messages found by
checkpatch.pl:
ERROR: return is not a function, parentheses are not required.
WARNING: space prohibited before semicolon.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: iio: addac: adt7316.h Fix Unnecessary space after function pointer name
Aybuke Ozdemir [Sun, 16 Mar 2014 04:37:24 +0000 (06:37 +0200)]
staging: iio: addac: adt7316.h Fix Unnecessary space after function pointer name

The patch fixes the following checkpatch.pl warnings:
WARNING: Unnecessary space after function pointer name.

Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: iio/light: Fix return values in tsl2583.c
Monam Agarwal [Sun, 9 Mar 2014 05:28:40 +0000 (10:58 +0530)]
Staging: iio/light: Fix return values in tsl2583.c

This patch fixes following smatch warnings:
/drivers/staging/iio/light/tsl2583.c:436 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)?
/drivers/staging/iio/light/tsl2583.c:448 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)?
/drivers/staging/iio/light/tsl2583.c:461 taos_chip_on() info: why not propagate 'ret' from i2c_smbus_write_byte_data() instead of (-1)?

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging:dgnc: Removed assignments from if statements.
Chi Pham [Sun, 9 Mar 2014 09:39:04 +0000 (10:39 +0100)]
staging:dgnc: Removed assignments from if statements.

Coccinelle was used for this patch. 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: Chi Pham <fempsci@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: android: Remove whitespace issue
Georgiana Rodica Chelu [Sun, 9 Mar 2014 12:40:14 +0000 (14:40 +0200)]
staging: android: Remove whitespace issue

This patch fixes coding style issue: removing the whitespace

Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: gdm724x: gdm_mux.c: fixed coding style
Daniel Ngu [Sun, 16 Mar 2014 19:17:28 +0000 (08:17 +1300)]
Staging: gdm724x: gdm_mux.c: fixed coding style

Line over 80 characters

Signed-off-by: Daniel Ngu <daniel.dy.ngu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: gdm724x: netlink_k.c: fixed coding style
Daniel Ngu [Sun, 16 Mar 2014 19:12:32 +0000 (08:12 +1300)]
Staging: gdm724x: netlink_k.c: fixed coding style

Line over 80 characters

Signed-off-by: Daniel Ngu <daniel.dy.ngu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: [BUG] Fix Warning BOGUS urb xfer, pipe 3 != type 1
Malcolm Priestley [Sun, 16 Mar 2014 12:34:11 +0000 (12:34 +0000)]
staging: vt6656: [BUG] Fix Warning BOGUS urb xfer, pipe 3 != type 1

Stable kernels will need patches
staging: vt6656: s_nsInterruptUsbIoCompleteRead remove usb_fill_bulk_urb
staging: vt6656: PIPEnsInterruptRead use usb_fill_int_urb

and a backported version of this patch.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: fix coccinelle warnings
Fengguang Wu [Sun, 16 Mar 2014 20:32:22 +0000 (15:32 -0500)]
staging: r8188eu: fix coccinelle warnings

drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:8030:3-9: Replace memcpy with struct assignment

Generated by: coccinelle/misc/memcpy-assign.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/ozwpan: coding style ether_addr_copy
Jérôme Pinot [Thu, 13 Mar 2014 15:44:30 +0000 (00:44 +0900)]
staging/ozwpan: coding style ether_addr_copy

This fixes the following issues detected by checkpatch.pl:

 WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)
 #220: FILE: drivers/staging/ozwpan/ozcdev.c:220:
 +              memcpy(g_cdev.active_addr, addr, ETH_ALEN);

 WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)
 #286: FILE: drivers/staging/ozwpan/ozcdev.c:286:
 +                      memcpy(addr, g_cdev.active_addr, ETH_ALEN);

 WARNING: Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)
 #176: FILE: drivers/staging/ozwpan/ozpd.c:176:
 +              memcpy(pd->mac_addr, mac_addr, ETH_ALEN);

Signed-off-by: Jerome Pinot <ngc891@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: unisys: visorutil: Clean up sparse warnings in visorutil code
Ken Cox [Mon, 17 Mar 2014 15:37:11 +0000 (10:37 -0500)]
Staging: unisys: visorutil: Clean up sparse warnings in visorutil code

Clean up code to get rid of sparse warnings.

Also fixed variable length arrays declared on the stack by removing
visor_hexDumpToBuffer() and using hex_dump_to_buffer() instead.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: unisys: visorchipset: Clean up sparse warnings in visorchipset code.
Ken Cox [Thu, 13 Mar 2014 20:39:22 +0000 (15:39 -0500)]
Staging: unisys: visorchipset: Clean up sparse warnings in visorchipset code.

Clean up code to get rid of sparse warnings due to accessing I/O space.  Also
declared functions and variables as static if they are only used locally.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: unisys: visorchannel: Clean up sparse warnings in visorchannel code
Ken Cox [Thu, 13 Mar 2014 20:39:21 +0000 (15:39 -0500)]
Staging: unisys: visorchannel: Clean up sparse warnings in visorchannel code

Clean up code to get rid of sparse warnings, mostly due to accessing I/O space.

Remove visorchannel_get_safe_queue(), visorchannel_safesignalremove(),
and visorchannel_safesignalinsert() since they were not called from anywhere.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: unisys: uislib: Cleanup sparse warnings in uislib
Ken Cox [Thu, 13 Mar 2014 20:39:20 +0000 (15:39 -0500)]
Staging: unisys: uislib: Cleanup sparse warnings in uislib

Clean up code to get rid of sparse warnings, mostly related to accessing I/O
space.

Remove uislibcmpxchg64() and use cmpxchg() instead.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: unisys: Clean multiple sparse warnings
Ken Cox [Thu, 13 Mar 2014 20:39:19 +0000 (15:39 -0500)]
Staging: unisys: Clean multiple sparse warnings

Cleaned up multiple sparse warnings, mostly due to improper access of I/O
space.  Also declared functions and variables that were only used locally
as static.

Removed ULTRA_disp_channel_header(), ULTRA_disp_channel(),
ULTRA_disp_vnic_channel() because they were never called.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: unisys: channels: Cleanup sparse warnings
Ken Cox [Thu, 13 Mar 2014 20:39:18 +0000 (15:39 -0500)]
Staging: unisys: channels: Cleanup sparse warnings

Clean up multiple sparse warnings mostly due to different address spaces
when accessing I/O memory.

Also, remove SignalRemoveAll(), SignalQueueHasOneElement(),
SignalQueueIsFull(), because they were never called.

Signed-off-by: Ken Cox <jkc@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: unisys: remove incorrect error handling after queue_delayed_work
Daeseok Youn [Tue, 11 Mar 2014 07:31:03 +0000 (00:31 -0700)]
staging: unisys: remove incorrect error handling after queue_delayed_work

The queue_delayed_work() return false if the work is
already on the queue, true otherwise.
So return value cannot be less than zero.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgnc: replace unnecessary while() with if()
Daeseok Youn [Tue, 11 Mar 2014 03:19:06 +0000 (12:19 +0900)]
staging: dgnc: replace unnecessary while() with if()

It doesn't need to use while loop for getting newrate,
because it always breaks out the end of while loop with
"break". So just replace while with if.

And the type of newrate is "unsigned int", this type
is never less than zero. If it can be set to negative value by
user application with ioctl(), it is not zero but it
can be a unexpected value for setting custom baudrate.

Also smatch says:
drivers/staging/dgnc/dgnc_tty.c:967 dgnc_set_custom_speed() warn:
 unsigned 'newrate' is never less than zero.
drivers/staging/dgnc/dgnc_tty.c:981 dgnc_set_custom_speed() info:
 ignoring unreachable code.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: Add a pr_info per board info
Mark Hounschell [Wed, 12 Mar 2014 16:50:56 +0000 (12:50 -0400)]
staging: dgap: Add a pr_info per board info

This patch adds a pr_info per board that indicates
board number, type, etc..

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: remove more unneeded brd-state states
Mark Hounschell [Wed, 12 Mar 2014 16:50:55 +0000 (12:50 -0400)]
staging: dgap: remove more unneeded brd-state states

This patch removes more unneeded brd-state states

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: remove unused brd->state states
Mark Hounschell [Wed, 12 Mar 2014 16:50:54 +0000 (12:50 -0400)]
staging: dgap: remove unused brd->state states

This patch removes unused brd->state states previously
used in the userland firmware download process.

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: remove unneeded dgap_driver_states
Mark Hounschell [Wed, 12 Mar 2014 16:50:53 +0000 (12:50 -0400)]
staging: dgap: remove unneeded dgap_driver_states

The only driver states we need now is READY or !READY.
No need for a sysfs method of seeing those 2 states so
the sysfs entries for dgap_driver_state is also removed.

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: Replace/remove DGAP_SPINLOCK_INIT macro
Mark Hounschell [Tue, 11 Mar 2014 14:11:43 +0000 (10:11 -0400)]
staging: dgap: Replace/remove DGAP_SPINLOCK_INIT macro

This patch gets rid of the DGAP_SPINLOCK_INIT macro

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: Remove unused DGAP_TRYLOCK macro
Mark Hounschell [Tue, 11 Mar 2014 14:08:11 +0000 (10:08 -0400)]
staging: dgap: Remove unused DGAP_TRYLOCK macro

This patch removes  the unused DGAP_TRYLOCK macro

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: Remove unneeded code from dgap.c
Mark Hounschell [Tue, 11 Mar 2014 14:02:19 +0000 (10:02 -0400)]
staging: dgap: Remove unneeded code from dgap.c

This patch removes more unneeded code that was
supporting the old firmware loading process

Signed-off-by: Mark Hounschell <markh@compro.net>
Tested-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: remove some unused defines in dgap.h
Mark Hounschell [Tue, 11 Mar 2014 14:02:18 +0000 (10:02 -0400)]
staging: dgap: remove some unused defines in dgap.h

This patch removes some unused defines in dgap.h

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: fix a few more 80+ char lines (02/02)
Mark Hounschell [Mon, 10 Mar 2014 19:46:55 +0000 (15:46 -0400)]
staging: dgap: fix a few more 80+ char lines (02/02)

This patch fixes a few more 80+ char lines as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: fix a few more 80+ char lines (01/02)
Mark Hounschell [Mon, 10 Mar 2014 19:46:54 +0000 (15:46 -0400)]
staging: dgap: fix a few more 80+ char lines (01/02)

This patch fixes a few more 80+ char lines as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: dgap: fix a few 80+ char lines
Mark Hounschell [Mon, 10 Mar 2014 18:39:41 +0000 (14:39 -0400)]
staging: dgap: fix a few 80+ char lines

This patch fixes a few 80+ char lines
as reported by checkpatch

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: [BUG] set usb_fill_int_urb interval to 1
Malcolm Priestley [Mon, 17 Mar 2014 21:15:03 +0000 (21:15 +0000)]
staging: vt6656: [BUG] set usb_fill_int_urb interval to 1

As result of patch
staging: vt6656: [BUG] Fix Warning BOGUS urb xfer, pipe 3 != type 1

has resulted in sluggish TX performance due to interupt inverval
being too long.

Set int_interval to 1 as set in bInterval of endpoint 1.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>