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>
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)
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>
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>
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>
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>
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>
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>
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>
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
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
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>
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
|
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.
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?
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.
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>
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)?
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
|
Stable kernels will need patches
staging: vt6656: s_nsInterruptUsbIoCompleteRead remove usb_fill_bulk_urb
staging: vt6656: PIPEnsInterruptRead use usb_fill_int_urb
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);
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>
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.
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>
Gary Rookard [Tue, 11 Mar 2014 03:24:29 +0000 (23:24 -0400)]
Staging: lustre: fld: fix split strings.
unsplit strings from two lines to one. Changes resulted
in line over 80 characters warning. Leaving the latter
of the two warnings for possible string grepping reasons.
Signed-off-by: Gary Alan Rookard <garyrookard@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
It initializes an analog input subdevice that only has a (*cancel)
function. It also does a request_irq() to hookup an interrupt handler
using it->options[0] as the IRQ. This option is actually the base
address of the I/O region used by the board. If the interrupt handler
actually did get hooked up, the rest of the code assumes that IRQ 10
is being used.
Rewrite the driver to properly support the hardware.
The DAS6402-12/16 boards have 64 single-ended / 32 differential analog
inputs, 2 analog outputs, 8 digital inputs, and 8 digital outputs. Add
proper support for these subdevices.
Stub in the analog input async command support.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This define is only used in the attach to specify the I/O region size
passed to comedi_request_region(). Remove the define and just open
code the value.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: gsc_hpdi: tidy up the register map
For aesthetics, convert the various enums into simple defines to
describe the register map for the board. Group the bit defines with
the associated register define. Convert the helper functions for
the register bit/shift/mask stuff into simple defines.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>