Commit graph

78 commits

Author SHA1 Message Date
Mauro Dreissig
12414fa87b staging: rtl8712: Annotate r8712_sitesurvey_cmd()
Add __must_hold() sparse annotation to r8712_sitesurvey_cmd(),
replacing the comments on top of the function.

Signed-off-by: Mauro Dreissig <mukadr@gmail.com>
Link: https://lore.kernel.org/r/20200705180944.20958-1-mukadr@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-07-10 13:52:45 +02:00
Nishka Dasgupta
4bfec30c20 staging: rtl8712: Replace function r8712_dequeue_cmd()
Remove function r8712_dequeue_cmd as all it does is call _dequeue_cmd.
Rename _dequeue_cmd to r8712_dequeue_cmd and change its type from static
to non-static to maintain compatibility with call sites.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:44:06 +02:00
Nishka Dasgupta
54ae9f0fda staging: rtl8712: Replace function r8712_enqueue_cmd()
Merge function _enqueue_cmd into function r8712_enqueue_cmd as
_enqueue_cmd is only called by r8712_enqueue_cmd, and then only once.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:44:06 +02:00
Nishka Dasgupta
9839208ea9 staging: rtl8712: Change return values of r8712_getrfreg_cmd()
Change return values of r8712_getrfreg_cmd from _SUCCESS/_FAIL to
0/-ENOMEM respectively. Modify call site accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-01 10:44:05 +02:00
Nishka Dasgupta
a5dedb5c98 staging: rtl8712: Change return values of r8712_setrfreg_cmd()
Change return values of function r8712_setrfreg_cmd from _SUCCESS/_FAIL
to 0/-ENOMEM respectively. Modify call site accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:09 +08:00
Nishka Dasgupta
da8e81205e staging: rtl8712: Remove r8712_setassocsta_cmd()
Remove function r8712_setassocsta_cmd as it is only called by
mp_start_joinbss, which was removed in the previous patch.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:09 +08:00
Nishka Dasgupta
d2179f3e93 staging: rtl8712: Remove r8712_setrttbl_cmd()
Remove unused function r8712_setrttbl_cmd.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:09 +08:00
Nishka Dasgupta
dc0f139b2e staging: rtl8712: Replace r8712_free_evt_priv()
Remove function r8712_free_evt_priv as all it does is call
_free_evt_priv.
Rename _free_evt_priv to r8712_free_evt_priv to maintain compatibility
with call sites.
Change type of new r8712_free_evt_priv from static to non-static to
match old definition.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:08 +08:00
Nishka Dasgupta
03c05c470f staging: rtl8712: Replace r8712_free_cmd_priv()
Remove function r8712_free_cmd_priv as all it does is call
_free_cmd_priv.
Change type of new r8712_free_cmd_priv from static to non-static to
match definition of original r8712_free_cmd_priv.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:08 +08:00
Nishka Dasgupta
6257450f89 staging: rtl8712: Change return values of r8712_init_evt_priv()
Change return values of the function r8712_init_evt_priv from
_SUCCESS/_FAIL to 0/-ENOMEM. Modify call site accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:08 +08:00
Nishka Dasgupta
795eb36899 staging: rtl8712: Replace function r8712_init_evt_priv()
Remove function r8712_init_evt_priv as all it does is call
_init_evt_priv.
Rename _init_evt_priv to r8712_init_evt_priv to maintain compatibility
with call sites.
Change type of new r8712_init_evt_priv from static to non-static as
original r8712_init_evt_priv was non-static.
Change return type of new r8712_init_evt_priv to int as original had
return type u32 but new (formerly _init_evt_priv) had return type sint.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:08 +08:00
Nishka Dasgupta
d91674322d staging: rtl8712: Change return values in r8712_init_cmd_priv()
Change return values in r8712_init_cmd_priv from _SUCCESS/_FAIL to
0/-ENOMEM. Modify call site accordingly.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-26 10:00:08 +08:00
Nishka Dasgupta
e39956c0d3 staging: rtl8712: Replace function r8712_init_cmd_priv()
Remove function r8712_init_cmd_priv as all it does is call
_init_cmd_priv.
Rename _init_cmd_priv to r8712_init_cmd_priv to maintain compatibility
with call sites.
Change type of new r8712_init_cmd_priv from static to non-static as
original r8712_init_cmd_priv was non-static.
Change return type of new r8712_init_cmd_priv to int as original had
return type u32 but new (formerly _init_cmd_priv) had return type sint.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-21 16:55:23 +02:00
Nishka Dasgupta
7a7213b08a staging: rtl8712: Remove function r8712_setrfintfs_cmd()
Remove unused function r8712_setrfintfs_cmd.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-21 16:55:23 +02:00
Nishka Dasgupta
8cb9a36ebf staging: rtl8712: Remove function r8712_setfwra_cmd()
Remove unused function r8712_setfwra_cmd.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-21 16:55:23 +02:00
Nishka Dasgupta
f9ed50d78c staging: rtl8712: Remove function r8712_setfwdig_cmd()
Remove unused function r8712_setfwdig_cmd().

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-21 16:55:22 +02:00
Nishka Dasgupta
575922b1cf staging: rtl8712: Remove function r8712_setbasicrate_cmd
Remove unused function r8712_setbasicrate_cmd.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-21 16:55:22 +02:00
Nishka Dasgupta
b43f6a60e2 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.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-21 16:46:18 +02:00
Nishka Dasgupta
ec25a9c5f7 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.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-21 16:46:17 +02:00
Nishka Dasgupta
a2b6457e58 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.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-21 16:46:17 +02:00
Nishka Dasgupta
fc73bf6712 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.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-21 16:46:17 +02:00
Nishka Dasgupta
2f1539b24e 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.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-20 14:47:29 +02:00
Nishka Dasgupta
092a370dbf staging: rtl8712: r8712_setstakey_cmd(): Change return type
Change return type of function r8712_setstakey_cmd() to void as its
return value is never stored, 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:29 +02:00
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
6c8265009f staging: rtl8712: Change return values of r8712_createbss_cmd()
Change return values of r8712_createbss_cmd from _SUCCESS and _FAIL to 0
and -ENOMEM respectively.
Change return type of the function from unsigned to int to reflect this.
Change call site to check for 0 instead of _SUCCESS.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-13 11:39:31 +02:00
Nishka Dasgupta
1f1e13017d staging: rtl8712: Change return values of r8712_setdatarate_cmd()
Change the return values of function r8712_setdatarate_cmd from _SUCCESS
and _FAIL to 0 and -ENOMEM respectively.
Change the return type of the function from u8 to int to reflect this.
Change the call site of the function to check for 0 instead of _SUCCESS.
Return the value at the call site directly instead of storing it in a
return variable.
Remove now-unused return variable.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-13 11:39:31 +02:00
Michael Straube
e24c1f8658 staging: rtl8712: add SPDX identifiers
This satisfies a checkpatch warning and is the preferred
method for notating the license.

