#
b249bedb |
|
21-Dec-2023 |
Ryan England <rcengland@gmail.com> |
staging: rtl8712: fix open parentheses alignment Adhere to Linux kernel coding style. Reported by checkpatch: CHECK: Alignment should match open parenthesis Signed-off-by: Ryan England <rcengland@gmail.com> Link: https://lore.kernel.org/r/ZYSemFbzTlgLROMc@kernel.ryanengland.xyz Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
63b5e505 |
|
25-Oct-2022 |
Nam Cao <namcaov@gmail.com> |
staging: rtl8712: check for alloc fail in _r8712_init_recv_priv() The function _r8712_init_recv_priv() and also r8712_init_recv_priv() just returns silently if they fail to allocate memory. Change their return type to int and add necessary checks and handling if they return -ENOMEM Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Signed-off-by: Nam Cao <namcaov@gmail.com> Link: https://lore.kernel.org/r/506ac35a667e511db568b06b86834fd0ceeba453.1666688642.git.namcaov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
c1b068de |
|
04-Apr-2022 |
Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com> |
staging: rtl8712: remove Unnecessary parentheses Reported by checkpatch: CHECK: Unnecessary parentheses Signed-off-by: Alaa Mohamed <eng.alaamohamedsoliman.am@gmail.com> Link: https://lore.kernel.org/r/20220404211942.11446-1-eng.alaamohamedsoliman.am@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
62409b31 |
|
01-May-2021 |
Alexander Vorwerk <alec@vc-celle.de> |
staging: rtl8712: remove multiple multiple assignments Documentation/process/coding-style.rst says (in line 88) "Don't put multiple assignments on a single line either." This patch fixes the coding style issue reported by checkpatch.pl. Signed-off-by: Alexander Vorwerk <alec@vc-celle.de> Link: https://lore.kernel.org/r/20210501234501.5411-1-alec@vc-celle.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
29838144 |
|
29-Sep-2020 |
Dan Carpenter <dan.carpenter@oracle.com> |
staging: rtl8712: Fix enqueue_reorder_recvframe() The logic of this function was accidentally broken by a checkpatch inspired cleanup. I've modified the code to restore the original behavior and also make checkpatch happy. Fixes: 98fe05e21a6e ("staging: rtl8712: Remove unnecesary else after return statement.") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20200929103548.GA493135@mwanda Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
1062aa9e |
|
16-Sep-2020 |
Allen Pais <apais@linux.microsoft.com> |
staging: rtl8712: convert tasklets to use new tasklet_setup() API In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <apais@linux.microsoft.com> Link: https://lore.kernel.org/r/20200916061831.57848-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
4e4a6b7c |
|
05-Jul-2020 |
Mauro Dreissig <mukadr@gmail.com> |
staging: rtl8712: Simplify expressions with boolean logic Simplify some expressions by using boolean operations. Signed-off-by: Mauro Dreissig <mukadr@gmail.com> Link: https://lore.kernel.org/r/20200705143552.9368-3-mukadr@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
9bea6eb3 |
|
31-May-2020 |
Ivan Safonov <insafonov@gmail.com> |
staging:rtl8712: avoid skb_clone after skb allocation fail The skb allocated when out of memory is likely to be discarded during subsequent processing. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Link: https://lore.kernel.org/r/20200531110548.9318-1-insafonov@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
98fe05e2 |
|
15-Jun-2020 |
Sebastian Arriola <sebdeveloper6952@gmail.com> |
staging: rtl8712: Remove unnecesary else after return statement. This patch fixes the checkpatch.pl warning: WARNING: else is not generally useful after a break or return 490: FILE: drivers/staging/rtl8712/rtl8712_recv.c:490: return false; else Signed-off-by: Sebastian Arriola <sebdeveloper6952@gmail.com> Link: https://lore.kernel.org/r/20200615155131.GA4563@sevic69 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
3ee97e22 |
|
09-Jun-2020 |
Pascal Terjan <pterjan@google.com> |
staging: rtl8712: switch to common ieee80211 headers This patch switches to <linux/ieee80211.h> and <net/cfg80211.h> and deletes a lot of duplicate definitions plus many unused ones. Non obvious changes: - struct ieee80211_ht_cap is different enough that I preferred to keep (and rename) it for now. - mcs_rate in translate_scan was not read after being set, so I deleted that part rather than using the renamed struct - WLAN_CAPABILITY_BSS is replaced with WLAN_CAPABILITY_ESS which is the corresponding one with same value Signed-off-by: Pascal Terjan <pterjan@google.com> Link: https://lore.kernel.org/r/20200609194848.166130-1-pterjan@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
3063da91 |
|
18-Jan-2020 |
Michael Straube <straube.linux@gmail.com> |
staging: rtl8712: simplify evm_db2percentage() Use clamp() to simplify function evm_db2percentage() and reduce object file size. Signed-off-by: Michael Straube <straube.linux@gmail.com> Link: https://lore.kernel.org/r/20200118195305.16685-3-straube.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
6cfed598 |
|
15-Nov-2019 |
Kees Cook <keescook@chromium.org> |
staging: rtl*: Remove tasklet callback casts In order to make the entire kernel usable under Clang's Control Flow Integrity protections, function prototype casts need to be avoided because this will trip CFI checks at runtime (i.e. a mismatch between the caller's expected function prototype and the destination function's prototype). Many of these cases can be found with -Wcast-function-type, which found that the rtl wifi drivers had a bunch of needless function casts. Remove function casts for tasklet callbacks in the various drivers. Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/201911150926.2894A4F973@keescook Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
21c42244 |
|
27-Oct-2019 |
Cristiane Naves <cristianenavescardoso09@gmail.com> |
staging: rtl8712: Fix Alignment of open parenthesis Fix alignment should match open parenthesis. Issue found by checkpatch. Signed-off-by: Cristiane Naves <cristianenavescardoso09@gmail.com> Link: https://lore.kernel.org/r/2a6e8fbef7b9e72d95b7c4a7cbcce08a9e231d07.1572276208.git.cristianenavescardoso09@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
21cc07a1 |
|
26-Oct-2019 |
Cristiane Naves <cristianenavescardoso09@gmail.com> |
staging: rtl8712: Remove lines before a close brace Fix Blank lines aren't necessary before a close brace '}'. Issue found by checkpatch. Signed-off-by: Cristiane Naves <cristianenavescardoso09@gmail.com> Link: https://lore.kernel.org/r/8c74dcd9afaa528a80804081f582792045bb7a7a.1572121059.git.cristianenavescardoso09@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
06f9c65a8 |
|
08-Oct-2019 |
Wambui Karuga <wambui.karugax@gmail.com> |
staging: rtl8712: Align function arguments with opening paranthesis Fixes checkpatch.pl "CHECK Alignment should match open parenthesis" on drivers/staging/rtl8712/rtl8712_recv.c:122 Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com> Link: https://lore.kernel.org/r/20191008195350.20544-1-wambui.karugax@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
b1198cca |
|
12-Aug-2019 |
Merwin Trever Ferrao <merwintf@gmail.com> |
Staging: rtl8712: rtl8712_recv: fixed 80 character length warning When the checkpatch.pl script was run, it showed lines with length more than 80 characters in rtl8712_recv.c file. Fixed by breaking it up into two lines within 80 characters. Signed-off-by: Merwin Trever Ferrao <merwintf@gmail.com> Link: https://lore.kernel.org/r/20190813065806.GA23606@IoT-COE Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
9dca5e68 |
|
07-Aug-2019 |
Nishka Dasgupta <nishkadg.linux@gmail.com> |
staging: rtl8712: recvbuf2recvframe(): Change return type Change return type of recvbuf2recvframe from int to void as its return value is never used. Modify or remove return statements accordingly. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190808064012.12661-5-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
1bdcb366 |
|
07-Aug-2019 |
Nishka Dasgupta <nishkadg.linux@gmail.com> |
staging: rtl8712: r8712_wlanhdr_to_ethhdr(): Change return values Change return values of r8712_wlanhdr_to_ethhdr from _SUCCESS/_FAIL to 0/-ENOMEM. Modify the function containing a call site of r8712_wlanhdr_to_ethhdr so that it compares the return value to 0/-ENOMEM instead of _SUCCESS/_FAIL. Change the return type of r8712_wlanhdr_to_ethhdr from sint to int to match its prototype in corresponding .h file. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190808064012.12661-3-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
4dbadfaf |
|
07-Aug-2019 |
Nishka Dasgupta <nishkadg.linux@gmail.com> |
staging: rtl8712: recv_indicatepkt_reorder(): Change return values Change return values of recv_indicatepkt_reorder from _SUCCESS/_FAIL to 0/-ENOMEM and -EINVAL. Within recv_indicatepkt_reorder, modify comparison to true and use the respective value directly. Modify call site of recv_indicatepkt_reorder to check for the new return values. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190808064012.12661-2-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
fc898688 |
|
07-Aug-2019 |
Nishka Dasgupta <nishkadg.linux@gmail.com> |
staging: rtl8712: amsdu_to_msdu(): Change return type Change return type of amsdu_to_msdu from int to void as it always returns _SUCCESS. Remove return statement as well. As this return value was never anything other than _SUCCESS, remove the if-branch that depends on the return value not being _SUCCESS. Remove local variable that was only used in the now-removed if-branch Modify call site to call the function amsdu_to_msdu without expecting a return value. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190808064012.12661-1-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
14b4302f |
|
01-Aug-2019 |
Nishka Dasgupta <nishkadg.linux@gmail.com> |
staging: rtl8712: r8712_os_recvbuf_resource_alloc(): Change return values Change return values of r8712_os_recvbuf_resource_alloc from _SUCCESS/_FAIL to 0/-ENOMEM respectively. Modify check at call site to check for non-zero return value instead of _FAIL. Thereafter remove variable at call site that stored the return value and perform the check directly. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190802064212.30476-4-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
0bf36e60 |
|
01-Aug-2019 |
Nishka Dasgupta <nishkadg.linux@gmail.com> |
staging: rtl8712: r8712_init_recv_priv(): Change return type Change return type of r8712_init_recv_priv from int to void as its return value is never used. Remove return statements accordingly. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190802064212.30476-3-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
caecc46b |
|
22-Jul-2019 |
Nishka Dasgupta <nishkadg.linux@gmail.com> |
staging: rtl8712: r8712_free_recvframe(): Change return type Change return type of r8712_free_recvframe from int to void as it always returns _SUCCESS and its return value is never used. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190722092341.21030-8-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
606c5cf0 |
|
22-Jul-2019 |
Nishka Dasgupta <nishkadg.linux@gmail.com> |
staging: rtl8712: r8712_init_recvbuf(): Change return type Change return type of r8712_init_recvbuf from int to void as it always returned _SUCCESS and this return value was never used at any call site. Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com> Link: https://lore.kernel.org/r/20190722092341.21030-7-nishkadg.linux@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
db920621 |
|
29-Mar-2019 |
Vatsala Narang <vatsalanarang@gmail.com> |
staging: rtl8712: Fix a space issue Remove unnecessary space after a cast to get rid of checkpatch warning. Signed-off-by: Vatsala Narang <vatsalanarang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
ff7fa1f6 |
|
07-Mar-2019 |
Daniela Mormocea <daniela.mormocea@gmail.com> |
staging: rtl8712: Replace NULL comparisons Replace all NULL comparisons in the file to get rid of checkpatch warnings Signed-off-by: Daniela Mormocea <daniela.mormocea@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
5b8d98f1 |
|
03-Mar-2019 |
Himadri Pandya <himadri18.07@gmail.com> |
staging: rtl8712: rename bSurpriseRemoved to surprise_removed - Rename structure field bSurprisedRemoved to surprised_removed to avoid camelcase. Suggested by checkpatch. - Change type to bool as the variable is used as a boolean. Signed-off-by: Himadri Pandya <himadri18.07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
0ec6fc6f |
|
03-Mar-2019 |
Himadri Pandya <himadri18.07@gmail.com> |
staging: rtl8712: rename bDriverStopped to driver_stopped - Rename structure field bDriverStopped to driver_stopped to avoid camelcase. Suggested by checkpatch. - Change type to bool as the variable is being used as boolean. Signed-off-by: Himadri Pandya <himadri18.07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
e24c1f86 |
|
03-Oct-2018 |
Michael Straube <straube.linux@gmail.com> |
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>
|
#
b78559b6 |
|
19-Dec-2017 |
Martin Homuth <martin@martinhomuth.de> |
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>
|
#
e7ec76b6 |
|
26-Sep-2017 |
Mihaela Muraru <mihaela.muraru21@gmail.com> |
staging: rtl8712: Fix indent coding style issue This patch fixes an indentation coding style issue found by checkpatch.pl: WARNING: suspect code indent for conditional statements (16, 32) Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
a7e58591 |
|
11-Sep-2017 |
Liam Ryan <liamryandev@gmail.com> |
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>
|
#
b952f4df |
|
18-Jun-2017 |
yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn> |
net: manual clean code which call skb_put_[data:zero] Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
59ae1d12 |
|
16-Jun-2017 |
Johannes Berg <johannes.berg@intel.com> |
networking: introduce and use skb_put_data() A common pattern with skb_put() is to just want to memcpy() some data into the new space, introduce skb_put_data() for this. An spatch similar to the one for skb_put_zero() converts many of the places using it: @@ identifier p, p2; expression len, skb, data; type t, t2; @@ ( -p = skb_put(skb, len); +p = skb_put_data(skb, data, len); | -p = (t)skb_put(skb, len); +p = skb_put_data(skb, data, len); ) ( p2 = (t2)p; -memcpy(p2, data, len); | -memcpy(p, data, len); ) @@ type t, t2; identifier p, p2; expression skb, data; @@ t *p; ... ( -p = skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); | -p = (t *)skb_put(skb, sizeof(t)); +p = skb_put_data(skb, data, sizeof(t)); ) ( p2 = (t2)p; -memcpy(p2, data, sizeof(*p)); | -memcpy(p, data, sizeof(*p)); ) @@ expression skb, len, data; @@ -memcpy(skb_put(skb, len), data, len); +skb_put_data(skb, data, len); (again, manually post-processed to retain some comments) Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
|
#
c66de311 |
|
04-Mar-2017 |
simran singhal <singhalsimran0@gmail.com> |
staging: rtl8712: Remove unnecessary cast on void pointer The following Coccinelle script was used to detect this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T*)x)->f | - (T*) e ) Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
dec9fcd0 |
|
24-Jan-2017 |
Joseph Wright <rjosephwright@gmail.com> |
Staging: rtl8712: fix spelling errors Found by checkpatch: - s/cacluated/calculated/ - s/convertor/converter/ - s/psudo/pseudo/ - s/halfs/halves/ Signed-off-by: Joseph Wright <rjosephwright@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
16b8852f |
|
20-Dec-2016 |
Jannik Becher <becher.jannik@gmail.com> |
staging: rtl8712: changed u16 to __be16 Fixed sparse warning. Just changed u16 to __be16 and typecasts. Signed-off-by: Jannik Becher <becher.jannik@gmail.com> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
8681a1d4 |
|
27-Sep-2016 |
Matthew Kilgore <mattkilgore12@gmail.com> |
Fixes: 3d44a78f0d8b ("staging: rtl8712: Remove unnecessary 'else'") An "unnecessary" 'else' was removed due to complains from checkpatch.pl as it is preceded by a 'return', however the 'else' branch is necessary as an earlier branch of the 'if' falls through. By removing the 'else', that route now hits the 'break' and the 'while' loop exits prematurely. This commit reverts that change and puts the original 'else' back in place. Signed-off-by: Matthew Kilgore <mattkilgore12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
3d44a78f |
|
25-Sep-2016 |
Namrata A Shettar <namrataashettar@gmail.com> |
staging: rtl8712: Remove unnecessary 'else' Remove unnecessary 'else' after 'return' to resolve checkpatch issue. Signed-off-by: Namrata A Shettar <namrataashettar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
a667dbce |
|
20-Sep-2016 |
Sandhya Bankar <bankarsandhya512@gmail.com> |
Staging: rtl8712: rtl8712_recv: 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>
|
#
bef611a9 |
|
09-Sep-2016 |
Raphaël Beamonte <raphael.beamonte@gmail.com> |
staging: rtl8712: checkpatch cleanup: block comments using a trailing */ Fix checkpatch.pl warning "Block comments use a trailing */ on a separate line" on multiple files of the driver by editing the affected comments. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
fcc2cf12 |
|
04-Apr-2016 |
Geliang Tang <geliangtang@163.com> |
staging: rtl8712: use container_of() instead of LIST_CONTAINOR() This patch drops the local definition of LIST_CONTAINOR(), and uses container_of() instead of it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
4ef2de5a |
|
19-Oct-2015 |
Luis de Bethencourt <luisbg@osg.samsung.com> |
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>
|
#
168a2c10 |
|
19-Oct-2015 |
Luis de Bethencourt <luisbg@osg.samsung.com> |
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>
|
#
1ca96884 |
|
19-Oct-2015 |
Luis de Bethencourt <luisbg@osg.samsung.com> |
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>
|
#
a90391e4 |
|
14-Oct-2015 |
Amitoj Kaur Chawla <amitoj1606@gmail.com> |
staging: rtl8712: rtl8712_recv: Remove useless intialisation Remove intialisation of a variable that is immediately reassigned. The semantic patch used to find this is: // <smpl> @@ type T; identifier x; constant C; expression e; @@ T x - = C ; x = e; // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
5eafbb0c |
|
29-Jun-2015 |
Ravi Teja Darbha <ravi2j@gmail.com> |
rtl8712:Fix checkpatch warning Fix line over 80 characters warning. Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
cab46214 |
|
23-May-2015 |
Haggai Eran <haggai.eran@gmail.com> |
staging: rtl8712: prevent buffer overrun in recvbuf2recvframe With an RTL8191SU USB adaptor, sometimes the hints for a fragmented packet are set, but the packet length is too large. Allocate enough space to prevent memory corruption and a resulting kernel panic [1]. [1] http://www.spinics.net/lists/linux-wireless/msg136546.html Cc: <stable@vger.kernel.org> Signed-off-by: Haggai Eran <haggai.eran@gmail.com> ACKed-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
25978642 |
|
03-Mar-2015 |
Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> |
staging: rtl8712: remove extra parentheses around right bit shift operation Removes extra parentheses around bitwise right shift operation. The cases handled are when the resultant value is assigned to a variable or when a shift operation is carried out for a function argument. The issues were detected and resolved using the following coccinelle script: @@ expression e, e1; constant c; @@ e = -(e1 +e1 >> -c); +c; @@ identifier i; constant c; type t; expression e; @@ t i = -(e +e >> -c); +c; @@ expression e, e1; identifier f; constant c; @@ e1 = f(..., -(e +e >> -c) +c ,...); Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
4eef520d |
|
27-Feb-2015 |
Vaishali Thakkar <vthakkar1994@gmail.com> |
Staging: rtl8712: Use del_timer Use timer API function del_timer instead of driver specific function _cancel_timer_ex as it is a standard way for deactivating a timer. This is done using Coccinelle and semantic patch used for this is as follows: @@ expression x; @@ - _cancel_timer_ex (&x); + del_timer (&x); Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
c703c750 |
|
27-Feb-2015 |
Vaishali Thakkar <vthakkar1994@gmail.com> |
Staging: rtl8712: Eliminate use of _set_timer This patch introduces the use of API function mod_timer instead of driver specific function _set_timer as it is a more efficient and standard way to update the expire field of an active timer. Also, definition of function _set_timer is removed as it is no longer needed after this change. Here, these cases are handled using Coccinelle and semantic patch used for this is as follows: @@ expression x; expression y;@@ - _set_timer (&x, y); + mod_timer (&x, jiffies + msecs_to_jiffies (y)); Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
5c7c5d80 |
|
26-Feb-2015 |
Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> |
staging: rtl8712: rewrite the right hand side of an assignment This patch rewrites the right hand side of an assignment for expressions of the form: a = (a <op> b); to be: a <op>= b; where <op> = << | >>. This issue was detected and resolved using the following coccinelle script: @@ identifier i; expression e; @@ -i = (i >> e); +i >>= e; @@ identifier i; expression e; @@ -i = (i << e); +i <<= e; Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
68de8d67 |
|
02-Dec-2014 |
Mike Krinkin <krinkin.m.u@gmail.com> |
staging: rtl8712: remove unnecessary else after return Fixes checkpatch warning: WARNING: else is not generally useful after a break or return Signed-off-by: Mike Krinkin <krinkin.m.u@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
e29d3ebc |
|
27-Oct-2014 |
Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
staging: rtl8712: remove unused variables unused variables are removed. These variables were only assigned some values and after that they were never being used. So they are safe to be removed , and it has been build tested. I left a call to r8712_read32(padapter, TCR) and r8712_read8(padapter, SDIO_HCPWM) . r8712_read32() and r8712_read8() is ultimately calling usb_read32() and usb_read8() respectively. and they are again calling r8712_usbctrl_vendorreq(). this r8712_usbctrl_vendorreq() is communicating through the usb bus and is sending and receiving the control msg. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
c0824200 |
|
20-Sep-2014 |
Tapasweni Pathak <tapaswenipathak@gmail.com> |
Staging: rtl8712: Remove unnecessary parentheses This patch fixes checkpatch.pl warning in files of rel8712 WARNING : Unnecessary parentheses - maybe == should be = ? Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
df353f61 |
|
24-Jun-2014 |
James A Shackleford <shack@linux.com> |
staging: rtl8712: remove wrapper function _queue_empty _queue_empty is an inline wrapper around list_empty. This patch removes this wrapper function and instead calls list_empty directly. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
e99a428a |
|
24-Jun-2014 |
James A Shackleford <shack@linux.com> |
staging: rtl8712: remove function get_list_head get_list_head is an inline that returns &list->head. This patch removes this inline and directly applies &list->head where applicable. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
849fb0a8 |
|
24-Jun-2014 |
James A Shackleford <shack@linux.com> |
staging: rtl8712: remove wrapper function get_next get_next is just an inline wrapper around return list->next. This patch removes the wrapper and directly uses list->next where applicable. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
29197b7c |
|
24-Jun-2014 |
James A Shackleford <shack@linux.com> |
staging: rtl8712: remove wrapper function list_delete list_delete is just an inline wrapper around list_del_init. This patch removes the wrapper and directly uses list_del_init. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
fdfbf789 |
|
24-Jun-2014 |
James A Shackleford <shack@linux.com> |
staging: rtl8712: remove wrapper function list_insert_tail 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>
|
#
9672b1bd |
|
24-Jun-2014 |
James A Shackleford <shack@linux.com> |
staging: rtl8712: remove wrapper function is_list_empty is_list_empty is just an inline wrapper around list_empty. This patch removes the wrapper and directly uses list_empty instead. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
534c4acd |
|
24-Jun-2014 |
James A Shackleford <shack@linux.com> |
staging: rtl8712: remove wrapper function _init_listhead _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>
|
#
fa867453 |
|
22-Jun-2014 |
James A Shackleford <shack@linux.com> |
staging: rtl8712: remove inline _RND128() and use round_up() Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
91d435fe |
|
24-May-2014 |
Vitaly Osipov <vitaly.osipov@gmail.com> |
staging: rtl8712: remove _malloc() 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>
|
#
8ffca9ea |
|
19-May-2014 |
Peter Senna Tschudin <peter.senna@gmail.com> |
staging: r8712u: Remove useless return variables This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // <smpl> @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret - return ret; + return C; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
4bb101d4 |
|
15-Feb-2014 |
Julia Lawall <Julia.Lawall@lip6.fr> |
staging: r8712u: delete unnecessary field initialization On success, the function netdev_alloc_skb initializes the dev field of its result to its first argument, so this doesn't have to be done in the calling context. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression skb,privn,e; @@ skb = netdev_alloc_skb(privn,...); ... when strict ( -skb->dev = privn; | ?skb = e ) // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
77e73e8c |
|
01-Oct-2013 |
Thomas Cort <linuxgeek@gmail.com> |
Staging: rtl8712: fix spaces before semicolons Resolve all of the 'WARNING: space prohibited before semicolon' checkpatch warnings for rtl8712. Signed-off-by: Thomas Cort <linuxgeek@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
87a573ad |
|
10-Dec-2012 |
Przemo Firszt <przemo@firszt.eu> |
rtl8712: replace printk with better solutions Replace printk with netdev_printk helpers, dev_printk helpers or pr_err/warn/info if there is no device info available. Signed-off-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
fa16e5ea |
|
26-Sep-2012 |
Larry Finger <Larry.Finger@lwfinger.net> |
staging: r8712u: Do not queue cloned skb Some post-3.4 kernels have a problem when a cloned skb is used in the RX path. This patch handles one such case for r8712u. The patch was suggested by Eric Dumazet. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> [v3.4+] Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
5ca136a0 |
|
28-Aug-2012 |
Larry Finger <Larry.Finger@lwfinger.net> |
staging: r8712u: Fix allocations not checked for failure The driver has a dev_alloc_skb() and an skb_clone() call that are not checked for failure. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
20467825 |
|
09-May-2012 |
Paul Gortmaker <paul.gortmaker@windriver.com> |
staging: wean rtl8712 off of its ancient duplicate of ip.h This driver should not be carrying around ancient copies of headers like <linux/ip.h> for its own use. Mapping it onto the mainline one uncovers no build issues. Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
#
be9a1204 |
|
09-May-2012 |
Paul Gortmaker <paul.gortmaker@windriver.com> |
staging: wean rtl8712 off of its ancient duplicate of if_ether.h This driver should not be carrying around ancient copies of headers like <linux/if_ether.h> for its own use. Mapping it onto the mainline one uncovers no build issues. Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
|
#
be10ac2b |
|
07-May-2012 |
Justin P. Mattock <justinmattock@gmail.com> |
staging: rtl8712: Fix typos. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
#
86587b67 |
|
08-Feb-2012 |
Larry Finger <Larry.Finger@lwfinger.net> |
staging: r8712u: Simplify semaphores 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>
|
#
ee5b1aad |
|
03-Sep-2011 |
Ali Bahar <ali@internetdog.org> |
staging: r8712u: Merging Realtek's latest (v2.6.6). Various fixes. In r8712_generate_ie(), HT check is no longer done. Removed r8712_add_ht_addt_info(). Changes to defragmentation handling, and queue selection. Get TSSI command. Added an Ad-Hoc check to is_desired_network() r8712_ind_disconnect() now checks for Linked state. r8712_xmit_bh() now schedules an xmit tasklet. Signed-off-by: Ali Bahar <ali@internetDog.org> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
#
b0b0fb0f |
|
10-Apr-2011 |
Joe Perches <joe@perches.com> |
staging: Remove unnecessary semicolons when while (foo) {...}; Done via perl script: $ cat remove_semi_while.pl my $match_balanced_parentheses = qr/(\((?:[^\(\)]++|(?-1))*\))/; my $match_balanced_braces = qr/(\{(?:[^\{\}]++|(?-1))*\})/; foreach my $file (@ARGV) { my $f; my $text; my $oldtext; next if ((-d $file)); open($f, '<', $file) or die "$P: Can't open $file for read\n"; $oldtext = do { local($/) ; <$f> }; close($f); next if ($oldtext eq ""); $text = $oldtext; my $count = 0; do { $count = 0; $count += $text =~ s@\b(while\s*${match_balanced_parentheses}\s*)${match_balanced_braces}\s*;@"$1$3"@egx; } while ($count > 0); if ($text ne $oldtext) { my $newfile = $file; open($f, '>', $newfile) or die "$P: Can't open $newfile for write\n"; print $f $text; close($f); } } $ One false positive removed. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
#
16e53729 |
|
30-Aug-2010 |
Larry Finger <Larry.Finger@lwfinger.net> |
staging: r8712u: Fix sparse warnings Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|
#
2865d42c |
|
20-Aug-2010 |
Larry Finger <Larry.Finger@lwfinger.net> |
staging: r8712u: Add the new driver to the mainline kernel 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>
|