summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712/rtl8712_recv.c
AgeCommit message (Collapse)AuthorFilesLines
2021-05-10staging: rtl8712: remove multiple multiple assignmentsAlexander Vorwerk1-2/+3
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>
2020-10-01staging: rtl8712: Fix enqueue_reorder_recvframe()Dan Carpenter1-3/+6
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>
2020-09-16staging: rtl8712: convert tasklets to use new tasklet_setup() APIAllen Pais1-5/+5
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>
2020-07-10staging: rtl8712: Simplify expressions with boolean logicMauro Dreissig1-3/+2
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>
2020-06-18staging:rtl8712: avoid skb_clone after skb allocation failIvan Safonov1-18/+11
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>
2020-06-16staging: rtl8712: Remove unnecesary else after return statement.Sebastian Arriola1-2/+1
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>
2020-06-16staging: rtl8712: switch to common ieee80211 headersPascal Terjan1-6/+1
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>
2020-01-22staging: rtl8712: simplify evm_db2percentage()Michael Straube1-8/+2
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>
2019-11-16staging: rtl*: Remove tasklet callback castsKees Cook1-5/+4
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>
2019-10-28staging: rtl8712: Fix Alignment of open parenthesisCristiane Naves1-18/+18
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>
2019-10-27staging: rtl8712: Remove lines before a close braceCristiane Naves1-2/+0
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>
2019-10-10staging: rtl8712: Align function arguments with opening paranthesisWambui Karuga1-1/+1
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>
2019-08-14Staging: rtl8712: rtl8712_recv: fixed 80 character length warningMerwin Trever Ferrao1-1/+2
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>
2019-08-08staging: rtl8712: recvbuf2recvframe(): Change return typeNishka Dasgupta1-7/+5
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>
2019-08-08staging: rtl8712: r8712_wlanhdr_to_ethhdr(): Change return valuesNishka Dasgupta1-2/+2
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>
2019-08-08staging: rtl8712: recv_indicatepkt_reorder(): Change return valuesNishka Dasgupta1-7/+6
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>
2019-08-08staging: rtl8712: amsdu_to_msdu(): Change return typeNishka Dasgupta1-7/+2
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>
2019-08-02staging: rtl8712: r8712_os_recvbuf_resource_alloc(): Change return valuesNishka Dasgupta1-4/+2
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>
2019-08-02staging: rtl8712: r8712_init_recv_priv(): Change return typeNishka Dasgupta1-2/+1
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>
2019-07-25staging: rtl8712: r8712_free_recvframe(): Change return typeNishka Dasgupta1-2/+1
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>
2019-07-25staging: rtl8712: r8712_init_recvbuf(): Change return typeNishka Dasgupta1-2/+1
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>
2019-03-30staging: rtl8712: Fix a space issueVatsala Narang1-1/+1
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>
2019-03-18staging: rtl8712: Replace NULL comparisonsDaniela Mormocea1-5/+5
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>
2019-03-18staging: rtl8712: rename bSurpriseRemoved to surprise_removedHimadri Pandya1-5/+5
- 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>
2019-03-18staging: rtl8712: rename bDriverStopped to driver_stoppedHimadri Pandya1-5/+5
- 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>
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>
2017-12-21staging: rtl8712: style fix multiple line dereferencesMartin Homuth1-35/+20
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-09-26staging: rtl8712: Fix indent coding style issueMihaela Muraru1-1/+1
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>
2017-09-17staging: rtl8712: Fix unbalanced braces around else statementLiam Ryan1-2/+2
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-06-20net: manual clean code which call skb_put_[data:zero]yuan linyu1-2/+2
Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
2017-06-16networking: introduce and use skb_put_data()Johannes Berg1-2/+1
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>
2017-03-09staging: rtl8712: Remove unnecessary cast on void pointersimran singhal1-6/+5
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>
2017-01-25Staging: rtl8712: fix spelling errorsJoseph Wright1-2/+2
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>
2017-01-03staging: rtl8712: changed u16 to __be16Jannik Becher1-5/+5
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>
2016-09-28Fixes: 3d44a78f0d8b ("staging: rtl8712: Remove unnecessary 'else'")Matthew Kilgore1-1/+2
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>
2016-09-27staging: rtl8712: Remove unnecessary 'else'Namrata A Shettar1-2/+1
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>
2016-09-20Staging: rtl8712: rtl8712_recv: Use !x instead of x == NULLSandhya Bankar1-6/+6
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-12staging: rtl8712: checkpatch cleanup: block comments using a trailing */Raphaël Beamonte1-18/+36
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>
2016-04-30staging: rtl8712: use container_of() instead of LIST_CONTAINOR()Geliang Tang1-5/+5
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>
2015-10-25staging: rtl8712: spaces preferred around operandsLuis de Bethencourt1-6/+6
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-25staging: rtl8712: braces should be used on all armsLuis de Bethencourt1-6/+10
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-25staging: rtl8712: Remove boolean comparisonsLuis de Bethencourt1-13/+12
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-17staging: rtl8712: rtl8712_recv: Remove useless intialisationAmitoj Kaur Chawla1-1/+1
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>
2015-07-15rtl8712:Fix checkpatch warningRavi Teja Darbha1-2/+2
Fix line over 80 characters warning. Signed-off-by: Ravi Teja Darbha <ravi2j@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging: rtl8712: prevent buffer overrun in recvbuf2recvframeHaggai Eran1-1/+2
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>
2015-03-07staging: rtl8712: remove extra parentheses around right bit shift operationAya Mahfouz1-2/+2
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>
2015-03-02Staging: rtl8712: Use del_timerVaishali Thakkar1-1/+1
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>
2015-03-02Staging: rtl8712: Eliminate use of _set_timerVaishali Thakkar1-2/+2
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>
2015-02-27staging: rtl8712: rewrite the right hand side of an assignmentAya Mahfouz1-5/+5
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>
2014-12-03staging: rtl8712: remove unnecessary else after returnMike Krinkin1-5/+4
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>