Nishka Dasgupta [Fri, 21 Jun 2019 06:08:11 +0000 (11:38 +0530)]
staging: rtl8712: r8712_enqueue_cmd_ex(): Change return type
Change return type of function r8712_enqueue_cmd_ex from u8 to void as
its return value is never stored, checked or otherwise used. Modify
return statements accordingly.
Nishka Dasgupta [Fri, 21 Jun 2019 06:08:10 +0000 (11:38 +0530)]
staging: rtl8712: r8712_wdg_timeout_handler: Remove function
Remove function _r8712_wdg_timeout_handler as all it does is call
r8712_wdg_wk_cmd. Modify call site of _r8712_wdg_timeout_handler to call
r8712_wdg_wk_cmd instead.
Nishka Dasgupta [Fri, 21 Jun 2019 06:08:09 +0000 (11:38 +0530)]
staging: rtl8712: r8712_wdg_wk_cmd(): Change return type
Change return type of function r8712_wdg_wk_cmd from u8 to void as its
return value is never stored, checked or otherwise used. Modify its
return statements accordingly.
Nishka Dasgupta [Fri, 21 Jun 2019 06:08:08 +0000 (11:38 +0530)]
staging: rtl8712: r8712_disconnectCtrlEx_cmd(): Change return type
Change return type of function r8712_disconnectCtrlEx_cmd from u8 to
void as its return value is never stored, checked or otherwise used.
Modify its return statements accordingly.
Nishka Dasgupta [Fri, 21 Jun 2019 06:08:07 +0000 (11:38 +0530)]
staging: rtl8712: r8712_addbareq_cmd(): Change return type
Change return type of the function r8712_addbareq_cmd from u8 to void as
its return value is not stored, checked or otherwise used. Also modify
its return statements accordingly.
YueHaibing [Fri, 21 Jun 2019 07:24:55 +0000 (15:24 +0800)]
staging: ks7010: Fix build error
when CRYPTO is m and KS7010 is y, building fails:
drivers/staging/ks7010/ks_hostif.o: In function `michael_mic.constprop.13':
ks_hostif.c:(.text+0x560): undefined reference to `crypto_alloc_shash'
ks_hostif.c:(.text+0x580): undefined reference to `crypto_shash_setkey'
ks_hostif.c:(.text+0x5e0): undefined reference to `crypto_destroy_tfm'
ks_hostif.c:(.text+0x614): undefined reference to `crypto_shash_update'
ks_hostif.c:(.text+0x62c): undefined reference to `crypto_shash_update'
ks_hostif.c:(.text+0x648): undefined reference to `crypto_shash_finup'
Add CRYPTO and CRYPTO_HASH dependencies to fix this.
Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: 8b523f20417d ("staging: ks7010: removed custom Michael MIC implementation.") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nishka Dasgupta [Thu, 20 Jun 2019 13:25:27 +0000 (18:55 +0530)]
staging: rtl8723bs: Delete file odm_AntDiv.c
Delete file odm_AntDiv.c and corresponding header file odm_AntDiv.h as
its functions and definitions are not used anywhere.
Remove reference to odm_AntDiv.h.
Nishka Dasgupta [Thu, 20 Jun 2019 11:53:04 +0000 (17:23 +0530)]
staging: rtl8712: r8712_setMacAddr_cmd(): Change return type
Change return type of function r8712_setMacAddr_cmd() to void as its
return value is never stored, checked, or otherwise used. Modify its
return statements accordingly.
Nishka Dasgupta [Thu, 20 Jun 2019 11:53:01 +0000 (17:23 +0530)]
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.
Nishka Dasgupta [Thu, 20 Jun 2019 11:53:00 +0000 (17:23 +0530)]
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.
Nishka Dasgupta [Thu, 20 Jun 2019 11:52:59 +0000 (17:22 +0530)]
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.
Nishka Dasgupta [Thu, 20 Jun 2019 11:52:58 +0000 (17:22 +0530)]
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.
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.
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: bd1a05bd87ad ("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>
Nishka Dasgupta [Wed, 19 Jun 2019 07:32:01 +0000 (13:02 +0530)]
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.
Shobhit Kukreti [Wed, 19 Jun 2019 00:37:34 +0000 (17:37 -0700)]
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
Hariprasad Kelam [Wed, 19 Jun 2019 01:57:43 +0000 (07:27 +0530)]
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>
Hariprasad Kelam [Tue, 18 Jun 2019 18:59:08 +0000 (00:29 +0530)]
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"
Colin Ian King [Tue, 18 Jun 2019 10:15:54 +0000 (11:15 +0100)]
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: 7dc7967fc39a ("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>
Colin Ian King [Wed, 19 Jun 2019 16:54:05 +0000 (17:54 +0100)]
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>
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
Colin Ian King [Mon, 17 Jun 2019 12:55:29 +0000 (13:55 +0100)]
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>
Colin Ian King [Mon, 17 Jun 2019 13:03:58 +0000 (14:03 +0100)]
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>
Remove function rtw_btcoex_Initialize as the only thing it does is call
hal_btcoex_Initialize.
Modify call sites accordingly.
Issue found with Coccinelle.
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:38 +0000 (23:34 +0530)]
staging: rtl8723bs: hal: Replace function _InitQueuePriority()
Remove function _InitQueuePriority as all it does it call
_InitNormalChipQueuePriority.
Rename _InitNormalChipQueuePriority to _InitQueuePriority for
compatibility with call site.
Issue found with Coccinelle.
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:36 +0000 (23:34 +0530)]
staging: rtl8723bs: Remove function rtw_set_scan_deny_timer_hdl()
Remove function rtw_set_scan_deny_timer_hdl as all it does is call
rtw_clear_scan_deny.
Modify call sites of rtw_set_scan_deny_timer_hdl to call
rtw_clear_scan_deny instead.
Issue found with Coccinelle.
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:35 +0000 (23:34 +0530)]
staging: rtl8723bs: Replace function rtw_free_network_queue()
Remove function rtw_free_network_queue as all it does is call
_rtw_free_network_queue.
Rename _rtw_free_network_queue to rtw_free_network_queue to maintain
compatibility with call sites.
Issue found with Coccinelle.
Remove function power_saving_wk_hdl as all it does is call
rtw_ps_processor. Edit call sites accordingly.
Remove function reset_securitypriv_hdl as all it does is call
rtw_reset_securitypriv. Modify call sites accordingly.
Remove function free_assoc_resources_hdl as all it does is call
rtw_free_assoc_resources with one extra constant argument, and the
former is only called once.
Issue found with Coccinelle.
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:33 +0000 (23:34 +0530)]
staging: rtl8723bs: core: Remove function enable_rate_adaptive()
Remove function enable_rate_adaptive as all it does is call
Update_RA_Entry.
Modify the single callsite of enable_rate_adaptive to call
Update_RA_Entry directly instead.
Issue found with Coccinelle.
Nishka Dasgupta [Wed, 12 Jun 2019 18:04:32 +0000 (23:34 +0530)]
staging: rtl8723bs: core: Replace function Set_MSR()
Remove function Set_NETYPE0_MSR as it only has one line and it is only
called by one other function, Set_MSR.
Replace contents of Set_MSR with the contents of Set_NETYPE0_MSR as
Set_MSR does nothing except call Set_NETYPE0_MSR.
Issue found with Coccinelle.
Nishka Dasgupta [Wed, 12 Jun 2019 06:50:03 +0000 (12:20 +0530)]
staging: rtl8188eu: Change type of rtw_get_sec_ie()
Change return type of function rtw_get_sec_ie from int to void and
remove its return statement as the return value is never stored, checked
or otherwise used.
Christian Gromm [Wed, 12 Jun 2019 09:30:29 +0000 (11:30 +0200)]
staging: most: register net and video config subsystems with configFS
This patch makes the core components net and video register their config
subsystems with configFS. It is needed to have the configuration interface
of the modules exposed to user space.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Hariprasad Kelam [Tue, 11 Jun 2019 18:22:06 +0000 (23:52 +0530)]
staging: rtl8723bs: hal: sdio_ops: fix spaces preferred around unary operator
CHECK: spaces preferred around that '+' (ctx:VxV)
CHECK: spaces preferred around that '+' (ctx:VxV)
CHECK: spaces preferred around that '+' (ctx:VxV)
CHECK: spaces preferred around that '+' (ctx:VxV)
Hariprasad Kelam [Tue, 11 Jun 2019 02:59:53 +0000 (08:29 +0530)]
staging: rtl8723bs: fix issue Comparison to NULL
This patch fixes below issues reported by checkpatch
CHECK: Comparison to NULL could be written "rtw_proc"
CHECK: Comparison to NULL could be written "!rtw_proc"
CHECK: Comparison to NULL could be written "!rtw_proc"
Nishka Dasgupta [Mon, 10 Jun 2019 07:47:09 +0000 (13:17 +0530)]
staging: rtl8723bs: rtw_get_sec_ie(): Change return type
Remove assignment of return value of function rtw_get_sec_ie as it is
never checked or used.
Remove return statement of rtw_get_sec_ie as its return value is never
stored or checked or used.
Change return type of rtw_get_sec_ie to void.
Issue found with Coccinelle.
Remove local variable change_priority, as it takes the value of the
argument priority; as both of these variables are of type u8, priority
can be modified without changing the value of its copy at the call site.
Issue found with Coccinelle.
Remove return variables and in multiple functions and return the values
directly, as the functions all return 0 in all cases.
Issue found with Coccinelle.