Commit Graph

633 Commits

Author SHA1 Message Date
Michael Straube
98ab51df76 staging: rtl8723bs: remove ODM_GetRightChnlPlaceforIQK()
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>
2020-01-14 14:56:37 +01:00
Andreas Hellmich
4d17363db0 staging: rtl8723bs: Fix line length
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-10 15:57:27 +01:00
Andreas Hellmich
68468503e0 staging: rtl8723bs: Fix spelling errors
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-12-10 15:57:23 +01:00
zhengbin
7da8abcf48 staging: rtl8723bs: remove set but not used variable 'change', 'pos'
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 554c0a3abf ("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-18 12:49:42 +01:00
zhengbin
eb22caade5 staging: rtl8723bs: remove set but not used variable 'notify_ielen', '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 554c0a3abf ("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-18 12:49:42 +01:00
zhengbin
17b937a9d6 staging: rtl8723bs: remove set but not used variable 'pmlmeinfo', 'pHalData'
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 554c0a3abf ("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-18 12:49:42 +01:00
zhengbin
68a65ab1b7 staging: rtl8723bs: remove set but not used variable 'pHalData', 'pdmpriv'
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 554c0a3abf ("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-18 12:49:41 +01:00
zhengbin
7fcd011a86 staging: rtl8723bs: remove set but not used variable 'pHalData', 'pregistrypriv'
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 554c0a3abf ("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-18 12:49:40 +01:00
Kees Cook
6cfed59848 staging: rtl*: Remove tasklet callback casts
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-16 14:41:02 +01:00
Colin Ian King
6caba26ff7 staging: rtl8723bs: fix indentation issue
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-15 14:11:23 +08:00
Javier F. Arias
7db57ca4b1 staging: rtl8723bs: Remove unnecessary braces
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-13 00:04:54 +01:00
Javier F. Arias
309e05f5f9 staging: rtl8723bs: Remove blank lines after an open brace
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-13 00:04:54 +01:00
Javier F. Arias
839e18aa1e staging: rtl8723bs: Remove blank lines before a close brace
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-13 00:04:54 +01:00
Javier F. Arias
c3cc574f2b staging: rtl8723bs: Remove multiple blank lines
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-13 00:04:53 +01:00
Javier F. Arias
e11898460e staging: rtl8723bs: Remove commented code
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-11 17:05:42 +01:00
Hans de Goede
2d9d249153 staging: rtl8723bs: Drop ACPI device ids
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-11 16:38:01 +01:00
Hans de Goede
3d5f1eedbf staging: rtl8723bs: Add 024c:0525 to the list of SDIO device-ids
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-11 16:38:00 +01:00
Javier F. Arias
c3a12cc1ec staging: rtl8723bs: Simplify boolean expression
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-07 16:14:11 +01:00
Javier F. Arias
a8fa78b8f4 staging: rtl8723bs: Fix line over 80 characters
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-07 16:14:10 +01:00
Nachammai Karuppiah
e1955fcdc7 staging: rtl8723bs: hal: Remove unnecessary typecast in kfree.
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-05 18:21:21 +01:00
Javier F. Arias
8888ed0323 staging: rtl8723bs: Fix lines over 80 characters
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-05 18:00:13 +01:00
Nachammai Karuppiah
55238d7a46 staging: rtl8723bs: os_dep: Remove unnecessary variable used in return statement
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-05 18:00:12 +01:00
Javier F. Arias
19c1e145a4 staging: rtl8723bs: Remove unnecessary parentheses
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-11-03 13:43:55 +01:00
Javier F. Arias
ec9e2a0ff1 staging: rtl8723bs: Change tabs for spaces
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-26 20:33:53 +02:00
Javier F. Arias
e004d7ac7d staging: rtl8723bs: Fix function call format
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-26 20:33:52 +02:00
Javier F. Arias
fc4776941f staging: rtl8723bs: Fix indentation warnings
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-26 20:33:52 +02:00
Javier F. Arias
22b5cbd1d1 staging: rtl8723bs: Remove commented code
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-26 20:33:51 +02:00
Javier F. Arias
e25af5e3ee staging: rtl8723bs: Add spaces between operators
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-26 20:33:36 +02:00
Javier F. Arias
e52c13d6dc staging: rtl8723bs: Fix lines over 80 characters
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-26 20:33:36 +02:00
Javier F. Arias
dcad082453 staging: rtl8723bs: Replace string with identifier
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-26 20:33:35 +02:00
Sudip Mukherjee
f306bde186 staging: rtl8723bs: reduce stack usage of cfg80211_rtw_scan
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-24 22:40:54 -04:00
Sudip Mukherjee
9f665d8203 staging: rtl8723bs: reduce stack usage of rtw_cfg80211_unlink_bss
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-24 22:40:54 -04:00
Aliasgar Surti
be88dae8e2 staging: rtl8723bs: removed unwanted if..else condition
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-24 22:40:50 -04:00
Wambui Karuga
f57ff0a9b8 staging: rtl8723bs: remove casts to pointers in kfree
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-15 18:35:01 +02:00
YueHaibing
bbecf7de09 staging: rtl8723bs: remove unnecessary null check
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-15 18:35:00 +02:00
Wambui Karuga
807411911d staging: rtl8723bs: use DIV_ROUND_UP helper macro
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-14 15:36:58 +02:00
Wambui Karuga
c86673e884 staging: rtl8723bs: Remove comparison to NULL
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-13 10:00:35 +02:00
YueHaibing
0fa79a78b1 staging: rtl8723bs: Remove unnecessary null check
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-11 11:05:59 +02:00
Wambui Karuga
2e821be220 staging: rtl8723bs: Remove unnecessary blank lines
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-11 11:05:59 +02:00
Wambui Karuga
e7e12d6650 staging: rtl8723bs: Remove comparisons to booleans in conditionals.
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-11 11:05:59 +02:00
Wambui Karuga
92f87db5a9 staging: rtl8723bs: Remove unnecessary braces for single statements
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-11 11:05:58 +02:00
Wambui Karuga
409e833203 staging: rtl8723bs: Remove comparisons to NULL in conditionals
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-11 11:05:58 +02:00
Javier F. Arias
ac478ce773 staging: rtl8723bs: Fix style in definitions
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-10 10:56:51 +02:00
Javier F. Arias
042e9a6857 staging: rtl8723bs: Remove space before tabs
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-10 10:56:51 +02:00
Javier F. Arias
5bb48864d3 staging: rtl8723bs: Remove duplicate blank lines
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-10 10:56:51 +02:00
Javier F. Arias
26752254fa staging: rtl8723bs: Remove commented code
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>
2019-10-10 10:56:41 +02:00
Javier F. Arias
c9ca79b3a5 staging: rtl8723bs: Fix incorrect type in declaration
Fix incorrect type in declaration to solve the warnings 'incorrect
type in argument 2' in the rtw_get_wpa_ie and rtw_get_wpa_ie function
calls, as both expect the same variable in argument 2 with the
type int *.
Issue found by Sparse.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/20191009231953.GA8774@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:55:49 +02:00
Javier F. Arias
c44b23f51f staging: rtl8723bs: Add space between elements
Concatenated strings should use spaces between elements.
Issue found by checkpatch.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/a2387d4c10c2ed0cbca9d5c7ded424892452178f.1570577926.git.jarias.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:55:04 +02:00
Javier F. Arias
af2f2c5e20 staging: rtl8723bs: Fix function call wrapping style
Fix the wrapping style used for the function call.
Issue found by checkpatch.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/f43f9295d7412d610e278be608fba6f2cc14cac9.1570577926.git.jarias.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:55:03 +02:00
Javier F. Arias
a9ce2354f7 staging: rtl8723bs: Fix line over 80 characters
Break last two function call arguments into two separate lines.
Issue found by checkpatch.

Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
Link: https://lore.kernel.org/r/9a8f7b026780b3a7387c29f1d67a7c23d4b159eb.1570577926.git.jarias.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-10 10:55:03 +02:00