Commit graph

69 commits

Author SHA1 Message Date
Michael Straube 36be4102b7 staging: rtl8188eu: rename variable pnetdev -> netdev
Rename the local variable pnetdev in rtw_alloc_etherdev_with_old_priv
to avoid hungarian notation and clear the last checkpatch warning in
the file osdep_service.c.

rtl8188eu/os_dep/osdep_service.c:32: WARNING: line over 80 characters

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200210200830.22868-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-10 12:37:21 -08:00
Michael Straube 226f912a0f staging: rtl8188eu: remove unnecessary RETURN label
Remove unnecessary RETURN label and use return directly instead. Since
the return type of rtw_free_netdev() is void, remove the return at the
end of the function.

Signed-off-by: Michael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20200206085924.21531-1-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-09 16:23:02 -08:00
Nishka Dasgupta 04c8c19856 staging: rtl8188eu: Remove function rtw_modular64()
Remove function rtw_modular64 as all it does is call do_div.
Replace call to rtw_modular64 with call to do_div.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190712071746.2474-5-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-22 07:34:14 +02:00
Bhaskar Singh 22d8eeb32a staging: rtl8188eu: Removed a function and coded inline
This patch removed function named rtw_malloc2d.

I removed this function because this function is used exactly once and
function call have some overhead also.

Maybe this will improve code runtime slightly.

Signed-off-by: Bhaskar Singh <bhaskar.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-27 19:29:39 +02:00
Michael Straube 71e9bd3ff8 staging: rtl8188eu: 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-06-26 11:58:22 +08:00
Ivan Safonov c27fb88256 staging:r8188eu: remove RTW_STATUS_CODE()
RTW_STATUS_CODE() does not used. Remove it.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-05 18:50:05 +01:00
Yamanappagouda Patil 37ad17a4b4 staging: rtl8188eu: Fixed 'Missing a blank line after declarations' warnings.
Fixed checkpatch.pl 'Missing a blank line after declarations' in
rtl8188eu module.

Signed-off-by: Yamanappagouda Patil <goudapatilk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-03 16:52:44 +01:00
Pierre-Yves Kerbrat fb26718744 staging: rtl8188eu: os_dep: remove unnecessary alloc fail message
Remove redundant alloc fail message
This patch fixes the warning found by checkpatch

Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 10:57:13 +02:00
Pierre-Yves Kerbrat 1050394cd7 staging: rtl8188eu: os_dep: remove unnecessary parentheses
Remove parentheses in _rtw_init_queue to fix checkpatch warning

Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 10:57:12 +02:00
Pierre-Yves Kerbrat 3ddaf64835 staging: rtl8188eu: os_dep: fix missing spaces around operators
Fix missing space around operators in rtw_alloc2d function in
osdep_service.c

Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 10:57:12 +02:00
Pierre-Yves Kerbrat ec0f85f8cc staging: rtl8188eu: os_dep: fix block comment alignment issue
Fix coding style issue in block comment in osdep_service.c found by
checkpatch tool

Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 10:57:12 +02:00
Pierre-Yves Kerbrat 3e9e3bb7f7 staging: rtl8188eu: os_dep: remove empty lines
Remove unnecessary empty lines (issue found by checkpatch)

Signed-off-by: Pierre-Yves Kerbrat <pkerbrat@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25 10:57:12 +02:00
Ivan Safonov f8a1a236b7 staging: r8188eu: remove sizeof_priv parameter of rtw_alloc_etherdev_with_old_priv function
sizeof_priv does not used.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 11:23:22 +02:00
Ivan Safonov cfb800828e staging: r8188eu: remove sizeof_priv member of rtw_netdev_priv_indicator
sizeof_priv does not used.

Signed-off-by: Ivan Safonov <insafonov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-12 11:23:22 +02:00
Binoy Jayan f18c566e4e rtl8188eu: pwrctrl_priv: Replace semaphore 'lock' with mutex
The semaphore 'lock' in pwrctrl_priv is a simple mutex, so it should
be written as one. Semaphores are going away in the future.
_enter_pwrlock was using down_interruptible(), so the lock could be broken
by sending a signal. This could be a bug, because nothing checks the return
code here. Hence, using mutex_lock instead of the interruptible version.
Also, remove the now unused wrappers _init_pwrlock, _enter_pwrlock,
_exit_pwrlock and _rtw_down_sema.

Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-21 18:14:51 +02:00
Kyle Kuffermann fb025382b4 staging: rtl8188eu: Remove license paragraph with mailing address
This fixes the issue reported by checkpatch.pl:

	"Do not include the paragraph about writing to the Free Software
	Foundation's mailing address from the sample GPL notice. The FSF
	has changed addresses in the past, and may do so again.  Linux
	already includes a copy of the GPL."

in all files for the rtl8188eu driver.

Signed-off-by: Kyle Kuffermann <kyle.kuffermann@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-28 07:30:36 -07:00
Bhaktipriya Shridhar 61a95c8d71 staging: rtl8188eu: os_dep: Remove unnecessary else after return
This patch fixes the checkpatch warning that else is not generally
useful after a break or return.

This was done using Coccinelle:
@@
expression e2;
statement s1;
@@
if(e2) { ... return ...; }
-else
         s1

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Bhaktipriya Shridhar 92098c1f0b staging: rtl8188eu: os_dep: Remove useless return variables
This patch removes unnecessary return variables and compresses the
return logic.
The coccinelle script that finds and fixes this issue is:
@@ type T; identifier i,f; constant C; @@
- T i;
...when != i
when strict
( return -C;
|
- i =
+ return
f(...);
- return i;
)

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11 22:09:09 -08:00
Rémy Oudompheng ed73749426 staging: rtl8188eu: jiffies are unsigned long
Remove rtw_get_passing_time_ms function and adjust type
of relevant variables.