The SPDX identifier is a legally binding shorthand, which
can be used instead of the full boiler plate text.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-03 11:36:09 -07:00
Martin Homuth
b78559b605 staging: rtl8712: style fix multiple line dereferences
This patch fixes various coding style issues in the rtl8712 module as
noted by checkpatch.pl related to dereferencing over multiple lines.

It fixes the following checkpatch.pl warning:

WARNING: Avoid multiple line dereference - prefer %s

Signed-off-by: Martin Homuth <martin@martinhomuth.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-12-21 18:27:15 +01:00
Liam Ryan
a7e585918e staging: rtl8712: Fix unbalanced braces around else statement
Fix checkpath-reported unbalanced braces in the following areas

221: FILE: drivers/staging/rtl8712/hal_init.c:221:
392: FILE: drivers/staging/rtl8712/os_intfs.c:392:
363: FILE: drivers/staging/rtl8712/rtl8712_cmd.c:363:
889: FILE: drivers/staging/rtl8712/rtl8712_recv.c:889:
902: FILE: drivers/staging/rtl8712/rtl871x_cmd.c:902:
84: FILE: drivers/staging/rtl8712/rtl871x_ioctl_set.c:84:
580: FILE: drivers/staging/rtl8712/rtl871x_mlme.c:580:
593: FILE: drivers/staging/rtl8712/usb_intf.c:593:

Signed-off-by: Liam Ryan <liamryandev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-09-17 16:35:27 +02:00
Souptick Joarder
bd4fcdaddc staging : rtl8712: Free memory when kmalloc fails
There are few functions where we need to free previously allocated
memory when kmalloc fails. Else it may lead to memory leakage. In
_init_cmd_priv() and _r8712_init_xmit_priv(), in few places we are
not freeing previously allocated memory when kmalloc fails.

Signed-off-by: Souptick joarder <jrdr.linux@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 11:24:52 +01:00
Sandhya Bankar
11975c56b6 Staging: rtl8712: rtl871x_cmd: Use !x instead of x == NULL.
Use !x instead of x == NULL. This patch was found by checkpatch.

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-20 13:38:00 +02:00
Louie Lu
8292b4de4e staging: rtl8172: fixed comment style in rts871x_cmd.c
Fixed comment style warning by checkpatch:

