summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2021-04-11staging: rtl8723bs: put constant on the right side of a test in ↵Fabio Aiuto1-1/+1
os_dep/ioctl_cfg80211.c fix following post-commit hook checkpatch issue: CHECK: Comparison to NULL could be written "psta" 72: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:854: + if (psta != NULL) { Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/5ac547f3a4bd228f372da7057bbfb3cac1535857.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove empty if and else blocksFabio Aiuto4-33/+3
remove if and else blocks after DBG_8192C removal Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/2d2e09d5033bda1ceb77576e582ecf1dcfccf428.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: put constant on the right side of the testFabio Aiuto1-1/+1
fix following post-commit hook checpatch issues: WARNING: Comparisons should place the constant on the right side of the test 287: FILE: drivers/staging/rtl8723bs/hal/sdio_halinit.c:738: + if (_SUCCESS != ret) Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/e19cff736413714dea4265c17b512882d051a311.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: split long lineFabio Aiuto1-1/+2
fix following post-commit hook checkpatch issue: WARNING: line length of 103 exceeds 100 columns 168: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:1086: + if (efuse_OneByteRead(padapter, efuse_addr, &efuse_data, bPseudoTest) == false) Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/28c078c685059c9b883b563f2c08cfb1d49cb82c.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: put spaces around operatorsFabio Aiuto2-4/+4
fix following post-commit hook checkpatch issues: CHECK: spaces preferred around that '+' (ctx:VxV) 87: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:746: + if ((_offset+_size_byte) > EFUSE_MAX_MAP_LEN) -- CHECK: spaces preferred around that '+' (ctx:VxV) 105: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:847: + if ((_offset+_size_byte) > EFUSE_BT_MAP_LEN) -- CHECK: spaces preferred around that '-' (ctx:VxV) 133: FILE: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:906: + if ((eFuse_Addr-1) < total) -- CHECK: spaces preferred around that '|' (ctx:VxV) 392: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2485: + if (check_fwstate(pmlmepriv, (_FW_LINKED|WIFI_AP_STATE)) != true) Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/65b7cf4b1ae3cea25a316f3c9f56c697ee7be8af.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: fix comparison to nullFabio Aiuto2-5/+5
fix following post-commit hook checkpatch issues: CHECK: Comparison to NULL could be written "!pmlmepriv->wps_probe_req_ie" 348: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1319: + if (pmlmepriv->wps_probe_req_ie == NULL) CHECK: Comparison to NULL could be written "!dvobj" 459: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:184: + if (dvobj == NULL) CHECK: Comparison to NULL could be written "!padapter" 470: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:231: + if (padapter == NULL) CHECK: Comparison to NULL could be written "!padapter" 481: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:240: + if (padapter == NULL) CHECK: Comparison to NULL could be written "!padapter" 492: FILE: drivers/staging/rtl8723bs/os_dep/sdio_intf.c:256: + if (padapter == NULL) Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/2c7557a465aeda7fb6989df30c6250f9ec56ebe1.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove unnecessary bracksFabio Aiuto8-95/+52
remove unnecessary bracks in if-else blocks Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/812e5e0dcb78e49568276237b68dc6f9632c198d.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove commented out DEBUG_CFG80211 symbol definitionFabio Aiuto1-1/+0
remove commented out DEBUG_CFG80211 symbol definition. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/b884ecb5c83c222f0b48839f89e53c45f4489e06.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove empty ifdef blocks conditioned to DEBUG_CFG80211 ↵Fabio Aiuto1-15/+0
definition remove empty ifdef blocks conditioned to DEBUG_CFG80211 definition. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/7c4485a9d02e8c553c1d81f8b98c8479f481e54c.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove commented out SDIO_DEBUG_IO symbol definitionFabio Aiuto1-3/+0
remove commented out SDIO_DEBUG_IO symbol definition. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/7a45b1419bcf4eb2abc25d661acae77018432e46.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove code block guarded by undefined SDIO_DEBUG_IOFabio Aiuto1-9/+1
remove code block guarded by SDIO_DEBUG_IO symbol. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/ee77c4b4e6fbba8e0182e9558f793c88cf398cb5.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove empty code block guarded by DBG_CCXFabio Aiuto1-2/+0
remove code block guarded by DBG_CCX symbol, left empty after DBG_8192C removal. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/b9ff4d7f14decf33064c30b307c3b20494aecbb2.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove code blocks guarded by DEBUG symbolFabio Aiuto3-35/+0
remove code blocks guarded by DEBUG symbol remove undefinition of DEBUG Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/381da3f0c1ddf825b2aa7cbfd074ee2bf42aac4f.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove commented out DEBUG_RTL871X definitionFabio Aiuto1-1/+0
remove commented out DEBUG_RTL871X definition Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/9d04ab2b645e242e35d31abbb1a301e2ad8c4401.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove unused code blocks guarded by DEBUG_RTL871XFabio Aiuto2-55/+0
remove unused code blocks guarded by never set DEBUG_RTL871X Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/c7b590b7ae7fad08cd913462ab385db9230ede4d.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: put spaces around operatorsFabio Aiuto1-1/+1
fix following post-commit hook checkpatch issue: CHECK: spaces preferred around that '+' (ctx:VxV) 89: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2431: + rtw_get_wps_ie(pbuf+_FIXED_IE_LENGTH_, ; ^ len-_FIXED_IE_LENGTH_, NULL, &wps_ielen) CHECK: spaces preferred around that '-' (ctx:VxV) 89: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:2431: + rtw_get_wps_ie(pbuf+_FIXED_IE_LENGTH_, len-_FIXED_IE_LENGTH_, ^ NULL, &wps_ielen); Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/35c6c5efa2661c6fd9d40c3a681eb8470c5015e6.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove all if-blocks left empty by DBG_8192C-remove ↵Fabio Aiuto2-31/+1
coccinelle script remove all empty if blocks left empty by coccinelle script for DBG_8192C macro removal. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/1676083964fe176e996c2c05dfdcb723b49febb6.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove DBG_8192C macro definitionsFabio Aiuto1-10/+0
remove all DBG_8192C macro definitions. Macro DBG_8192C belongs to a family of verbose private tracing macros. The default behaviour is _do nothing_, to activate it one should define DEBUG symbol by hand. So just remove it Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/e7259eeb5927d48a2920548b92dc507befa5e6af.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove all commented out DBG_8192C logsFabio Aiuto9-52/+0
remove all commented out DBG_8192C logs. Macro DBG_8192C belongs to a family of verbose private tracing macros. The default behaviour is _do nothing_, to activate it one should define DEBUG symbol by hand. So just remove it Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/d954fbde0ae689cd053a57f57f954f14b5d013cb.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: remove all DBG_8192C logsFabio Aiuto13-325/+9
remove all DBG_8192C logs. Macro DBG_8192C belongs to a family of verbose private tracing macros. The default behaviour is _do nothing_, to activate it one should define DEBUG symbol by hand. So just remove it with the following semantic patch: @@ expression a, b, c, d, e, f, g, h, i, j, k; constant B, C, D, E; @@ ( - DBG_8192C(a); | - DBG_8192C(a, b); | - DBG_8192C(a, B); | - DBG_8192C(a, b, c); | - DBG_8192C(a, B, c); | - DBG_8192C(a, b, C); | - DBG_8192C(a, B, C); | - DBG_8192C(a, b, c, d); | - DBG_8192C(a, B, c, d); | - DBG_8192C(a, b, C, d); | - DBG_8192C(a, b, c, D); | - DBG_8192C(a, B, C, d); | - DBG_8192C(a, B, c, D); | - DBG_8192C(a, b, C, D); | - DBG_8192C(a, B, C, D); | - DBG_8192C(a, b, c, d, e); | - DBG_8192C(a, B, c, d, e); | - DBG_8192C(a, b, C, d, e); | - DBG_8192C(a, b, c, D, e); | - DBG_8192C(a, b, c, d, E); | - DBG_8192C(a, B, C, d, e); | - DBG_8192C(a, B, c, D, e); | - DBG_8192C(a, B, c, d, E); | - DBG_8192C(a, b, C, D, e); | - DBG_8192C(a, b, C, d, E); | - DBG_8192C(a, b, c, D, E); | - DBG_8192C(a, B, C, D, e); | - DBG_8192C(a, B, C, d, E); | - DBG_8192C(a, B, c, D, E); | - DBG_8192C(a, b, C, D, E); | - DBG_8192C(a, B, C, D, E); | - DBG_8192C(a, b, c, d, e, f); | - DBG_8192C(a, b, c, d, e, f, g); | - DBG_8192C(a, b, c, d, e, f, g, h); | - DBG_8192C(a, b, c, d, e, f, g, h, i); | - DBG_8192C(a, b, c, d, e, f, g, h, i, j); | - DBG_8192C(a, b, c, d, e, f, g, h, i, j, k); ) Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/9b338b3781e40c04104f26832add075e7f72d890.1618064274.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: mt7621-pci: stop using of_pci_range_to_resourceIlya Lipnitskiy1-5/+6
The logic here was already overriding the erroneous IO addresses returned from of_pci_range_to_resource, which is the bulk of the logic. So stop using it altogether and initialize the fields explicitly, as done in aeba3731b150 ("powerpc/pci: Fix IO space breakage after of_pci_range_to_resource() change"). Cc: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> Link: https://lore.kernel.org/r/20210410173331.57949-1-ilya.lipnitskiy@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8723bs: core: Remove an unused variableFabio M. De Francesco1-3/+1
Delete local variable "u8 sec_idx" because is declared and set, but never used. Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com> Link: https://lore.kernel.org/r/20210410150008.5460-4-fmdefrancesco@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-11staging: rtl8192e: Fix incorrect pointer checkMitali Borkar1-1/+1
In commit 92172da23c56 ("staging: rtl8192e: replace comparison to NULL by bool") a check was changed from looking at the data to the pointer, which was incorrect, so revert that portion of the commit to have the proper logic restored. Reported-by: Julia Lawall <julia.lawall@inria.fr> Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com> Fixes: 92172da23c56 ("staging: rtl8192e: replace comparison to NULL by bool") Link: https://lore.kernel.org/r/YHG8qARLUX2KPWwI@kali Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-10staging: comedi: tests: ni_routes_test: Remove unused variable 'olddevroutes'Qiheng Lin1-2/+1
GCC reports the following warning with W=1: drivers/staging/comedi/drivers/tests/ni_routes_test.c:215:45: warning: variable 'olddevroutes' set but not used [-Wunused-but-set-variable] 215 | const struct ni_device_routes *devroutes, *olddevroutes; | ^~~~~~~~~~~~ This variable is not used in function , this commit remove it to fix the warning. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Qiheng Lin <linqiheng@huawei.com> Link: https://lore.kernel.org/r/20210410064932.12905-1-linqiheng@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-10staging: ralink-gdma: Add missing MODULE_DEVICE_TABLEBixuan Cui1-0/+1
This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com> Link: https://lore.kernel.org/r/20210410035037.11322-1-cuibixuan@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-10staging: rtl8192e: remove unnecesasry f-trace like loggingMitali Borkar1-1/+0
Fixed Check: Remove unnecessary f-trace like logging by simply deleting that statement as we have other modes of logging like ftrace. Reported by checkpatch. Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com> Link: https://lore.kernel.org/r/YHDtWizzh5EVLL4/@kali Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-10staging: rtl8192e: replace comparison to NULL by boolMitali Borkar1-3/+3
Fixed Comparison to NULL can be written as '!...' by replacing it with simpler form i.e boolean expression. This makes code more readable alternative. Reported by checkpatch. Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com> Link: https://lore.kernel.org/r/YHDnWpWztxeZospi@kali Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-10staging: rtl8723bs: remove redundant initializationBryan Brattlof1-1/+1
The variable ret is being initialized as 0 and is never used until it's updated by sdio_register_driver() This removes the redundant initialization of ret Signed-off-by: Bryan Brattlof <hello@bryanbrattlof.com> Link: https://lore.kernel.org/r/20210409201235.407671-1-hello@bryanbrattlof.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove MSG_8192C macro definitionsFabio Aiuto1-6/+0
remove obsolete MSG_8192C macro definitions. MSG_8192C is a private trace mechanism macro and is deactivated. (i.e. the default behaviour is _do nothing_) The only way to activate it is to manually define a debug symbol. So just remove it. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/97f38f269e8dabb3dd7464d49022a62cd9773657.1617971593.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove commented out MSG_8192C logFabio Aiuto1-3/+0
remove commented out MSG_8192C log. MSG_8192C is a private trace mechanism macro and is deactivated. (i.e. the default behaviour is _do nothing_) The only way to activate it is to manually define a debug symbol. So just remove it. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/845969563d7c90d1b7aa3215ae29dd91afc5100c.1617971592.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove all MSG_8192C logsFabio Aiuto2-8/+0
remove all MSG_8192C logs. MSG_8192C is a private trace mechanism macro and is deactivated. (i.e. the default behaviour is _do nothing_) The only way to activate it is to manually define a debug symbol. So just remove it. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/fa7f52aa90928dc86b3249ca9c5b27f92c2b071b.1617971592.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove decl of unused static const variable in ↵Fabio Aiuto1-4/+0
os_dep/ioctl_linux.c fix following kernel test robot warning: At top level: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:36:27: warning: 'iw_operation_mode' defined but not used [-Wunused-const-variable=] 36 | static const char * const iw_operation_mode[] = { | ^~~~~~~~~~~~~~~~~ Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/05cc97a114269ee55ac9a91c61493c885fcc0193.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused variable in os_dep/ioctl_linux.cFabio Aiuto1-3/+0
fix following kernel test robot warning: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_wx_set_mlme’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:1128:6: warning: variable ‘reason’ set but not used [-Wunused-but-set-variable] u16 reason; ^~~~~~ Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/6211c4177a9ef1e677987c9ebac445df08605f40.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused variable declaration in include/rtw_security.hFabio Aiuto1-18/+0
fix following kernel test robot warning: At top level: drivers/staging/rtl8723bs/include/rtw_security.h:336:28: warning: 'K' defined but not used [-Wunused-const-variable=] 336 | static const unsigned long K[64] = { | ^ Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/819680ab87bbe543aba966f1fe47b209d3d8a69f.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused pmlmepriv variable in rtw_dbg_port() in ↵Fabio Aiuto1-1/+0
os_dep/ioctl_linux.c remove unused variable. Fix W=1 compiler warning: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2444:20: warning: unused variable ‘pmlmepriv’ [-Wunused-variable] struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/e8a31937b0075162104347e1c8ecc5e6d079f6d2.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused cur_network variable in rtw_dbg_port() in ↵Fabio Aiuto1-1/+0
os_dep/ioctl_linux.c remove unused variable. Fix W=1 compiler warning: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2447:23: warning: unused variable ‘cur_network’ [-Wunused-variable] struct wlan_network *cur_network = &(pmlmepriv->cur_network); Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/6aed13408f912b6c36a19a5e91e17b1126fc6247.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused variable pstapriv in rtw_dbg_port() in ↵Fabio Aiuto1-2/+0
os_dep/ioctl_linux.c remove unused variable. W=1 compiler issue: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2448:19: warning: unused variable ‘pstapriv’ [-Wunused-variable] struct sta_priv *pstapriv = &padapter->stapriv; Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/d433ffa5b52d6510811c882a80c1146c7d7be536.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove set but unused psta variable in rtw_dbg_port() in ↵Fabio Aiuto1-2/+0
os_dep/ioctl_linux.c remove set but unused variable. Fix W=1 compiler warning: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2443:19: warning: variable ‘psta’ set but not used [-Wunused-but-set-variable] struct sta_info *psta; ^~~~ Remove also the function call that sets this variable. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/62b6c48b887decdde4b5343472089665518d205b.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused variables and code block left unused in ↵Fabio Aiuto1-8/+0
os_dep/ioctl_linux.c fix following kernel test robot warnings: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c: In function ‘rtw_dbg_port’: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2548:33: warning: variable ‘preorder_ctrl’ set but not used [-Wunused-but-set-variable] struct recv_reorder_ctrl *preorder_ctrl; ^~~~~~~~~~~~~ remove also unnecessary conditional code block. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/0e950e74565b573a98b851092cc2078045d5ac3d.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused code block in os_dep/ioctl_linux.cFabio Aiuto1-20/+0
remove unused code block which does nothing. A list is parsed but no value is written outside the scope of the function rtw_dbg_port. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/b1d8f99f949fd79b27295e8a508d1b0c5861622f.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused variable and empty for cycles left unused ↵Fabio Aiuto1-6/+1
in os_dep/ioctl_linux.c fix following kernel test robot warnings: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2573:33: warning: variable ‘preorder_ctrl’ set but not used [-Wunused-but-set-variable] struct recv_reorder_ctrl *preorder_ctrl; ^~~~~~~~~~~~~ remove also empty for cycle left unused and counter variable. Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/fb1e8ea3cfeda1af27ab1a9393140e144b5cb4b5.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8723bs: remove unused variable in core/rtw_cmd.cFabio Aiuto1-3/+0
fix following kernel test robot warning: drivers/staging/rtl8723bs/core/rtw_cmd.c: In function 'rtw_cmd_thread': >> drivers/staging/rtl8723bs/core/rtw_cmd.c:390:16: warning: variable 'cmd_start_time' set but not used [-Wunused-but-set-variable] 390 | unsigned long cmd_start_time; | ^~~~~~~~~~~~~~ Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/509eeb1c4a7fcfc37b69cb8578ea146b95b50864.1617962215.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: simplify rtw_cmd_thread's main loopMartin Kaiser1-7/+6
In rtw_cmd_thread's main loop, we wait until there's a command in the queue. To skip this wait statement in subsequent iterations, the driver uses a label and goto instead of the actual loop. We only get back to the initial wait if the queue is empty when we read it. Basically, all we want to do is check if there's a command in the queue. If yes, we process it. If not, we wait until someone enqueues a command. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-12-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: remove a dead assignmentMartin Kaiser1-2/+0
There's no need to set cmd_hdl to NULL after it's used. It will be set again before the next command is processed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-11-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: remove duplicate if statementMartin Kaiser1-7/+0
There's two identical checks if the device was stopped or unplugged. Remove one of them. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-10-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: always free cmd_obj in the cmd threadMartin Kaiser1-21/+3
The rtl8188 driver starts a command thread that reads commands from a queue and processes them. Each command consists of a struct cmd_obj. The command thread may call a function to process the current command and optionally a post-processing function. Eventually, the command's cmd_obj must be freed. At the moment, if there's a post-processing function for the current command, this function has to free the cmd_obj. If there's no post-processing function, the command thread frees cmd_obj. It's much simpler if we always leave it to the command thread to free cmd_obj. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-9-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: move another static array from .h to .cMartin Kaiser2-21/+18
Move the declaration of the rtw_cmd_callback array from rtw_cmd.h to rtw_cmd.c. The _RTW_CMD_C_ symbol is now obsolete and can be removed. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-8-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: move static array from .h to .cMartin Kaiser2-22/+18
Declaring a static array in a header file is likely to cause name conflicts if the declaration is pulled in multiple times. The rtl8188 driver protects the declaration of the wlancmds array in rtw_mlme_ext.h with ifdef _RTW_CMD_C_, which is defined only in rtw_cmd.c. It makes more sense to declare the array in the .c file. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-7-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: remove a constant variableMartin Kaiser1-2/+1
enqueue is always 0. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-09staging: rtl8188eu: remove unused function parameterMartin Kaiser3-4/+3
The struct adapter parameter of rtw_os_recvbuf_resource_alloc is not used. Remove it. While at it, use the same parameter name in the prototype and the function definition. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20210408195601.4762-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>