Commit graph

54455 commits

Author SHA1 Message Date
Nishka Dasgupta
612168e407 staging: rtl8712: r8712_setopmode_cmd(): Change return type
Change return type of function r8712_setopmode_cmd() from u8 to void as
its return value is never stored or checked or otherwise used.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:47:28 +02:00
Nishka Dasgupta
c24d83e14d staging: rtl8712: r8712_disassoc_cmd(): Change type to void
Change return type of function r8712_disassoc_cmd from u8 to void as its
return value is never stored, checked or otherwise used. Modify its
return statements accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:47:28 +02:00
Nishka Dasgupta
ee71f8e8ed staging: rtl8712: r8712_set_chplan_cmd(): Change return type
Change return type of function r8712_set_chplan_cmd from u8 to void as
its return value is never stored, checked or otherwise used. Change the
return statements accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:47:28 +02:00
Nishka Dasgupta
29de098b33 staging: rtl8712: Change (r8712)_enqueue_cmd to void
Change the return types of r8712_enqueue_cmd to void as the return value
of r8712_enqueue_cmd is never stored, checked, or otherwise used.
Also change the return type of _enqueue_cmd to void as it is only called
by r8712_enqueue_cmd which does not do anything with the return value
except return it itself.
Modify return statements in both functions accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:47:28 +02:00
Nishka Dasgupta
36f484ef09 staging: rtl8712: r8712_joinbss_cmd(): Change return values and type
Change return values of function r8712_joinbss_cmd from _SUCCESS/_FAIL
to 0/-ENOMEM respectively.
Change return type from u8 to int to accommodate return of -ENOMEM.

Similarly, change the return values (_SUCCESS to 0 and _FAIL to -ENOMEM
or -EINVAL) and type (sint to int) of the call site of r8712_joinbss_cmd,
r8712_select_and_join_from_scan, as one of the branches of
r8712_select_and_join_from_scan directly returns the return value of
r8712_joinbss_cmd.

Modify the call sites of r8712_select_and_join_from_scan to check for
0 instead of _SUCCESS.

Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:47:28 +02:00
Nishka Dasgupta
97a738d30c staging: rtl8712: rtl871x_cmd.c: Remove unnecessary null check
Remove the check for whether the value of variable psecnetwork is NULL
as psecnetwork is a field of a field of a non-NULL pointer, and
therefore cannot be NULL itself.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:47:28 +02:00
Nishka Dasgupta
fbcfbf6536 staging: rtl8712: rtl8712_efuse.c: Remove leading p from variable names
Remove leading 'p' from the name of the pointer variable padapter.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:47:28 +02:00
Nishka Dasgupta
f745aa4096 staging: rtl8712: mlme_linux.c: Remove leading p from variable names
Remove leading p from the names of the following pointer variables:
- padapter
- pmlmepriv
- psec_priv.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:47:28 +02:00
Sergio Paracuellos
014860188c staging: mt7621-pci: dt-bindings: add perst-gpio to sample bindings
Both driver and device tree have been updated to use GPIO perst.
Update bindings documentation also.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:45:50 +02:00
Sergio Paracuellos
fd69d7faae staging: mt7621-dts: add gpio perst to pcie bindings node
Driver has been changed to use perts gpio reset instead of
perst builtin behaviour. Update device tree accordly.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:45:50 +02:00
Sergio Paracuellos
07420a02b0 staging: mt7621-pci: use gpio perst instead of builtin behaviour
Some boards seems to ignore the PERST builtin behaviour to properly
perform a pcie line reset. Use gpio PERST behaviour instead which
seems to be more common.

Fixes: bd1a05bd87 ("staging: mt7621-pci: use PERST_N instead of gpio control")
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:45:49 +02:00
Sergio Paracuellos
fdd228cd6d staging: mt7621-pci: fix two messages in driver code
There are two messages in driver code which are not correct.
Fix both of them to clarify boot runs.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:45:49 +02:00
Michael Straube
c2e1e0f30b staging: rtl8188eu: remove unused code
Remove unused and/or commented code from rtw_wlan_util.c.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:45:04 +02:00
Nishka Dasgupta
e5dc970eb1 staging: rts5208: Remove function soft_reset_sd_card()
Remove function soft_reset_sd_card, as all it does is call reset_sd.
Modify call sites of the former to call the latter instead.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:45:03 +02:00
Shobhit Kukreti
65ae78c20b staging: rtl8723bs: Fix Indentation Error: code indent should use tabs where possible
Resolve indentation errors which were caused by a mix of space and tabs
for indentation. Previous patch to fix if-else brace styles revealed
the indentation error

Signed-off-by: Shobhit Kukreti <shobhitkukreti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:56 +02:00
Shobhit Kukreti
fabf298696 staging: rtl8723bs: Resolve the checkpatch error: else should follow close brace '}'
Cleaned up the code to resolve the checkpatch error else should follow
close brace '}' from the following files:

mlme_linux.c
recv_linux.c
sdio_intf.c

