summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8723bs
AgeCommit message (Collapse)Author
2020-02-10staging: rtl8723bs: Remove unneeded goto statementsLarry Finger
In routines rtw_hostapd_ioctl() and wpa_supplicant_ioctl(), several error conditions involve setting a variable indicating the error, followed by a goto. The code following the target of that goto merely returns the value. It is simpler, therefore to return the error value immediately, and eliminate the got target. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Pietro Oliva <pietroliva@gmail.com> Link: https://lore.kernel.org/r/20200210180235.21691-7-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-10staging: rtl8723bs: Fix potential overuse of kernel memoryLarry Finger
In routine wpa_supplicant_ioctl(), the user-controlled p->length is checked to be at least the size of struct ieee_param size, but the code does not detect the case where p->length is greater than the size of the struct, thus a malicious user could be wasting kernel memory. Fixes commit 554c0a3abf216 ("staging: Add rtl8723bs sdio wifi driver"). Reported by: Pietro Oliva <pietroliva@gmail.com> Cc: Pietro Oliva <pietroliva@gmail.com> Cc: Stable <stable@vger.kernel.org> Fixes: 554c0a3abf216 ("staging: Add rtl8723bs sdio wifi driver"). Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20200210180235.21691-5-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-10staging: rtl8723bs: Fix potential security holeLarry Finger
In routine rtw_hostapd_ioctl(), the user-controlled p->length is assumed to be at least the size of struct ieee_param size, but this assumption is never checked. This could result in out-of-bounds read/write on kernel heap in case a p->length less than the size of struct ieee_param is specified by the user. If p->length is allowed to be greater than the size of the struct, then a malicious user could be wasting kernel memory. Fixes commit 554c0a3abf216 ("0taging: Add rtl8723bs sdio wifi driver"). Reported by: Pietro Oliva <pietroliva@gmail.com> Cc: Pietro Oliva <pietroliva@gmail.com> Cc: Stable <stable@vger.kernel.org> Fixes 554c0a3abf216 ("0taging: Add rtl8723bs sdio wifi driver"). Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Link: https://lore.kernel.org/r/20200210180235.21691-3-Larry.Finger@lwfinger.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-10staging: rtl8723bs: fix copy of overlapping memoryColin Ian King
Currently the rtw_sprintf prints the contents of thread_name onto thread_name and this can lead to a potential copy of a string over itself. Avoid this by printing the literal string RTWHALXT instread of the contents of thread_name. Addresses-Coverity: ("copy of overlapping memory") Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20200126220549.9849-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-14staging: rtl8723bs: remove ODM_GetRightChnlPlaceforIQK()Michael Straube
Function ODM_GetRightChnlPlaceforIQK() returns non-zero values only for channels > 14. According to the TODO code valid only for 5 GHz should be removed. - find and remove remaining code valid only for 5 GHz. Most of the obvious ones have been removed, but things like channel > 14 still exist. Remove ODM_GetRightChnlPlaceforIQK() and replace the uses of the return value with zero. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200110210456.13178-1-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-10staging: rtl8723bs: Fix line lengthAndreas Hellmich
Fix some line length errors. Co-developed-by: Annika Knepper <av91obul@stud.informatik.uni-erlangen.de> Signed-off-by: Annika Knepper <av91obul@stud.informatik.uni-erlangen.de> Signed-off-by: Andreas Hellmich <dy26hofu@stud.informatik.uni-erlangen.de> Link: https://lore.kernel.org/r/20191129093939.2782-2-dy26hofu@stud.informatik.uni-erlangen.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-10staging: rtl8723bs: Fix spelling errorsAndreas Hellmich
Fix spelling errors. Co-developed-by: Annika Knepper <av91obul@stud.informatik.uni-erlangen.de> Signed-off-by: Annika Knepper <av91obul@stud.informatik.uni-erlangen.de> Signed-off-by: Andreas Hellmich <dy26hofu@stud.informatik.uni-erlangen.de> Link: https://lore.kernel.org/r/20191129093939.2782-1-dy26hofu@stud.informatik.uni-erlangen.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-18staging: rtl8723bs: remove set but not used variable 'change', 'pos'zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function cfg80211_rtw_change_iface: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1310:5: warning: variable change set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function rtw_cfg80211_set_wpa_ie: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:1803:19: warning: variable pos set but not used [-Wunused-but-set-variable] They are introduced by commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver"), but never used, so remove them. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Link: https://lore.kernel.org/r/1574063156-68155-6-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-18staging: rtl8723bs: remove set but not used variable 'notify_ielen', ↵zhengbin
'notify_ie', 'notify_interval', 'notify_capability' Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function rtw_cfg80211_inform_bss: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:248:9: warning: variable notify_ielen set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function rtw_cfg80211_inform_bss: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:247:6: warning: variable notify_ie set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function rtw_cfg80211_inform_bss: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:246:6: warning: variable notify_interval set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c: In function rtw_cfg80211_inform_bss: drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c:245:6: warning: variable notify_capability set but not used [-Wunused-but-set-variable] They are introduced by commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver"), but never used, so remove them. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Link: https://lore.kernel.org/r/1574063156-68155-5-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-18staging: rtl8723bs: remove set but not used variable 'pmlmeinfo', 'pHalData'zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: In function ConstructBtNullFunctionData: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:2099:24: warning: variable pmlmeinfo set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: In function SetFwRsvdPagePkt_BTCoex: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:2154:24: warning: variable pmlmeinfo set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c: In function SetFwRsvdPagePkt_BTCoex: drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c:2149:23: warning: variable pHalData set but not used [-Wunused-but-set-variable] They are introduced by commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver"), but never used, so remove them. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Link: https://lore.kernel.org/r/1574063156-68155-4-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-18staging: rtl8723bs: remove set but not used variable 'pHalData', 'pdmpriv'zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function rtl8723b_InitAntenna_Selection: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:2237:23: warning: variable pHalData set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c: In function rtl8723b_fill_default_txdesc: drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c:3056:18: warning: variable pdmpriv set but not used [-Wunused-but-set-variable] They are introduced by commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver"), but never used, so remove them. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Link: https://lore.kernel.org/r/1574063156-68155-3-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-18staging: rtl8723bs: remove set but not used variable 'pHalData', 'pregistrypriv'zhengbin
Fixes gcc '-Wunused-but-set-variable' warning: drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function sdio_AggSettingRxUpdate: drivers/staging/rtl8723bs/hal/sdio_halinit.c:578:23: warning: variable pHalData set but not used [-Wunused-but-set-variable] drivers/staging/rtl8723bs/hal/sdio_halinit.c: In function rtl8723bs_hal_init: drivers/staging/rtl8723bs/hal/sdio_halinit.c:734:24: warning: variable pregistrypriv set but not used [-Wunused-but-set-variable] They are introduced by commit 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver"), but never used, so remove them. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: zhengbin <zhengbin13@huawei.com> Link: https://lore.kernel.org/r/1574063156-68155-2-git-send-email-zhengbin13@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-16staging: rtl*: Remove tasklet callback castsKees Cook
In order to make the entire kernel usable under Clang's Control Flow Integrity protections, function prototype casts need to be avoided because this will trip CFI checks at runtime (i.e. a mismatch between the caller's expected function prototype and the destination function's prototype). Many of these cases can be found with -Wcast-function-type, which found that the rtl wifi drivers had a bunch of needless function casts. Remove function casts for tasklet callbacks in the various drivers. Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/201911150926.2894A4F973@keescook Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-15staging: rtl8723bs: fix indentation issueColin Ian King
There is a block of statements that are indented too deeply, remove the extraneous tabs. Signed-off-by: Colin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20191114095747.132407-1-colin.king@canonical.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: rtl8723bs: Remove unnecessary bracesJavier F. Arias
This patch removes unnecessary braces on single statement blocks or that aren't necessary in any arm of the statement. Issue found by Checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/041503946a1c58111e69579838b184359745d8c1.1573577309.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: rtl8723bs: Remove blank lines after an open braceJavier F. Arias
This patch removes blank lines after an open brace. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/847ce59f8429afaac1299794987779d0db54d0be.1573577309.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: rtl8723bs: Remove blank lines before a close braceJavier F. Arias
This patch removes blank lines before a close brase. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/369fa1068078d98d658fe5e8fc335df1b22f5238.1573577309.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-13staging: rtl8723bs: Remove multiple blank linesJavier F. Arias
This patch removes multiple blank lines to solve the warning found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/257b08ad13aa23c2ee53fc333ea3c3f7e3105791.1573577309.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: rtl8723bs: Remove commented codeJavier F. Arias
This patch removes unnecessary commented code. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/1dfda6d22e4a972b9c91c6f56d2dc76603007626.1573219728.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: rtl8723bs: Drop ACPI device idsHans de Goede
The driver only binds by SDIO device-ids, all the ACPI device-id does is causing the driver to load unnecessarily on devices where the DSDT contains a bogus OBDA8723 device. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20191111113846.24940-2-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-11staging: rtl8723bs: Add 024c:0525 to the list of SDIO device-idsHans de Goede
Add 024c:0525 to the list of SDIO device-ids, based on a patch found in the Android X86 kernels. According to that patch this device id is used on the Alcatel Plus 10 device. Reported-and-tested-by: youling257 <youling257@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20191111113846.24940-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-07staging: rtl8723bs: Simplify boolean expressionJavier F. Arias
Simplify expression that it's inverting a boolean value. Issue found by Coccinelle. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/9799bed4370f8cc1bd6a1735721fcd91fac30e09.1572640293.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-07staging: rtl8723bs: Fix line over 80 charactersJavier F. Arias
Fix line over 80 characters by wrapping arguments in function call. Suggested-by: Julia Lawall <julia.lawall@lip6.fr>. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> -- Changes in V4: - Changed the number of arguments before wrapping to make the code more readable. Changes in V3: - Edit the commit message to properly use the Suggested-by tag. Changes in V2: - Edit the commit message to use the Suggested-by tag. drivers/staging/rtl8723bs/hal/rtl8723b_dm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Link: https://lore.kernel.org/r/61967dc169db6d343b9183361cd6c1ad7ad149fd.1572640293.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-05staging: rtl8723bs: hal: Remove unnecessary typecast in kfree.Nachammai Karuppiah
Remove typecast in the call to kfree as it is not needed. Issue fixed using Coccinelle. Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com> Link: https://lore.kernel.org/r/1572973591-12892-1-git-send-email-nachukannan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-05staging: rtl8723bs: Fix lines over 80 charactersJavier F. Arias
This patch fixes the "lines over 80 characters" warnings in lines affected by a previous patch. Issue found by Checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/cb27cffda680eda05c44ee90db98c660fbf98b39.1572820893.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-05staging: rtl8723bs: os_dep: Remove unnecessary variable used in return statementNachammai Karuppiah
Remove the variable that is used only in return statement and return the expression itself. Issue found using coccinelle. Signed-off-by: Nachammai Karuppiah <nachukannan@gmail.com> Link: https://lore.kernel.org/r/1572929483-78993-1-git-send-email-nachukannan@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-03staging: rtl8723bs: Remove unnecessary parenthesesJavier F. Arias
This patch removes unnecessary parentheses. Issue found by checkpatch Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/b2526b464b8afed3b2c3a3a72ae183fb63df3ae7.1572734925.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Change tabs for spacesJavier F. Arias
Change tabs for spaces when they are incorrectly used as separators. Fix suggested by Julia Lawall. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/7b06c103665ab7250dded8c5dadc093228eee7b4.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Fix function call formatJavier F. Arias
Fix function call format by following the coding style guidelines for argument wrapping in function calls. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/828984012f4c58f9d10647511f98005e4d1d5184.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Fix indentation warningsJavier F. Arias
Fix indentation warnings to improve the code formatting. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/166ffc747a4212f81d26b03883dbc04d64deed56.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Remove commented codeJavier F. Arias
Remove commented code for a cleaner file. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/61f9b94781eb0ca1c94a5b6b8c37a8c2d0caaca6.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Add spaces between operatorsJavier F. Arias
Add spaces between operators for a better readability. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/4194f2f5a7ed9deeaf3c2a2f2c91081e1f1189c0.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Fix lines over 80 charactersJavier F. Arias
Fix lines over 80 characters by wrapping arguments in function calls, improving the format for a better code readability. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/6a12577f3b95a77e060a2fb60ff17ce94774c076.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-26staging: rtl8723bs: Replace string with identifierJavier F. Arias
Replace the hardcoded function names with the corresponding predefined identifiers. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/b2ff6a52a7140480c9fdb6486a6ac6b4eb51203b.1571284318.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: rtl8723bs: reduce stack usage of cfg80211_rtw_scanSudip Mukherjee
The build of xtensa allmodconfig gives warning of: In function 'cfg80211_rtw_scan': warning: the frame size of 1040 bytes is larger than 1024 bytes Allocate memory for ssid dynamically to reduce the stack usage, as an added benifit we can remove the memset by using kzalloc while allocating memory. Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Link: https://lore.kernel.org/r/20191018101854.31876-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: rtl8723bs: reduce stack usage of rtw_cfg80211_unlink_bssSudip Mukherjee
The build of xtensa allmodconfig gives warning of: In function 'rtw_cfg80211_unlink_bss': warning: the frame size of 1136 bytes is larger than 1024 bytes Instead of having 'select_network' structure as a variable use it as a pointer. Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20191018104837.23246-1-sudipm.mukherjee@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: rtl8723bs: removed unwanted if..else conditionAliasgar Surti
There is use of if..elseif..else condition which has same logic in all three blocks. Removed if..else block and placed log message instead that. Signed-off-by: Aliasgar Surti <aliasgar.surti500@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1571321906-15074-1-git-send-email-aliasgar.surti500@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-15staging: rtl8723bs: remove casts to pointers in kfreeWambui Karuga
Remove unnecessary casts in pointer types passed to kfree. Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Link: https://lore.kernel.org/r/20191015112637.20824-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-15staging: rtl8723bs: remove unnecessary null checkYueHaibing
Null check before kfree is redundant, so remove it. This is detected by coccinelle. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20191015115511.26560-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-14staging: rtl8723bs: use DIV_ROUND_UP helper macroWambui Karuga
Use the DIV_ROUND_UP macro to replace open-coded divisor calculation to improve readability. Issue found using coccinelle: @@ expression n,d; @@ ( - ((n + d - 1) / d) + DIV_ROUND_UP(n,d) | - ((n + (d - 1)) / d) + DIV_ROUND_UP(n,d) ) Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Link: https://lore.kernel.org/r/20191013191027.6470-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-13staging: rtl8723bs: Remove comparison to NULLWambui Karuga
Remove comparison to NULL in drivers/staging/rtl8723bs/core/rtw_ap.c:1449. Issue found by checkpatch.pl Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Link: https://lore.kernel.org/r/20191010132058.20887-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11staging: rtl8723bs: Remove unnecessary null checkYueHaibing
Null check before kfree is redundant, so remove it. This is detected by coccinelle. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20191010153325.16836-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11staging: rtl8723bs: Remove unnecessary blank linesWambui Karuga
Remove multiple blank lines in drivers/staging/rtl8723bs/core/rtw_mlme.c. Issues reported by checkpatch.pl as: CHECK: Please don't use multiple blank lines Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Link: https://lore.kernel.org/r/50abec172689dfa413437589745032d678b82d04.1570712632.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11staging: rtl8723bs: Remove comparisons to booleans in conditionals.Wambui Karuga
Remove comparisons to true and false in multiple if statements in drivers/staging/rtl8723bs/core/rtw_mlme.c Issues reported by checkpatch.pl as: CHECK: Using comparison to false is error prone CHECK: Using comparison to true is error prone Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Link: https://lore.kernel.org/r/d97eaa803566c15a2658df10cf2ca77acddea7fb.1570712632.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11staging: rtl8723bs: Remove unnecessary braces for single statementsWambui Karuga
Clean up multiple unnecessary braces around single statement blocks in drivers/staging/rtl8723bs/core/rtw_mlme.c Issues reported by checkpatch.pl as: WARNING: braces {} are not necessary for single statement blocks or WARNING: braces {} are not necessary for any arm of this statement Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Link: https://lore.kernel.org/r/c459741e8dc51dc2283fc69f07ed947e2994d0e9.1570712632.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-11staging: rtl8723bs: Remove comparisons to NULL in conditionalsWambui Karuga
Remove most comparisons to NULL in conditionals in drivers/staging/rtl8723bs/core/rtw_mlme.c Issues reported by checkpatch.pl as: CHECK: Comparison to NULL could be written Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Link: https://lore.kernel.org/r/f4752d3a49e02193ed7b47a353e18e56d94b5a68.1570712632.git.wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10staging: rtl8723bs: Fix style in definitionsJavier F. Arias
Fix the style in definitions where commented code was previously removed for an improved code readability. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/fc488562c0ddf3fa8a59e86be9b33506496ccd0c.1570672544.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10staging: rtl8723bs: Remove space before tabsJavier F. Arias
Remove space before tabs to fix checkpatch warning. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/120800f884986092ca757235781d9ddc740ec832.1570672544.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10staging: rtl8723bs: Remove duplicate blank linesJavier F. Arias
Remove duplicate blank lines. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/cdc1899acadc436c2f0247ded9ec2a8b3423350e.1570672544.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10staging: rtl8723bs: Remove commented codeJavier F. Arias
Remove commented code for a cleaner file. Issue found by checkpatch. Signed-off-by: Javier F. Arias <jarias.linux@gmail.com> Link: https://lore.kernel.org/r/132126f0d04d5ca1129e9d682dfe9a535ec7bb39.1570672544.git.jarias.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>