Himangi Saraogi [Sat, 9 Nov 2013 21:34:54 +0000 (03:04 +0530)]
staging:rtl8192e: Rewrite macro definition as static inline function.
This patch removes the checkpatch.pl error Macros "with complex values
should be enclosed in parenthesis" in dot11d.h by rewriting it as a
static inline function.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Teodora Baluta <teobaluta@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Teodora Baluta [Thu, 7 Nov 2013 22:13:46 +0000 (00:13 +0200)]
staging: rtl8188eu: correct code alignment
This patch fixes incorrect code alignment due to mixed indenting with
spaces and tabs. This patch was detected using coccinelle and
silences the following warnings:
drivers/staging/rtl8188eu/core/rtw_io.c:297:2-29: code aligned with following code on line 299
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:4420:2-29: code aligned with following code on line 4422
drivers/staging/rtl8188eu/os_dep/osdep_service.c:54:2-17: code aligned with following code on line 55
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c:7229:2-17: code aligned with following code on line 7231
Signed-off-by: Teodora Baluta <teobaluta@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:46:36 +0000 (19:16 +0530)]
Staging: rtl8192e: Fix Sparse warning of cast to restricted __le32 in rtl_core.c
This patch fixes the following sparse warnings in rtl8192e/rtl_core.c-
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1846:46: warning: cast to restricted __le32
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:1951:46: warning: cast to restricted __le32
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2199:50: warning: cast to restricted __le32
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:45:48 +0000 (19:15 +0530)]
Staging: rtl8192e: Fix incorrect type in assignment in rtl_core.c
This patch fixes the following sparse warning in rtl8192e/rtl_core.c-
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:10: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:10: expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:10: got int
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:13: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:13: expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:13: got int
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:16: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:16: expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:16: got int
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:19: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:19: expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:565:19: got int
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:10: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:10: expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:10: got int
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:13: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:13: expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:13: got int
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:16: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:16: expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:16: got int
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:19: warning: incorrect type in initializer (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:19: expected restricted __le16
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:566:19: got int
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2012:12: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2012:12: expected unsigned short [unsigned] [usertype] fc
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2012:12: got restricted __le16 [usertype] frame_ctl
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2102:46: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2102:46: expected unsigned int [unsigned] [usertype] BufferAddress
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2102:46: got restricted __le32 [usertype] <noident>
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2137:41: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2137:41: expected unsigned int [unsigned] [usertype] NextDescAddress
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2137:41: got restricted __le32 [usertype] <noident>
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2401:38: warning: incorrect type in assignment rtllib_softmac.c(different base types)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2401:38: expected unsigned int [unsigned] [usertype] BufferAddress
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2401:38: got restricted __le32 [usertype] <noident>
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:44:56 +0000 (19:14 +0530)]
Staging: rtl8192e: Fix Sparse Warning for Static Declarations in rtl_core.c
This patch fixes the following sparse warning in rtl8192e/rtl_core.c-
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:58:5: warning: symbol 'hwwep' was not declared. Should it be static?
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:588:5: warning: symbol 'WDCAPARA_ADD' was not declared. Should it be static?
drivers/staging/rtl8192e/rtl8192e/rtl_core.c:2695:13: warning: symbol 'rtl8192_interrupt' was not declared. Should it be static?
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:43:49 +0000 (19:13 +0530)]
Staging: rtl8192e: Fix incorrect type in assignment in r8192E_dev.c
This patch fixes the following sparse warning in rtl8192e/r8192E_dev.c-
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1275:27: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1275:27: expected unsigned int [unsigned] [usertype] TxBuffAddr
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1275:27: got restricted __le32 [usertype] <noident>
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1305:27: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1305:27: expected unsigned int [unsigned] [usertype] TxBuffAddr
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:1305:27: got restricted __le32 [usertype] <noident>
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:42:28 +0000 (19:12 +0530)]
Staging: rtl8192e: Fix Sparse warning of cast from restricted __le16 in r8192E_dev.c
This patch fixes the following Sparse warning in rtl8192e/r8192E_dev.c-
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:196:34: warning: cast from restricted __le16
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:198:33: warning: cast from restricted __le16
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c:200:33: warning: cast from restricted __le16
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:41:31 +0000 (19:11 +0530)]
Staging: rtl8192e: Fix Sparse Warning for Static Declarations in rtllib_crypt_wep.c
This patch fixes the following Sparse warnings in rtllib_crypt_wep.c-
drivers/staging/rtl8192e/rtllib_crypt_wep.c:273:12: warning: symbol 'rtllib_crypto_wep_init' was not declared. Should it be static?
drivers/staging/rtl8192e/rtllib_crypt_wep.c:279:13: warning: symbol 'rtllib_crypto_wep_exit' was not declared. Should it be static?
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:40:18 +0000 (19:10 +0530)]
Staging: rtl8192e: Fix Sparse Warning for Static Declarations in rtllib_crypt_tkip.c
This patch fixes the following Sparse warnings in rtllib_crypt_tkip.c-
drivers/staging/rtl8192e/rtllib_crypt_tkip.c:755:12: warning: symbol 'rtllib_crypto_tkip_init' was not declared. Should it be static?
drivers/staging/rtl8192e/rtllib_crypt_tkip.c:761:13: warning: symbol 'rtllib_crypto_tkip_exit' was not declared. Should it be static?
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:39:25 +0000 (19:09 +0530)]
Staging: rtl8192e: Fix Sparse warning of cast to restricted __le16 in rtllib_crypt_tkip.c
This patch fixes the following Sparse warnings in rtllib_crypt_tkip.c-
drivers/staging/rtl8192e/rtllib_crypt_tkip.c:176:16: warning: cast to restricted __le16
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:37:50 +0000 (19:07 +0530)]
Staging: rtl8192e: Fix Sparse Warning for Static Declarations in rtllib_crypt_ccmp.c
This patch fixes the following Sparse warnings in rtllib_crypt_ccmp.c-
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c:446:12: warning: symbol 'rtllib_crypto_ccmp_init' was not declared. Should it be static?
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c:452:13: warning: symbol 'rtllib_crypto_ccmp_exit' was not declared. Should it be static?
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Fri, 8 Nov 2013 12:56:20 +0000 (18:26 +0530)]
Staging: rtl8192e: Fix incorrect type in assignment in rtl819x_BAProc.c
This patch fixes the following Sparse warnings in
rtl819x_BAProc.c-
drivers/staging/rtl8192e/rtl819x_BAProc.c:118:21: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl819x_BAProc.c:118:21: expected unsigned short [unsigned] [usertype] tmp
drivers/staging/rtl8192e/rtl819x_BAProc.c:118:21: got restricted __le16 [usertype] <noident>
drivers/staging/rtl8192e/rtl819x_BAProc.c:122:13: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl819x_BAProc.c:122:13: expected unsigned short [unsigned] [addressable] [usertype] tmp
drivers/staging/rtl8192e/rtl819x_BAProc.c:122:13: got restricted __le16 [usertype] <noident>
drivers/staging/rtl8192e/rtl819x_BAProc.c:125:13: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl819x_BAProc.c:125:13: expected unsigned short [unsigned] [addressable] [usertype] tmp
drivers/staging/rtl8192e/rtl819x_BAProc.c:125:13: got restricted __le16 [usertype] <noident>
drivers/staging/rtl8192e/rtl819x_BAProc.c:181:13: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl819x_BAProc.c:181:13: expected unsigned short [unsigned] [usertype] tmp
drivers/staging/rtl8192e/rtl819x_BAProc.c:181:13: got restricted __le16 [usertype] <noident>
drivers/staging/rtl8192e/rtl819x_BAProc.c:184:13: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtl819x_BAProc.c:184:13: expected unsigned short [unsigned] [addressable] [usertype] tmp
drivers/staging/rtl8192e/rtl819x_BAProc.c:184:13: got restricted __le16 [usertype] <noident>
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:35:09 +0000 (19:05 +0530)]
Staging: rtl8192e: Fix Sparse Warning for Static Declarations in rtllib_softmac.c
This patch fixes the following Sparse warnings in rtllib_softmac.c-
drivers/staging/rtl8192e/rtllib_softmac.c:3636:12: warning: symbol 'rtllib_MgntDisconnectIBSS' was not declared. Should it be static?
drivers/staging/rtl8192e/rtllib_softmac.c:3661:13: warning: symbol 'rtllib_MlmeDisassociateRequest' was not declared. Should it be static?
drivers/staging/rtl8192e/rtllib_softmac.c:3687:13: warning: symbol 'rtllib_MgntDisconnectAP' was not declared. Should it be static?
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:28:57 +0000 (18:58 +0530)]
Staging: rtl8192e: Fix incorrect type in assignment in rtllib_softmac.c
This patch fixes the following Sparse warning in rtllib_softmac.c-
drivers/staging/rtl8192e/rtllib_softmac.c:298:12: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:298:12: expected unsigned short [unsigned] [usertype] fc
drivers/staging/rtl8192e/rtllib_softmac.c:298:12: got restricted __le16 [usertype] frame_ctl
drivers/staging/rtl8192e/rtllib_softmac.c:810:32: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:810:32: expected restricted __le16 [usertype] frame_ctl
drivers/staging/rtl8192e/rtllib_softmac.c:810:32: got int
drivers/staging/rtl8192e/rtllib_softmac.c:814:34: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:814:34: expected restricted __le16 [usertype] duration_id
drivers/staging/rtl8192e/rtllib_softmac.c:814:34: got int
drivers/staging/rtl8192e/rtllib_softmac.c:821:33: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:821:33: expected restricted __le16 [usertype] algorithm
drivers/staging/rtl8192e/rtllib_softmac.c:821:33: got int
drivers/staging/rtl8192e/rtllib_softmac.c:955:24: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:955:24: expected unsigned short [unsigned] [usertype] val16
drivers/staging/rtl8192e/rtllib_softmac.c:955:24: got restricted __le16 [usertype] <noident>
drivers/staging/rtl8192e/rtllib_softmac.c:1263:33: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:1263:33: expected restricted __le16 [usertype] duration_id
drivers/staging/rtl8192e/rtllib_softmac.c:1263:33: got int
drivers/staging/rtl8192e/rtllib_softmac.c:1282:30: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_softmac.c:1282:30: expected restricted __le16 [usertype] listen_interval
drivers/staging/rtl8192e/rtllib_softmac.c:1282:30: got unsigned short [unsigned] [usertype] listen_interval
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:27:37 +0000 (18:57 +0530)]
Staging: rtl8192e: Fix Sparse Warning of invalid assignment '|=' in rtllib_softmac.c
This patch fixes the following Sparse warning in rtllib_softmac.c-
drivers/staging/rtl8192e/rtllib_softmac.c:812:40: warning: invalid assignment: |=
drivers/staging/rtl8192e/rtllib_softmac.c:812:40: left side has type restricted __le16
drivers/staging/rtl8192e/rtllib_softmac.c:812:40: right side has type int
drivers/staging/rtl8192e/rtllib_softmac.c:924:17: warning: invalid assignment: |=
drivers/staging/rtl8192e/rtllib_softmac.c:924:17: left side has type restricted __le16
drivers/staging/rtl8192e/rtllib_softmac.c:924:17: right side has type int
drivers/staging/rtl8192e/rtllib_softmac.c:924:17: error: cast from unknown type
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Thu, 7 Nov 2013 13:26:28 +0000 (18:56 +0530)]
Staging: rtl8192e: Fix Sparse warning of restricted __le16 degrades to integer in rtllib_softmac.c
This patch fixes the following Sparse warning in rtllib_softmac.c-
drivers/staging/rtl8192e/rtllib_softmac.c:230:19: warning: restricted __le16 degrades to integer
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Sat, 2 Nov 2013 18:09:22 +0000 (23:39 +0530)]
Staging: rtl8192e: Fix incorrect type in assignment in rtllib_tx.c
This patch fixes the following sparse warning in rtllib_tx.c-
drivers/staging/rtl8192e/rtllib_tx.c:234:24: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_tx.c:234:24: expected restricted __le16 [usertype] frag_size
drivers/staging/rtl8192e/rtllib_tx.c:234:24: got int [signed] txb_size
drivers/staging/rtl8192e/rtllib_tx.c:613:43: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_tx.c:613:43: expected restricted __le16 [usertype] payload_size
drivers/staging/rtl8192e/rtllib_tx.c:613:43: got unsigned int [unsigned] len
drivers/staging/rtl8192e/rtllib_tx.c:767:35: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_tx.c:767:35: expected restricted __le16 [usertype] payload_size
drivers/staging/rtl8192e/rtllib_tx.c:767:35: got int [signed] [assigned] bytes
drivers/staging/rtl8192e/rtllib_tx.c:814:51: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_tx.c:814:51: expected restricted __le16 [usertype] seq_ctl
drivers/staging/rtl8192e/rtllib_tx.c:814:51: got unsigned short
drivers/staging/rtl8192e/rtllib_tx.c:174:36: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_tx.c:174:36: expected unsigned short [unsigned] [short] [usertype] <noident>
drivers/staging/rtl8192e/rtllib_tx.c:174:36: got restricted __be16 [usertype] <noident>
drivers/staging/rtl8192e/rtllib_tx.c:873:35: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_tx.c:873:35: expected restricted __le16 [usertype] payload_size
drivers/staging/rtl8192e/rtllib_tx.c:873:35: got unsigned int [unsigned] len
Rashika Kheria [Sat, 2 Nov 2013 18:08:00 +0000 (23:38 +0530)]
Staging: rtl8192e: Fix Sparse Warning for Static Declarations in rtllib_module.c
This patch fixes the following sparse warning in rtllib_module.c-
drivers/staging/rtl8192e/rtllib_module.c:240:12: warning: symbol 'rtllib_init' was not declared. Should it be static?
drivers/staging/rtl8192e/rtllib_module.c:260:13: warning: symbol 'rtllib_exit' was not declared. Should it be static?
Rashika Kheria [Sat, 2 Nov 2013 18:04:44 +0000 (23:34 +0530)]
Staging: rtl8192e: Fix incorrect type in assignment in rtllib_rx.c
This patch fixes the following Sparse warning in rtllib_rx.c-
drivers/staging/rtl8192e/rtllib_rx.c:493:37: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_rx.c:493:37: expected unsigned short [unsigned] [usertype] len
drivers/staging/rtl8192e/rtllib_rx.c:493:37: got restricted __be16 [usertype] <noident>
drivers/staging/rtl8192e/rtllib_rx.c:1227:37: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_rx.c:1227:37: expected unsigned short [unsigned] [usertype] len
drivers/staging/rtl8192e/rtllib_rx.c:1227:37: got restricted __be16 [usertype] <noident>
drivers/staging/rtl8192e/rtllib_rx.c:1635:40: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_rx.c:1635:40: expected restricted __le16 <noident>
drivers/staging/rtl8192e/rtllib_rx.c:1635:40: got int
drivers/staging/rtl8192e/rtllib_rx.c:1637:40: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_rx.c:1637:40: expected restricted __le16 <noident>
drivers/staging/rtl8192e/rtllib_rx.c:1637:40: got int
drivers/staging/rtl8192e/rtllib_rx.c:1641:45: warning: incorrect type in assignment (different base types)
drivers/staging/rtl8192e/rtllib_rx.c:1641:45: expected restricted __le16 <noident>
drivers/staging/rtl8192e/rtllib_rx.c:1641:45: got unsigned short [unsigned] [usertype] <noident>
The wHubCharacteristics field in usb_hub_descriptor structure is __le16
so there is no need for cast. The cpu_to_le16 returns a __le16 type for
a u16 type. Used cpu_to_le16 to silence last sparse error.
drivers/staging/usbip/vhci_hcd.c:223:35: warning: incorrect type in assignment (different base types)
drivers/staging/usbip/vhci_hcd.c:223:35: expected restricted __le16 [usertype] wHubCharacteristics
drivers/staging/usbip/vhci_hcd.c:223:35: got unsigned short [unsigned] [usertype] <noident>
drivers/staging/usbip/vhci_hcd.c:351:34: warning: incorrect type in assignment (different base types)
drivers/staging/usbip/vhci_hcd.c:351:34: expected unsigned short [unsigned] [short] [usertype] <noident>
drivers/staging/usbip/vhci_hcd.c:351:34: got restricted __le16 [usertype] <noident>
drivers/staging/usbip/vhci_hcd.c:352:34: warning: incorrect type in assignment (different base types)
drivers/staging/usbip/vhci_hcd.c:352:34: expected unsigned short [unsigned] [short] [usertype] <noident>
drivers/staging/usbip/vhci_hcd.c:352:34: got restricted __le16 [usertype] <noident>
drivers/staging/usbip/vhci_hcd.c:540:36: warning: restricted __le16 degrades to integer
Himangi Saraogi [Sat, 2 Nov 2013 12:01:22 +0000 (17:31 +0530)]
staging:usbip:stub_rx.c: Remove warning quoted string split across lines
This patch removes the checkpatch.pl warnings "quoted string split
across lines" in stub_rx.c by merging the quoted strings and the
ensuring that the lines are not more than 80 characters long.
This patch removes the checkpatch.pl warning "do not add new typedefs"
and changes all source files that use that typedef. Also lines were
shortened to 80 characters to do away with the checkpatch.pl warning
"line over 80 characters" generated due to replacement of the
hfa384x_bytestr_t by struct hfa384x_bytestr in prism2mgmt.c,
prism2mgmt.h, prism2mib.c, prism2sta.c.
Himangi Saraogi [Sat, 2 Nov 2013 17:12:22 +0000 (22:42 +0530)]
staging:media:go7007:saa7134-go7007.c: Remove space before tabs
This patch removes the checkpatch.pl warning "please, no space before
tabs" in saa7134-go7007.c by converting space followed by tab to tab
followed by tab.
Ingrid Cheung [Sun, 10 Nov 2013 01:53:21 +0000 (20:53 -0500)]
Staging: bcm: Fix checkpatch warning for long line.
Fixed a line that was over 80 characters in Bcmchar.c.
Signed-off-by: Ingrid Cheung <hi@ingridcheung.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Teodora Baluta [Sun, 10 Nov 2013 15:12:43 +0000 (17:12 +0200)]
staging: vt6655: fix assignment of bool to 0
This patch fixes the following warnings detected using coccinelle for
drivers/staging/wmgr.c file:
drivers/staging/vt6655/wmgr.c:2335:1-22: WARNING: Assignment of bool to 0/1
drivers/staging/vt6655/wmgr.c:2338:1-27: WARNING: Assignment of bool to 0/1
This fixes sparse warnings for functions and variables, e.g.:
* drivers/staging/vt6656/card.c:69:11: warning: symbol 'cwRXBCNTSFOff'
was not declared. Should it be static?
Some warnings were false positives, such as:
* drivers/staging/vt6656/dpc.c:249:5: warning: symbol 'RXbBulkInProcessData'
was not declared. Should it be static?
Himangi Saraogi [Sun, 10 Nov 2013 08:54:44 +0000 (14:24 +0530)]
Staging: rtl8187se: Fix indentation errors
This patch fixes the checkpatch.pl warnings "code indent should use
tabs where possible" in ieee80211/ieee80211_softmac.c.
Also unnecessary blanks lines are removed.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ana Rey Botello [Thu, 7 Nov 2013 08:31:21 +0000 (09:31 +0100)]
Staging: rtl8187se: use macro IW_HANDLER to initialize r8180_wx_handlers
Use IW_HANDLER to initialize iw_handler structure like in others wireless
driver.
Acked-by: Pablo Neira Ayuso <pablo@gnumonks.org> Signed-off-by: Ana Rey <anarey@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Wed, 6 Nov 2013 11:26:33 +0000 (16:56 +0530)]
Staging:rtl8187se: Insert spaces after commas
This patch fixes the checkpatch.pl warnings
space required after that ',' in ieee80211/ieee80211_softmac.c
Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Wed, 6 Nov 2013 05:40:24 +0000 (11:10 +0530)]
staging:rtl8187se: Use preferred library linux/uaccess.h over asm/uaccess.h
This patch fixes the checkpatch.pl warning "Use #include
<linux/uaccess.h> instead of <asm/uaccess.h>" in
ieee80211/ieee80211_softmac.c .
Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Reviewed-by: Lisa Nguyen <lisa@xenapiadmin.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Himangi Saraogi [Tue, 5 Nov 2013 22:06:11 +0000 (03:36 +0530)]
staging:rtl8187se: Shift open brace of function declarations to next line
This patch fixes the checkpatch.pl error "open brace '{' following
function declarations go on the next line" in ieee80211_softmac.c.
Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria [Sat, 2 Nov 2013 17:25:52 +0000 (22:55 +0530)]
Staging: rtl8187se: Remove useless comments in ieee80211_crypt_tkip.c
This patch removes useless comments in ieee80211/ieee80211_crypt_tkip.c.
And, hence also removes the following checkpatch.pl issue-
ERROR: do not use C99 // comments
Rashika Kheria [Sat, 2 Nov 2013 17:23:07 +0000 (22:53 +0530)]
Staging: rtl8187se: Remove unnecessary comments in ieee80211_crypt_ccmp.c
This patch removes unnecessary comments written in ieee80211/ieee80211_crypt_ccmp.c.
And hence also, removes the following checkpatch.pl issue-
ERROR: do not use C99 // comments
Kelley Nielsen [Wed, 6 Nov 2013 13:10:19 +0000 (05:10 -0800)]
staging: ft1000: fix remaining checkpatch issues in ft1000_hw.c
The file ft1000_hw.c is still full of coding style problems that make it
challenging to read and understand. The lines inside the switch cases
in ft1000_proc_drvmsg() are indented too deeply, so remove one leading
tab. Join lines that are now able to fit in the 80 character limit.
This will take care of the "too many leading tabs" issue. Run
checkpatch.pl on the file, and correct all other issues it reports
(except lines with user visible strings over 80 chars).
Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com> Suggested-by: Waskiewicz Jr, Peter P <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kelley Nielsen [Wed, 6 Nov 2013 13:09:56 +0000 (05:09 -0800)]
staging: ft1000: flatten nesting in dsp_broadcast_msg_id()
The function dsp_broadcast_msg_id() has four levels of nesting. Move the
handling for failed allocation for *dpram_blk from the else block at the
end to the block immediately following the test, reverse the sense of the
test, and exit with an error code if the allocation fails. This eliminates
descending into an if block if the allocation is successful. Move all
lines inside the removed block one tab to the left, and join lines
that will fall under the 80 char limit.
Kelley Nielsen [Wed, 6 Nov 2013 13:09:30 +0000 (05:09 -0800)]
staging: ft1000: fix checkpatch issues in ft1000_poll()
The function ft1000_poll(), in ft1000_hw.c, has many miscellaneous
coding style issues, such as improper indentation, C99 comments, use of
msleep(), and lines over 80 characters. Changes all spaces at the start
of lines to the proper number of tabs. Convert C99 comments to standard
/* */ style. Change calls to msleep(10) to usleep_range(9000, 11000).
Break lines over 80 characters, unless they are user visible strings.
Remove space before open paren in function calls. Fix any other issues
that checkpatch finds.
Kelley Nielsen [Wed, 6 Nov 2013 13:08:58 +0000 (05:08 -0800)]
staging: ft1000: flatten nesting in handle_misc_portid
The newly extracted function handle_misc_portid still has several
unnecessary levels of nesting, having inherited its logic from the
original extracted lines. Move handling for failed memory allocation
(of *pdpram_blk) to the top of the function, and return -1 from within
it. This eliminates the if statement around the body of the function.
Change two levels of nested if/else to an if/else-if/else. Create a
label, exit_failure, at the end of the function with the cleanup code,
and goto it at all points of failure. Also, goto it if the call to
ft1000_receive_cmd() fails, instead of descending into an if block if
it succeeds. Pull all lines from inside the former if blocks to the
left, and rejoin lines to take advantage of reclaimed horizontal space.
The function ft1000_poll, in ft1000_hw.c, is complex, with deep levels
of nesting, unnecessary variables, and style issues. Extract the default
case of the switch statement to its own function, handle_misc_portid.
Make the variable struct dpram_blk *pdpram_blk local to the new function
and remove it from the old. The variable struct pseudo_hdr *ppseudo_hdr is
used only once, to access a member of another struct, so eliminate it
and access the member directly. Return -1 in all the places where the
code fails, and 0 on successful completion. Fix coding style errors.
Kelley Nielsen [Wed, 6 Nov 2013 05:39:10 +0000 (21:39 -0800)]
staging: ft1000: extract dsp_broadcast_msg_id()
The function ft1000_poll, in ft1000_hw.c, is overly complex, with at
least five levels of nesting. Extract the lines in switch case
DSPBCMSGID into their own function, called dsp_broadcast_msg_id(). Pass
one parameter, struct ft1000_usb *dev. Make a copy of struct dpram_blk
*pdpram_blk local to the new function, since it is initialized at the
top of each case in which it appears. Make unsigned long flags local to
the new function. Remove the assignment to struct pseudo_hdr
*ppseudo_hdr, which is otherwise unused in the switch case, and receives
the same assignment at the top of each case in which it appears. Return
an int, 0 for success and -1 for error. Correct style issues in the
extracted lines.
Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kelley Nielsen [Wed, 6 Nov 2013 05:36:55 +0000 (21:36 -0800)]
staging: ft1000: remove unused variable nxtph
The function ft1000_poll, in ft1000_hw.c, is overly complex, with at
least five different levels of nesting. While preparing to extract one
of the cases to its own function, I discovered that the variable nxtph
is not used. It is declared and assigned a value in ft1000_poll(), then
passed by reference to the helper function ft1000_receive_command(),
which receives it as parameter. pnxtph does not appear in the body of
this function. Remove all occurrences of nxtph and pnxtph.
Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com> Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Kelley Nielsen [Thu, 31 Oct 2013 01:05:16 +0000 (18:05 -0700)]
staging: ft1000: STATUS defines completely removed
The ft1000 driver ignores the normal Linux error codes, using its
own macros, STATUS, STATUS_SUCCESS, and STATUS_FAILURE, instead.
Unsigned variables (u16 and u32) are sometimes used to hold them.
This patch converts all occurences of these macros to 0, 0 and -1,
respectively. It also changes the last remaining status variables
(mostly called status and ret) to ints, and removes the declarations
of the macros. This patch does not correct the whitespace issues
in the lines where the changes were made.
Kelley Nielsen [Thu, 31 Oct 2013 01:04:41 +0000 (18:04 -0700)]
staging: ft1000: remove formal function headers from ft1000_hw.c
The file ft1000_hw.c contains formal C99 style function headers that
waste space and convey little to no useful information. This patch
converts the headers to either one line standard /* */ style comments
or shorter standard style headers with parameter lists (if the parameter
list seemed helpful), or eliminates them entirely. Besides needing to be
made of its own accord, this change is in preparation to eliminate the
nonstandard STATUS_* #defines from the driver since they were cited in most
of the headers.
Kelley Nielsen [Wed, 30 Oct 2013 18:48:34 +0000 (11:48 -0700)]
staging: ft1000: STATUS_ defines removed from ft1000_download.c
Two files in the ft1000 usb driver ignore expected Linux error codes,
and instead use two STATUS_SUCCESS 0, and STATUS_FAILURE
0x1001. This patch removes all remaining occurrences of these from the
file ft1000_download.c. All occurrences of STATUS_SUCCESS have been
replaced by 0, and occurrences of STATUS_FAILURE have been replaced by
-1. One occurence of STATUS_FAILURE has been completely removed:
get_handshake collects either a local #define or 0 from its helper
function, check_usb_db, and immediately sets the collecting variable to
STATUS_FAILURE if the #define is returned. check_usb_db has been
modified to return -1 instead of the #define.
Wei Yongjun [Wed, 30 Oct 2013 03:15:51 +0000 (11:15 +0800)]
staging: drm/imx: fix return value check in ipu_add_subdevice_pdata()
In case of error, the function platform_device_register_data() returns
ERR_PTR() and never returns NULL. The NULL test in the return value check
should be replaced with IS_ERR().