Signed-off-by: Shobhit Kukreti <shobhitkukreti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:53 +02:00
Shobhit Kukreti
6a9b5dd1e2 staging: rtl8723bs: Resolve checkpatch error "that open brace { should be on the previous line" in the rtl8723 driver
Cleaned up the code from the following files to get rid of
check patch error "that open brace { should be on the previous line"

drivers/staging/rtl8723bs/os_dep/mlme_linux.c
drivers/staging/rtl8723bs/os_dep/recv_linux.c
drivers/staging/rtl8723bs/os_dep/rtw_proc.c
drivers/staging/rtl8723bs/os_dep/sdio_intf.c
drivers/staging/rtl8723bs/os_dep/sdio_ops_linux.c

Signed-off-by: Shobhit Kukreti <shobhitkukreti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:30 +02:00
Hariprasad Kelam
a7a22bc46c staging: rtl8723bs: hal: hal_btcoex: Remove variables pHalData and pU1Tmp
Remove pHalData variable as it is set but unused in function.
Remove pU1Tmp and replace this with pu8

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:02 +02:00
Colin Ian King
9cc579cc95 staging: rtl8723bs: os_dep: fix indentation on break statement
The break statement is indented one level too deep, fix this.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:02 +02:00
Hariprasad Kelam
d189a7c2f8 staging: rtl8723bs: hal: odm_RegConfig8723B: fix Lines should not end with a '('
this patch fixes below issue reported by checkpatch.pl

CHECK: Lines should not end with a '('
CHECK: Lines should not end with a '('

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:02 +02:00
Hariprasad Kelam
6254acded7 staging: rtl8723bs: os_dep: ioctl_linux: make use of kzalloc
This patch is a cleanup which replaces rtw_malloc(wep_total_len) with
kzalloc() and removes the memset().

The rtw_malloc() does GFP_ATOMIC allocations when in_atomic() is true.
But as the comments for in_atomic() describe, the in_atomic() check
should not be used in driver code.  The in_atomic() check is not
accurate when preempt is disabled.

In this code we are not in IRQ context and we are not holding any
spin_locks so GFP_KERNEL is safe.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
----
changes in v2: Replace rtw_zmalloc with kzalloc
changes in v3: Add proper changelog
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:02 +02:00
Shobhit Kukreti
3565963967 staging: rtl8723bs: hal: Fix Brace Style Issues in if/else statements
Cleaned Up code to fix brace style issues reported by checkpatch:

-space required before the open brace '{'
-Unbalanced braces around if/else statements

Signed-off-by: Shobhit Kukreti <shobhitkukreti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:01 +02:00
Shobhit Kukreti
d47f4db767 staging: rtl8723bs: hal: Remove True/False Comparisons
Removing comparisons to True/False in if statements.

Checkpatch reported:
CHECK: Using comparison to true is error prone

Signed-off-by: Shobhit Kukreti <shobhitkukreti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:01 +02:00
Hariprasad Kelam
f2e741cbba staging: rtl8723bs: hal: rtl8723b_cmd: fix comparison to true is error prone
this patch fixes below issues reported by checkpatch

CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:01 +02:00
Hariprasad Kelam
a029e22345 staging: rtl8723bs: hal: rtl8723b_cmd: fix Comparison to NULL
This patch fixes below issues reported by checkpatch

CHECK: Comparison to NULL could be written "psta"
CHECK: Comparison to NULL could be written
"pmlmepriv->wps_probe_resp_ie"
CHECK: Comparison to NULL could be written "psta"

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:43:01 +02:00
Colin Ian King
d326d99aa0 staging: kpc2000: fix integer overflow with left shifts
Currently there are several left shifts that are assigned to 64 bit
unsigned longs where a signed int 1 is being shifted, resulting in
an integer overflow.  Fix this bit using the BIT_ULL macro to perform
a 64 bit shift.  Also clean up an overly long statement.

Addresses-Coverity: ("Unintentional integer overflow")
Fixes: 7dc7967fc3 ("staging: kpc2000: add initial set of Daktronics drivers")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:39:16 +02:00
Simon Sandström
a50185cbb3 staging: kpc2000: simplify error handling in kp2000_pcie_probe
We can get rid of a few iounmaps in the middle of the function by
re-ordering the error handling labels and adding two new labels.

Signed-off-by: Simon Sandström <simon@nikanor.nu>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:39:16 +02:00
Hariprasad Kelam
0234961dbc staging: rtl8712: rtl87x_io : make use of kzalloc
kmalloc followed by memset can be replaced with kzalloc.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:39:15 +02:00
Hariprasad Kelam
1011f2b09a staging: rtl8192u: ieee80211: Remove redundant memset
alloc_etherdev function internally calls kvzalloc . So we may not need
explicit memset after this call.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:39:15 +02:00
Hariprasad Kelam
da0721cc26 staging: rtl8192e: rtllib_module: Remove redundant memset
alloc_etherdev function internally calls kvzalloc . So we may not need
explicit memset after this call.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:39:15 +02:00
Hariprasad Kelam
42203fbe73 staging: wilc1000: Remove redundant memset
alloc_etherdev function internally calls kvzalloc . So we may not need
explicit memset after this call.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:39:15 +02:00
Bastien Nocera
8fa2081030 staging: rtl8723bs: Remove myself from CC:
I don't have easy access to this hardware anymore.

