aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712/rtl871x_io.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-10-03staging: rtl8712: add SPDX identifiersMichael Straube1-13/+1
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-02staging: rtl8712: Remove unnecessary parenthesesDafna Hirschfeld1-3/+3
Remove unnecessary parentheses between 'address-of' operators and struct members. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-11Staging: rtl8712: Clean up tests if NULL returned on failureBhumika Goyal1-1/+1
Some functions like kmalloc/usb_alloc_urb/kmalloc_array returns NULL as their return value on failure. !x is generally preferred over x==NULL or NULL==x so make use of !x if the value returned on failure by these functions is NULL. Done using coccinelle: @@ expression e; statement S; @@ e = \(kmalloc\|devm_kzalloc\|kmalloc_array \|devm_ioremap\|usb_alloc_urb\|alloc_netdev\)(...); - if(e==NULL) + if(!e) S Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16Staging: rtl8712: rtl871x_io: Remove explicit castShivani Bhardwaj1-1/+1
Explicit typecasting is not required and should be removed. Semantic patch used: @@ type T; T e; identifier x; @@ * T x = (T)e; Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rtl8712: Remove unnecessary cast for argument of kfreeTapasweni Pathak1-2/+2
This patch removes all occurrences of unnecessary cast on the argument to kfree, all over in rtl8712. There is no need of the cast on the argument to kfree. Greped to find occurrences. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20staging: rtl8712: Delete explicit comparison with false and NULLTapasweni Pathak1-1/+1
This patch delete explicit comparison to false and NULL in files of rtl8712. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23Staging: rtl8712 : Fix line over 80 charactersTapasweni Pathak1-2/+2
This patch fixes checkpatch.pl warning in files of rtl8712 WARNING : line over 80 characters Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: rtl8712: remove wrapper function list_insert_tailJames A Shackleford1-1/+1
list_insert_tail is just an inline wrapper around list_add_tail. This patch removes the wrapper and directly uses list_add_tail. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-26staging: rtl8712: remove wrapper function _init_listheadJames A Shackleford1-4/+4
_init_listhead is just an inline wrapper around INIT_LIST_HEAD. This patch removes the wrapper and directly uses INIT_LIST_HEAD instead. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-19staging: rtl8712: replace kmalloc(..., sizeof(T))Vitaly Osipov1-1/+1
As suggested by Andy Shevchenko on driverdev-devel, replace v = ... sizeof(struct type_of_v) -> sizeof(*v) Based on a cocci patch along the lines of @@ type T; expression E; identifier V; @@ T *V; ... - V = kmalloc(sizeof(T), E); + V = kmalloc(sizeof(*V), E); @@ type T; expression E; identifier V; @@ T *V; ... - V = kzalloc(sizeof(T), E); + V = kzalloc(sizeof(*V), E); Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-25staging: rtl8712: remove _malloc()Vitaly Osipov1-5/+6
This patch removes all usage of _malloc() and the function itself. Most uses are straightforward replacements by kmalloc(..., GFP_ATOMIC), because this was the definition of _malloc(). In a few places it was possible to use kzalloc() or memdup_user. A further improvement would be to replace GFP_ATOMIC with GFP_KERNEL where possible. Verified by compilation only. Initial replacement done by running a Coccinelle script along the lines of: @@ type T; expression E; identifier V; @@ - V = (T) _malloc(E); + V = kmalloc(E, GFP_ATOMIC); @@ expression E, E1; @@ - E1 = _malloc(E); + E1 = kmalloc(E, GFP_ATOMIC); Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09staging: r8712u: Simplify semaphoresLarry Finger1-1/+0
I am preparing to convert this driver from semaphore to mutex locking, The first step has been to eliminate a number of semaphores that were initialized but never used, and one whose only use was a single "up" after initialization. A total of 9 semaphores were removed in this process. One other change was to remove some inline semaphore routines that were unused. In addition, several cases had the following structure: down() if () { ... } up() The locking overhead was reduced by moving the up/down inside the if block. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-04-20Staging: rtl8712: redundant null check before kfree()Alexander Beregalov1-4/+2
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-20staging: r8712u: Add the new driver to the mainline kernelLarry Finger1-0/+163
This code is for a completely new version of the Realtek 8192 USB devices such as the D-Link DWA-130. The Realtek code, which was originally for Linux, Windows XP and Windows CE, has been stripped of all code not needed for Linux. In addition, only one additional configuration variable, which enables AP mode, remains. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Tested-by: Frederic Leroy <fredo@starox.org>