Signed-off-by: Rémy Oudompheng <remyoudompheng@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15 20:02:47 -08:00
Shraddha Barke b92ae1fd84 Staging: rtl8188eu: os_dep: osdep_service.c: Remove explicit NULL comparison
Remove explicit NULL comparison and write it in its simpler form.
Replacement done with coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:25:02 -07:00
Sudip Mukherjee 9393d34e49 staging: rtl8188eu: remove unused variables
These variables were being set but not used afterwards.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-12 17:23:11 -07:00
Tapasweni Pathak b312fb06b5 staging: rtl8188eu: os_dep: Remove useless cast on kzalloc
Casting rhe return value which is a void pointer is redundant.
The conversion from void pointer to any other pointer type is
guaranteed by the C programming language, as mentioned in
Documentation/CodingStyle, Chap 14.

Removed the cast on kzalloc return value.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23 12:20:44 +08:00
navin patidar 67db20f0bb staging: rtl8188eu: Remove unused functions rtw_cbuf_[full, empty, push, pop]()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:22 -07:00
navin patidar 1e28b63db9 staging: rtl8188eu: Remove unused function rtw_cbuf_alloc()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:21 -07:00
navin patidar ace050139c staging: rtl8188eu: Use msecs_to_jiffies() instead of rtw_ms_to_systime()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:21 -07:00
navin patidar 788253860c staging: rtl8188eu: use jiffies_to_msecs() instead of rtw_systime_to_ms()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:21 -07:00
navin patidar 0fb7778790 staging: rtl8188eu: Remove function rtw_alloc_etherdev()
rtw_alloc_etherdev() is used in rtw_init_netdev() but never gets called
because old_padapter is never NULL.

Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:21 -07:00
navin patidar 9ed24e1f1a staging: rtl8188eu: Remove unused function rtw_change_ifname()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-09 21:15:20 -07:00
navin patidar f7091bc63a staging: rtl8188eu: Replace _rtw_queue_empty() with list_empty()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:13 -04:00
navin patidar 5f223b9533 staging: rtl8188eu: osdep_service.c: Remove unused macro
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:13 -04:00
navin patidar 8151ee9def staging: rtl8188eu: Remove unused function rtw_get_time_interval_ms()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:13 -04:00
navin patidar 8670c6be4c staging: rtl8188eu: Remove unused function rtw_division64()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:13 -04:00
navin patidar fadbe0cd52 staging: rtl8188eu:Remove rtw_zmalloc(), wrapper for kzalloc()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:13 -04:00
navin patidar a733e46751 staging: rtl8188eu: Use kstrtoul() for string to long conversion
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:13 -04:00
navin patidar fb46424e6c staging: rtl8188eu: Remove unused function rtw_sleep_schedulable()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:13 -04:00
navin patidar aa3f5ccb01 staging: rtl8188eu: Remove _rtw_init_listhead(), wrapper for INIT_LIST_HEAD()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:12 -04:00
navin patidar 9c4b0e70af staging: rtl8188eu: Remove rtw_is_list_empty(), wrapper for list_emty()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:12 -04:00
navin patidar 8466070080 staging: rtl8188eu: Remove function rtw_end_of_queue_search()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:12 -04:00
navin patidar ae6787ad4a staging: rtl8188eu: Remove rtw_list_insert_tail(), wrapper for list_add_tail()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:12 -04:00
navin patidar 03a6f3e6a6 staging: rtl8188eu: Remove unused function rtw_list_insert_head()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:12 -04:00
navin patidar b49f224d0d staging: rtl8188eu: Remove rtw_mfree2d(), wrapper for kfree()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:12 -04:00
navin patidar 1ce39848e1 staging: rtl8188eu: Remove function _rtw_memset()
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26 20:27:12 -04:00
navin patidar 0a95a7f448 staging: rtl8188eu: Remove empty files rtw_io.[c,h]
Signed-off-by: navin patidar <navin.patidar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19 15:34:02 -07:00
Larry Finger f42f52aaf9 staging: r8188eu: Replace wrapper around _rtw_memcmp()
This wrapper is replaced with a simple memcmp(). As the wrapper inverts the
logic of memcmp(), care needed to be taken.

This patch also adds one include of vmalloc.h that was missed in a previous
patch.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11 12:41:13 -08:00
Larry Finger 03bd6aea7b staging: r8188eu: Remove wrappers around vfree
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:44:31 -08:00
Larry Finger 2397c6e092 staging: r8188eu: Remove wrappers around vmalloc and vzalloc
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07 10:44:31 -08:00
Larry Finger 4b33d52a4a staging: r8188eu: Remove wrapper around mutex_destroy
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 16:02:10 -08:00
Larry Finger 2ca4ab5324 staging: r8188eu: Remove wrappers _rtw_free_sema, _rtw_up_sema, and _rtw_mutex_init
Any routines that are empty as a result of these changes are also removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 16:02:10 -08:00
Larry Finger efbef10095 staging: r8188eu: Replace wrapper around sema_init
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 16:02:10 -08:00
Larry Finger 762595e58e staging: r8188eu: Replace wrappers for atomic_inc and atomic_inc_return
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 16:02:09 -08:00