Signed-off-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:32:07 +02:00
Colin Ian King
57744c8d5c staging: vt6656: fix indentation on break statement
The break statement is indented one level too deep, fix this.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Quentin Deslandes <quentin.deslandes@itdev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:32:07 +02:00
Hariprasad Kelam
6195988510 staging: rtl8723bs: hal: odm_HWConfig: Unneeded variable: "result". Return "HAL_STATUS_SUCCESS"
Remove function ODM_ConfigMACWithHeaderFile as trace is not necessary
and as it is getting called only once and call direct function
"ODM_ReadAndConfig_MP_8723B_MAC_REG"

Issue identified by coccicheck

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
----
changes v2: fixed typo in commit message
changes v3: Remove function ODM_ConfigMACWithHeaderFile and replace
            with ODM_ReadAndConfig_MP_8723B_MAC_REG

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 09:02:00 +02:00
Hariprasad Kelam
f3a9e41368 staging: rtl8723bs: hal: rtl8723b_rf6052: fix spaces preferred around unary operator
ERROR: spaces required around that '<<' (ctx:VxV)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 09:02:00 +02:00
Hariprasad Kelam
f60cb23f0f staging: rtl8723bs: hal: rtl8723b_hal_init: Remove set but unused variable
Remove variable pHalData as it is not being used in function.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 09:02:00 +02:00
Hariprasad Kelam
7036126aa2 staging: rtl8723bs: hal: rtl8723b_hal_init: fix Using comparison to true is error prone
This patch tries to fix below issues reported by checkpatch

CHECK: Using comparison to true is error prone
CHECK: Using comparison to true is false prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 09:02:00 +02:00
Hariprasad Kelam
02ca9aa025 staging: rtl8723bs: hal: rtl8723b_hal_init: fix Comparison to NULL
This patch tries to fix below issues reported by checkpatch

CHECK: Comparison to NULL could be written "!efuseTbl"
CHECK: Comparison to NULL could be written "!psta"

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 09:02:00 +02:00
Hariprasad Kelam
5d8c5c684a staging/rtl8723bs/core/rtw_ap: Remove redundant call to memset
rtw_zmalloc is internally doing memset . So there is no need to call memset
again.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:41 +02:00
Hariprasad Kelam
bd462d407b staging/rtl8723bs/core: Remove redundant call to memset
rtw_zmalloc is doing memset . So there is no need to call memset again.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:41 +02:00
Hariprasad Kelam
7930f8e589 staging: rtl8723bs: hal: Add null check after memory allocation
Add NULL check post call to rtw_zmalloc.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:41 +02:00
Hariprasad Kelam
247c2ad278 staging: rtl8723bs: hal: fix Using comparison to false is error prone
fix below issue reported by checkpatch

CHECK: Using comparison to false is error prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:41 +02:00
Hariprasad Kelam
289fb19ef7 staging: rtl8723bs: hal: Remove return type of initrecvbuf
change return of initrecvbuf from s32 to void. As this function always
returns SUCCESS .

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:41 +02:00
Hariprasad Kelam
4c1c1dbd6d staging: rtl8723bs: hal: spaces preferred around unary operator
This patch fixes below issues reported by checkpatch

CHECK: spaces preferred around that '-' (ctx:VxV)
CHECK: spaces preferred around that '/' (ctx:VxV)

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:41 +02:00
Hariprasad Kelam
88004c3e69 staging: rtl8723bs: hal: Using comparison to true is error prone
fix below issue reported by checkpatch

CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:40 +02:00
Geert Uytterhoeven
0c20037c67 staging: Add missing newline at end of file
"git diff" says:

    \ No newline at end of file

after modifying the files.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:40 +02:00
Colin Ian King
5c8004ce61 staging: erofs: clean up initialization of pointer de
Currently pointer de is being initialized with a value that is
never read and a few statements later de is being re-assigned. Clean
this up by ininitialzing de and removing the re-assignment.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:40 +02:00
Colin Ian King
7c23143199 staging: comedi: usbdux: remove redundant initialization of fx2delay
Variable fx2delay is being initialized to a value that is never read
and is being re-assigned a few statements later. The initialization
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-18 08:59:40 +02:00
Gao Xiang
76bc27a26a staging: erofs: rename data_mapping_mode to datamode
data_mapping_mode is too long as a member name of erofs_vnode,
datamode is straight-forward enough.

Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-17 23:01:48 +02:00
Greg Kroah-Hartman
98a716ce1d Merge branch 'erofs_fix' into staging-next
erofs needed a fix in both -linus and -next branches at the same time.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-17 23:00:37 +02:00