* Block comments use * on subsequent lines
* Block comments use a trailing */ on a separate line

Signed-off-by: Louie Lu <louie.lu@hopebaytech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-02 14:55:54 +02:00
Binoy Jayan
204a8ac1db rtl8712: Replace semaphore terminate_cmdthread_sema with completion
The semaphore 'terminate_cmdthread_sema' is used as completion,
so convert it to a struct completion type.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:25:47 +02:00
Binoy Jayan
0f89054a0f rtl8712: Replace semaphore cmd_queue_sema with completion
The semaphore 'cmd_queue_sema' is used as completion,
so convert it to a struct completion type.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:25:47 +02:00
Bhaktipriya Shridhar
b1d0550055 staging: rtl8712: rtl871x_cmd: Clean up tests if NULL returned on failure
Some functions like kmalloc/kzalloc return NULL on failure.
When NULL represents failure, !x is commonly used.

This was done using Coccinelle:

@@
expression *e;
identifier l1;
@@

e = \(kmalloc\|kzalloc\|kcalloc\|devm_kzalloc\)(...);
...
- e == NULL
+ !e

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Bhumika Goyal
0df56d78d2 Staging: rtl8712: Remove function r8712_setptm_cmd and r8712_gettssi_cmd
The function r8712_setptm_cmd and r8712_gettssi_cmd are not used
anywhere in the kernel so remove them. Also, remove their function
prototypes.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Geliang Tang
818ff7b28b staging: rtl8712: use list_first_entry_or_null()
Use list_first_entry_or_null() instead of list_empty() + LIST_CONTAINOR()
to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 19:53:04 -08:00
Luis de Bethencourt
4ef2de5ae0 staging: rtl8712: spaces preferred around operands
Clean up all instances of checkpatch.pl checks:
CHECK: spaces preferred around that '+'
(and other operands)

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:26:59 -07:00
Luis de Bethencourt
168a2c1028 staging: rtl8712: braces should be used on all arms
Fix all instances of the following checkpatch.pl check:
CHECK: braces {} should be used on all arms of this statement

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:26:59 -07:00
Luis de Bethencourt
1ca96884b1 staging: rtl8712: Remove boolean comparisons
Boolean tests do not need explicit comparison to true or false.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24 19:26:59 -07:00
Joshua Clayton
986fc8e741 staging: rtl8712: rename function
Rename r8712_get_ndis_wlan_bssid_ex_sz() to r8712_get_wlan_bssid_ex_sz(),
which corresponds to the struct whose size it measures.

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:14:03 -07:00
Joshua Clayton
44367877c6 staging: rtl8712: remove duplicate struct
struct ndis_wlan_bssid_ex is a doppelganger of struct wlan_bssid_ex,
and is used about a third as often.

Switch all instances to wlan_bssid_ex, and remove ndis_wlan_bssid_ex

This also gets rid of a use of typedef NDIS_802_11_RATES_EX

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:14:03 -07:00
Joshua Clayton
881edf67b2 staging: rtl8712: simplify size calculation
replace item-by-item  size calculation of a struct
with the size of the struct.

This gets rid of a use of typedef NDIS_802_11_RATES_EX

Signed-off-by: Joshua Clayton <stillcompiling@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07 15:14:03 -07:00
Sudip Mukherjee
39a6e7376a staging: rtl8712: fix stack dump
del_timer_sync() is not to be called in the interrupt context unless
the timer is irqsafe. but most of the functions where commits
6501c8e7d8 and 382d020f44 touched were called in interrupt
context. And as a result the WARN_ON was getting triggered. Changed
to del_timer() in places which were called from interrupt.

Fixes: 382d020f44 ("Staging: rtl8712: Eliminate use of _cancel_timer"
Fixes: 6501c8e7d8 ("Staging: rtl8712: Eliminate use of _cancel_timer_ex")
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=97711
Reported-by: Arek Rusniak <arek.rusi@gmail.com>
Tested-by: Arek Rusniak <arek.rusi@gmail.com>
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 11:54:25 +09:00
Vaishali Thakkar
382d020f44 Staging: rtl8712: Eliminate use of _cancel_timer
Use timer API function del_timer_sync instead of driver
specific function _cancel_timer as besides deactivating
a timer, it also ensures that the timer is stopped on all
CPUs before the driver exists. Also, variables
timer_cancelled and bool are removed as they are no longer
needed.

@a@
expression x;
identifier y;
@@

- _cancel_timer (&x, &y);
+ del_timer_sync (&x);

@@type T; identifier a.y;@@

- T y;
...when != y

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-16 15:46:07 +01:00