Himangi Saraogi [Sun, 9 Mar 2014 00:43:45 +0000 (06:13 +0530)]
staging:nokia_h4p:Replace __attribute__((packed)) by __packed
This patch fixes the checkpatch.pl warning:
WARNING: __packed is preferred over __attribute__((packed)).
As the macro: #define __packed __attribute__((packed)) is defined
in compiler-gcc.h, __attribute__((packed)) is replaced by __packed.
Himangi Saraogi [Sun, 9 Mar 2014 00:17:12 +0000 (05:47 +0530)]
staging:line6: Fix use of variable length arrays
This patch fixes the sparse warning:
drivers/staging/line6/midi.c:50:34: warning: Variable length array is used.
The size is same as the variable LINE6_FALLBACK_MAXPACKETSIZE,
so use that.
This patch fixes the sparse warning:
drivers/staging/rtl8821ae/btcoexist/halbtcoutsrc.c:1080:41: warning: non-ANSI function declaration of function
by adding void to the parameterless function.
Himangi Saraogi [Sat, 8 Mar 2014 23:37:35 +0000 (05:07 +0530)]
staging:rtl8192u:ieee80211: Fix smatch warning of function definition with external linkage
This patch fixes the warnings:
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:381:13: warning: function 'ieee80211_qurey_ShortPreambleMode' with external linkage has definition
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c:395:1: warning: function 'ieee80211_query_HTCapShortGI' with external linkage has definition
Himangi Saraogi [Sat, 8 Mar 2014 22:51:41 +0000 (04:21 +0530)]
staging:rtl8192u: Fix smatch warning of function definition with external linkage
This patch fixes the following smatch warning in r8192U_core.c -
drivers/staging/rtl8192u/r8192U_core.c:3539:13: warning: function 'rtl819x_watchdog_wqcallback' with external linkage has definition
Monam Agarwal [Sat, 8 Mar 2014 14:23:07 +0000 (19:53 +0530)]
Staging: et131x: Fix warning of prefer ether_addr_copy() in et131x.c
This patch fixes the following checkpatch.pl warnings:
WARNING: "Prefer ether_addr_copy() over memcpy() if the Ethernet addresses are __aligned(2)".
I used pahole to see whether addresses are aligned.
Peng Tao [Wed, 5 Mar 2014 13:27:16 +0000 (21:27 +0800)]
staging/lustre/libcfs: remove cfs_strncasecmp
The only difference against generic strncasecmp() is that
cfs_strncasecmp() check NULL pointers and zero length parameter,
which all callers have already taken care of.
Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
They are not called by anyone and cause gcc warning:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:609: warning: ‘kiblnd_debug_conn’ defined but not used
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:589: warning: ‘kiblnd_debug_rx’ defined but not used
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c:597: warning: ‘kiblnd_debug_tx’ defined but not used
Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Sun, 9 Mar 2014 02:51:13 +0000 (08:21 +0530)]
staging:dgnc: Replace printk by pr_warn
This patch replaces printk with pr_warn as the printk calls are used to
display warnings to remove the checkpatch.pl warnings:
WARNING: printk() should include KERN_ facility level
and then WARNING: Prefer netdev_warn(netdev, ... then dev_warn(dev,
... then pr_warn(... to printk(KERN_WARNING ... on adding KERN_WARNING
message designation.
This check is unnecessary because range_table will always be
initialized to range_unknown by comedi_device_postconfig() for
drivers that do not initialize range_table or range_table_list
Signed-off-by: Fred Akers <knivey@botops.net> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Chase Southwood [Sat, 8 Mar 2014 00:42:21 +0000 (18:42 -0600)]
Staging: comedi: addi-data: tidy up counter register map defines in hwdrv_apci1564.c
This patch fixes the register map defines for the counter registers such
that they are all the real offsets to each register, rather than a mix of
real offsets and adders to those offsets.
Chase Southwood [Fri, 7 Mar 2014 08:37:45 +0000 (02:37 -0600)]
Staging: comedi: addi-data: tidy up timer register map defines in hwdrv_apci1564.c
This patch for fixes the register map defines for the timer registers such
that they are all the real offsets to each register, rather than a mix of
real offsets and adders to those offsets.
Chase Southwood [Fri, 7 Mar 2014 08:37:32 +0000 (02:37 -0600)]
Staging: comedi: addi-data: tidy up watchdog register
This patch for fixes the register map defines for the watchdog registers
such that they are all the real offsets to each register, rather than a
mix of real offsets and adders to those offsets.
Chase Southwood [Fri, 7 Mar 2014 08:37:17 +0000 (02:37 -0600)]
Staging: comedi: addi-data: tidy up digital output register map defines in hwdrv_apci1564.c
This patch fixes the register map defines for the digital output registers
such that they are all the real offsets to each register, rather than a
mix of real offsets and adders to those offsets.
Further, some of the old defines were being used incorrectly in the
i_APCI1564_Reset() function. Upon swapping the old defines out for the
new ones in this function, their use has been corrected.
Chase Southwood [Fri, 7 Mar 2014 08:37:05 +0000 (02:37 -0600)]
Staging: comedi: addi-data: tidy up digital input register map defines in hwdrv_apci1564.c
This patch fixes the register map defines for the digital input registers
such that they are all the real offsets to each register, rather than a
mix of real offsets and adders to those offsets.
Further, some of the old defines were being used incorrectly in the
i_APCI1564_Reset() function. Upon swapping the old defines out for the
new ones in this function, their use has been corrected.
Himangi Saraogi [Fri, 7 Mar 2014 17:35:26 +0000 (23:05 +0530)]
staging:rtl8187se: Change argument type in function to bool
Since the argument morefrag is being used as a booleon in the function
rtl8180_tx, the type for the argument is changed to booleon in the
function definition and declaration. This ensures that the variable
morefrag is always in the range 0-1 and overflow dooes not cause errors
if it is assigned a value. Also, this improves code readability.
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>
Monam Agarwal [Thu, 6 Mar 2014 21:09:44 +0000 (02:39 +0530)]
Staging: rtl8192e: Fix Sparse Warning of invalid assignment in rtllib_tx.c
This patch fixes following sparse warnings:
drivers/staging/rtl8192e/rtllib_tx.c:942:45: warning: invalid assignment: +=
drivers/staging/rtl8192e/rtllib_tx.c:942:45: left side has type unsigned long
drivers/staging/rtl8192e/rtllib_tx.c:942:45: right side has type restricted __le16
drivers/staging/rtl8192e/rtllib_tx.c:947:49: warning: invalid assignment: +=
drivers/staging/rtl8192e/rtllib_tx.c:947:49: left side has type unsigned long
drivers/staging/rtl8192e/rtllib_tx.c:947:49: right side has type restricted __le16
Ana Rey [Wed, 5 Mar 2014 16:12:04 +0000 (17:12 +0100)]
staging: rtl8187se: Fix whitespaces in ieee80211/dot11d.h
This patch fixes whitespaces as the codingStyle of the kernel recommends.
Thus, this patch fixes these errors found by checkpatch.pl in r8180.h
ERROR: space required after that close brace '}'
ERROR: space required after that ',' (ctx:VxV)
ERROR: spaces required around that '==' (ctx:VxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: space required after that ',' (ctx:VxV)
Signed-off-by: Ana Rey <anarey@gmail.com> Acked-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Wed, 5 Mar 2014 14:49:07 +0000 (20:19 +0530)]
Staging:rtl8192:ieee80211: Fix sparse warning cast to restricted __le32
This patch fixes the following sparse warnings in ieee80211_rx.c:
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:2201:34: warning: cast
to restricted __le32
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:2202:34: warning: cast
to restricted __le32
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:2203:36: warning: cast
to restricted __le32
by changing the annotation in the structure header file for struct
ieee80211_probe_response for time_stamp and altering the cast
for beacon_interval to le16.
Himangi Saraogi [Wed, 5 Mar 2014 00:50:09 +0000 (06:20 +0530)]
staging:rtl8187se:ieee80211: Fix Sparse Warning for Static Declarations
This patch fixes the following Sparse warnings :
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:27:4: warning:
symbol 'rsn_authen_cipher_suite' was not declared. Should it be static?
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:352:6: warning:
symbol 'ext_ieee80211_send_beacon_wq' was not declared. Should it be
static?
Himangi Saraogi [Tue, 4 Mar 2014 23:47:40 +0000 (05:17 +0530)]
staging:rtl8187se:ieee80211: Fix incorrect type in assignment
This patch fixes sparse warnings like :
(1) drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:331:31:
warning:
incorrect type in assignment (different base types)
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:331:31:
expected unsigned short [unsigned] [usertype] frame_ctl
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:331:31: got
restricted __le16 [usertype] <noident>
(2) drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:1091:32:
warning: incorrect type in assignment (different base types)
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:1091:32:
expected restricted __le16 [usertype] duration_id
drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c:1091:32: got
int
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>
Monam Agarwal [Wed, 5 Mar 2014 20:24:44 +0000 (01:54 +0530)]
Staging: rts5139: Fix Sparse Warning for Static Declarations in rts51x.c
This patch fixes the following sparse warning in rts51x.c
drivers/staging/rts5139/rts51x.c:218:5: warning: symbol 'rts51x_pre_reset' was not declared. Should it be static?
drivers/staging/rts5139/rts51x.c:229:5: warning: symbol 'rts51x_post_reset' was not declared. Should it be static?
Himangi Saraogi [Fri, 7 Mar 2014 16:09:27 +0000 (21:39 +0530)]
staging:nvec: Introduce the use of the managed version of kzalloc
This patch moves shared private data kzalloc to managed devm_kzalloc.
There are no kfree statements associated with this data, so using devm
adds the possibility of the data being freed, if the proble function
fails (if that is possible) or if the remove function succeeds.
Monam Agarwal [Wed, 5 Mar 2014 21:05:16 +0000 (02:35 +0530)]
Staging: wlags49_h2: Fix incorrect type in assignment in wl_wext.c
This patch fixes following sparse warnings:
drivers/staging/wlags49_h2/wl_wext.c:3357:28: warning: incorrect type in assignment (different address spaces)
drivers/staging/wlags49_h2/wl_wext.c:3357:28: expected void [noderef] <asn:1>*[addressable] [assigned] pointer
drivers/staging/wlags49_h2/wl_wext.c:3357:28: got void *<noident>
drivers/staging/wlags49_h2/wl_wext.c:3422:47: warning: incorrect type in assignment (different address spaces)
drivers/staging/wlags49_h2/wl_wext.c:3422:47: expected void [noderef] <asn:1>*[addressable] [assigned] pointer
drivers/staging/wlags49_h2/wl_wext.c:3422:47: got char *[usertype] <noident>
drivers/staging/wlags49_h2/wl_wext.c:3781:21: warning: symbol 'wl_priv_args' was not declared. Should it be static?
Monam Agarwal [Wed, 5 Mar 2014 20:55:30 +0000 (02:25 +0530)]
Staging: wlags49_h2: Fix Sparse Warning for Static Declarations in dhf.c
This patch fixes the following sparse warnings:
drivers/staging/wlags49_h2/dhf.c:109:6: warning: symbol 'signature' was not declared. Should it be static?
drivers/staging/wlags49_h2/dhf.c:126:25: warning: symbol 'mfi_sup' was not declared. Should it be static?
drivers/staging/wlags49_h2/dhf.c:127:25: warning: symbol 'cfi_sup' was not declared. Should it be static?
drivers/staging/wlags49_h2/dhf.c:142:17: warning: symbol 'ltv_info' was not declared. Should it be static?
drivers/staging/wlags49_h2/dhf.c:173:1: warning: symbol 'check_comp_fw' was not declared. Should it be static?
Monam Agarwal [Wed, 5 Mar 2014 20:49:41 +0000 (02:19 +0530)]
Staging: wlags49_h2: Fix Sparse Warning for Static Declarations in hcf.c
This patch fixes following sparse warnings:
drivers/staging/wlags49_h2/hcf.c:253:26: warning: symbol 'cfg_drv_identity' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:262:24: warning: symbol 'cfg_drv_sup_range' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:274:31: warning: symbol 'cfg_drv_act_ranges_pri' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:291:31: warning: symbol 'cfg_drv_act_ranges_sta' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:336:31: warning: symbol 'cfg_drv_act_ranges_hsi' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:373:24: warning: symbol 'cfg_drv_act_ranges_apf' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:3103:1: warning: symbol 'calc_mic' was not declared. Should it be static?
drivers/staging/wlags49_h2/hcf.c:3419:1: warning: symbol 'check_mic' was not declared. Should it be static?
Himangi Saraogi [Wed, 5 Mar 2014 01:00:19 +0000 (06:30 +0530)]
staging:wlags49_h2: Remove unnecessary spaces around parentheses
This patch fixes the following checkpatch errors:
ERROR: space prohibited after that open parenthesis '('
ERROR: space prohibited before that close parenthesis ')'
This patch fixes the following warnings:
WARNING: that open brace { should be on the previous line
WARNING: suspect code indent for conditional statements (16, 16)
Himangi Saraogi [Wed, 5 Mar 2014 00:58:24 +0000 (06:28 +0530)]
staging:wlags49_h2: change comment style
Coding style requires that comments use the standard /* */ style
instead of C99 style. The commented #include statements were also
removed as they are not required.
Monam Agarwal [Mon, 3 Mar 2014 20:06:10 +0000 (01:36 +0530)]
Staging: iio/accel: Fix Prefer netdev_warn(netdev, ...then dev_warn(dev, ... then pr_warn(... to printk(KERN_INFO ... in sca3000_ring.c
This patch fixes the following checkpatch.pl warning in sca3000_ring.c
WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ...
Elena Oat [Thu, 6 Mar 2014 20:10:32 +0000 (22:10 +0200)]
Staging: rtl8188eu: Fix warning of prefer ether_addr_copy.
This patch fixes the warning of "Prefer ether_addr_copy() over memcpy()
if the Ethernet addresses are __aligned(2)" in file rtw_cmd.c. Pahole
shows that the addresses are 2-byte aligned.
Signed-off-by: Elena Oat <oat.elena@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elena Oat [Thu, 6 Mar 2014 07:38:05 +0000 (09:38 +0200)]
Staging: rtl8188eu: Fix warning of suspect code indent.
This patch fixes the warning of "suspect code indent for conditional
statements" in file rtw_cmd.c. I have removed the conditional statements
in two places altogether, as it didn't bring any value.
Signed-off-by: Elena Oat <oat.elena@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Elena Oat [Thu, 6 Mar 2014 07:37:25 +0000 (09:37 +0200)]
Staging: rtl8188eu: Fix warning of space prohibited before semicolon.
This patch fixes the warning of "space prohibited before semicolon" in file rtw_cmd.c.
Signed-off-by: Elena Oat <oat.elena@gmail.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>