aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u
AgeCommit message (Collapse)Author
2017-04-28staging: rtl8192u: fix spelling mistake in variable name *attentuationColin Ian King
Fix the spelling of a bunch of variables, from *attentuation to *attenuation. No functional change. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-28staging: rtl8192u: fix incorrect assignmentsJakub Jedelsky
Fixing warnings found by sparse on rtl8192u/ieee80211. drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1318:45: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1318:45: expected unsigned short [unsigned] [usertype] len drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1318:45: got restricted __be16 [usertype] <noident> drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1481:40: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1481:40: expected restricted __le16 <noident> drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1481:40: got int drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1483:40: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1483:40: expected restricted __le16 <noident> drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1483:40: got int drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1487:45: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1487:45: expected restricted __le16 <noident> drivers/staging/rtl8192u/ieee80211//ieee80211_rx.c:1487:45: gotunsigned short [unsigned] [usertype] <noident> Signed-off-by: Jakub Jedelsky <jakub.jedelsky@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-18staging: rtl8192u: fix incorrect type in assignment in ieee80211_tx.cMartin Karamihov
This patch fixes the following sparse warning: ieee80211_tx.c:174:36: incorrect type in assignment (different base types) ieee80211_tx.c:174:36: expected unsigned short [unsigned] [short] [usertype] <noident> ieee80211_tx.c:174:36: got restricted __be16 [usertype] <noident> by adding left side cast to __be16. Signed-off-by: Martin Karamihov <martinowar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: rtl8192u: ieee80211: Fix space required after }.Valerio Genovese
This was reported in checkpatch.pl: ERROR: space required after that close brace '}' Changes in v2: add space after close brace '}' also at line 35, before it was only for 34. Signed-off-by: Valerio Genovese <valerio.click@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: rtl8192u: Remove multiple assignmentsGargi Sharma
This patch removes multiple assignments by factorizing them. This was done with Coccinelle for the if branch. For the else part the change was done manually since Coccinelle only detects constants. Braces were also added to the else part to remove the checkpatch warning, "braces should be on all arms of if-else statements". @@ identifier i1,i2; constant c; @@ - i1=i2=c; + i1=c; + i2=c; Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14staging: rtl8192u: ieee80211: Remove code in commentssimran singhal
Commenting out code is a bad idea. As comments are for explaining what code is about. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-12staging: rtl8192u: Remove typedef phy_ofdm_rx_status_rxsc_sgien_exintfflagsimran singhal
Remove typdef phy_ofdm_rx_status_rxsc_sgien_exintfflag and replace its uses in the code. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: rtl8192u: Fix sparse warnings in r8192U_dm.cMatthieu Simon
Fix these warnings: drivers/staging//rtl8192u/r8192U_dm.c:2307:49: warning: cast from restricted __le16 drivers/staging//rtl8192u/r8192U_dm.c:2308:44: warning: cast from restricted __le16 drivers/staging//rtl8192u/r8192U_dm.c:2309:44: warning: cast from restricted __le16 Signed-off-by: Matthieu Simon <gmatthsim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: rtl8192u: Clean up tests if NULL returned on failuresimran singhal
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: simran singhal <singhalsimran0@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09Staging: rtl8192u: clean up some white space issuesElia Geretto
This patch fixes two coding style errors, reported by the checkpatch script. Signed-off-by: Elia Geretto <elia.f.geretto@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: rtl8192e: Indent the codeGeorgiana Rodica Chelu
Indent the code in order to follow the rules and to increase the readability of the code. Signed-off-by: Georgiana Rodica Chelu <georgiana.chelu93@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: rtl8192u: Constify ieee80211_qos_parameters structureGargi Sharma
Declare ieee80211_qos_parameters structure constant it is only passed as src parameter to the function memcpy. The fields of def_qos_parameters structure are never modified and hence it can be declared as const. Coccinelle Script: @r1 disable optional_qualifier@ identifier i; position p; @@ static struct ieee80211_qos_parameters i@p ={...}; @ok1@ identifier r1.i; position p; expression e1,e2; @@ memcpy(e1,&i@p,e2) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ static +const struct ieee80211_qos_parameters i={...}; Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-07staging: rtl8192u: Replace "the the " with "the"simran singhal
This patch replace "the the " with "the". The replacement couldn't be automated because sometimes the first "the" was meant to be another word. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-07staging: rtl8192u: Replace "is is" with "is"simran singhal
This patch replace "is is " with "is". The replacement couldn't be automated because sometimes the first "is" was meant to be another word. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8192u: Remove ternary operatorGargi Sharma
Relational and logical operators evaluate to either true or false. Lines with ternary operators were found using coccinelle script. In a few cases using logical && operator would suffice. Hence those were changed to improve readability. Coccinelle Script: @r@ expression A,B; symbol true,false; binary operator b = {==,!=,&&,||,>=,<=,>,<}; @@ - (A b B) ? true : false + A b B Signed-off-by: Gargi Sharma <gs051095@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8192u: Replace explicit NULL comparisonGargi Sharma
Replace explicit NULL comparison with ! operator to simplify code. Found with Coccinelle script: @@ expression ptr; position p; statement s0, s1; @@ ptr@p = \(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\|usb_alloc_urb\| alloc_netdev\|dev_alloc_skb\)(...) ... when != ptr if ( ( + ! ptr - == NULL ) ) s0 else s1 Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8192u: Fix endianness warnings in ieee80211_rx.cSebastian Haas
Fixes the endianness warning "restricted __le16 degrades to integer" by converting __le16 to short before using it in bitmasks or in the macro WLAN_FC_GET_STYPE. Signed-off-by: Sebastian Haas <sehaas@deebas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8192u: Fix warnings about endiannessmaomao xu
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:564:37: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:564:37: expected unsigned short [unsigned] [usertype] len drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c:564:37: got restricted __be16 [usertype] <noident> Signed-off-by: maomao xu <albert008.xu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8192u: ieee80211: Remove typedef to the tx_pending_t structuresayli karnik
Using typedef for a structure type is not suggested in Linux kernel coding style guidelines. So remove typedef from structure tx_pending_t. The typedef name is not used anywhere. All variables of this type are declared using "struct tx_pending_t". Also change the structure name to tx_pending since it is normally only typedefs that have names that end in _t. Signed-off-by: sayli karnik <karniksayli1995@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8192u: Fixed 'tabstop' coding style warningsimran singhal
Replace a mix of tabs and spaces indentation by tabs only. Fixed checkpatch warning "Statements should start on a tabstop" in rtl8192u module. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: rtl8192u: Replace symbolic permissions with octal permissionssimran singhal
Octal permissions should be used instead of symbolic ones for easier reading. WARNING: Symbolic permissions 'S_IRUGO | S_IWUSR' are not preferred. Consider using octal permissions '0644'. This warning is detected by checkpatch.pl Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-27scripts/spelling.txt: add "swithc" pattern and fix typo instancesMasahiro Yamada
Fix typos and add the following to the scripts/spelling.txt: swithc||switch swithced||switched swithcing||switching Link: http://lkml.kernel.org/r/1481573103-11329-3-git-send-email-yamada.masahiro@socionext.com Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-02-22Merge tag 'staging-4.11-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging/iio driver updates from Greg KH: "Here is the big staging and iio driver patchsets for 4.11-rc1. We almost broke even this time around, with only a few thousand lines added overall, as we removed the old and obsolete i4l code, but added some new drivers for the RPi platform, as well as adding some new IIO drivers. All of these have been in linux-next for a while with no reported issues" * tag 'staging-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (669 commits) Staging: vc04_services: Fix the "space prohibited" code style errors Staging: vc04_services: Fix the "wrong indent" code style errors staging: octeon: Use net_device_stats from struct net_device Staging: rtl8192u: ieee80211: ieee80211.h - style fix Staging: rtl8192u: ieee80211: ieee80211_tx.c - style fix Staging: rtl8192u: ieee80211: rtl819x_BAProc.c - style fix Staging: rtl8192u: ieee80211: ieee80211_module.c - style fix Staging: rtl8192u: ieee80211: rtl819x_TSProc.c - style fix Staging: rtl8192u: r8192U.h - style fix Staging: rtl8192u: r8192U_core.c - style fix Staging: rtl8192u: r819xU_cmdpkt.c - style fix staging: rtl8192u: blank lines aren't necessary before a close brace '}' staging: rtl8192u: Adding space after enum and struct definition staging: rtl8192u: Adding space after struct definition Staging: ks7010: Add required and preferred spaces around operators Staging: ks7010: ks*: Remove redundant blank lines Staging: ks7010: ks*: Add missing blank lines after declarations staging: visorbus, replace init_timer with setup_timer staging: vt6656: rxtx.c Removed multiple dereferencing staging: vt6656: Alignment match open parenthesis ...
2017-02-16Staging: rtl8192u: ieee80211: ieee80211.h - style fixDerek Robson
Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16Staging: rtl8192u: ieee80211: ieee80211_tx.c - style fixDerek Robson
Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16Staging: rtl8192u: ieee80211: rtl819x_BAProc.c - style fixDerek Robson
Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16Staging: rtl8192u: ieee80211: ieee80211_module.c - style fixDerek Robson
Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16Staging: rtl8192u: ieee80211: rtl819x_TSProc.c - style fixDerek Robson
Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16Staging: rtl8192u: r8192U.h - style fixDerek Robson
Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16Staging: rtl8192u: r8192U_core.c - style fixDerek Robson
Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16Staging: rtl8192u: r819xU_cmdpkt.c - style fixDerek Robson
Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16staging: rtl8192u: blank lines aren't necessary before a close brace '}'simran singhal
Fix checkpatch issues: "CHECK: Blank lines aren't necessary before a close brace '}'". Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16staging: rtl8192u: Adding space after enum and struct definitionsimran singhal
Fixes checkpatch.pl warning: WARNING: missing space after struct definition WARNING: missing space after enum definition Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-16staging: rtl8192u: Adding space after struct definitionsimran singhal
Fixes checkpatch.pl warning: WARNING: missing space after struct definition Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Fixing no new typedef warningsimran singhal
This patch fixes following checkpatch.pl warnings: WARNING:do not add new typedefs. All the related files have been modified. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Removing unnecessary parenthesessimran singhal
Removing unnecessary parentheses from an expression of the form &(x). Issue found by checkpatch. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Fix warnings relating to printk()simran singhal
This fixes the following checkpatch.pl warnings: WARNING: printk() should include KERN_ facility level Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Fix RETURN_VOID warningssimran singhal
Fix 'void function return statements are not generally useful' checkpatch.pl warnings. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Fix brace placementsimran singhal
Fix brace placement errors caught by checkpatch.pl ERROR: that open brace { should be on the previous line Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Removing true and false comparisonsimran singhal
Remove comparison to true and false in if statement. Problem found usingcheckpatch.pl. CHECK: Using comparison to true is error prone CHECK: Using comparison to false is error prone Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Remove unnecessary space after a castsimran singhal
This patch fixes the checkpatch issue: CHECK: No space is necessary after a cast Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Replace explicit NULL comparisons with !simran singhal
This patch replace explicit NULL comparison with ! or unmark operator to simplify code. Reported by checkpatch.pl for comparison to NULL could be written "!XXX" or "XXX". Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Remove useless functionsimran singhal
This patch remove useless function ieee80211_ccmp_null. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Fix braces {} stylesimran singhal
This fixes all checkpatch form of this from the Lustre tree: CHECK: braces {} should be used on all arms of this statement Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Clean up comparison to NULLsimran singhal
Checkpatch recommended changes. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Fixing multiple assignmentssimran singhal
This patch modifies the assignments into single assignments. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Removing unnecessary space after a castsimran singhal
This patch fixes the checkpatch warning by removing unnecessary space after a cast. CHECK: No space is necessary after a cast Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12staging: rtl8192u: Removing multiple blank linessimran singhal
This patch fixes the checkpatch warning by removing multiple blank lines. CHECK: Please don't use multiple blank lines Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12Staging: rtl8192u: ieee80211: ieee80211_crypt.c - style fixDerek Robson
Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12Staging: rtl8192u: ieee80211: ieee80211_crypt.h - style fixDerek Robson
Fixed style of block comments Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>