summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192u
Commit message (Collapse)AuthorAgeFilesLines
...
* staging: rtl8192u: r8192U_core: clean C99 // commentsRaphaël Beamonte2015-09-131-320/+316Star
| | | | | | | | Replace C99 // comments by /* comments */ to follow the kernel code style. Remove some unuseful comments. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: r8192U_core: whitespace neatening to fix consistent ↵Raphaël Beamonte2015-09-131-144/+144
| | | | | | | | | | | | spacing code style errors Clean-up the file by using a cleaner spacing around symbols and words. Mostly use the automatic checkpatch whitespacing fixes. This takes care of the consistent spacing errors reported by checkpatch. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: r8192U_core: fix missing struct leading to consistent ↵Raphaël Beamonte2015-09-132-5/+5
| | | | | | | | | | | | spacing code style error A missing struct keyword in variable declaration triggered a need consistent spacing around '*' code style error. The struct keyword thus has been added everywhere for the rtl8192_rx_info struct, and therefore its typedef removed as not needed anymore. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: r8192U_core: fix else following close brace code style errorRaphaël Beamonte2015-09-131-2/+1Star
| | | | | | | Fix "else should follow close brace" checkpatch error. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: r8192U_core: fix code indent using spaces code style errorRaphaël Beamonte2015-09-131-1/+1
| | | | | | | Fix "code indent should use tabs where possible" checkpatch error Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: r8192U_core: fix space before close parenthesis code ↵Raphaël Beamonte2015-09-131-1/+1
| | | | | | | | | | style error A space existed before the close parenthesis of an if statement. This patch removes it to follow the kernel code style. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: r8192U_core: fix switch and case indent code style errorRaphaël Beamonte2015-09-131-95/+95
| | | | | | | Some switch and case were not be at the same indent level. Signed-off-by: Raphaël Beamonte <raphael.beamonte@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Remove unnecessary externsJoe Perches2015-08-157-223/+236
| | | | | | | | | | | Using 'extern' is not necessary for function prototypes. Miscellanea: o Reflow alignments Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: r819xU_firmware: fix coding styleKent Gustavsson2015-08-041-1/+2
| | | | | | | Line over 80 characters. This is for Eudyptula Challenge Signed-off-by: Kent Gustavsson <kent@minoris.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Fix checkpatch issue with comma in r819xU_firmware.cFreeman Zhang2015-08-011-5/+5
| | | | | | | | Add space after ',' to fix the error message provided by checkpatch.pl: ERROR: space required after that ',' Signed-off-by: Freeman Zhang <freeman.zhang1992@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: remove unneeded boolLuis de Bethencourt2015-07-231-8/+1Star
| | | | | | | | | | bool Reval is set to match the value of bHalfWirelessN24GMode just to this. The value can be returned directly. Removing uneeded bool. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Suggested-by: Joe Perches <joe@perches.com> Suggested-by: Franks Klaver <fransklaver@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: remove bool comparisonsLuis de Bethencourt2015-07-238-26/+27
| | | | | | | Remove explicit true/false comparisons to bool variables. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: pointer math bug in ieee80211_rx_DELBA()Dan Carpenter2015-07-231-4/+1Star
| | | | | | | | | | | | | | | Smatch complains because "delba" is a pointer to struct rtl_80211_hdr_3addr so the "delba += sizeof(struct rtl_80211_hdr_3addr);" is clearly wrong. We are reading nonsense data from beyond the end of the buffer and could oops if that memory isn't mapped. It turns out the next two statements are also wrong. We should delete the += sizeof() statement and "delba+2" should be "&delba->payload[2]". "pReasonCode" isn't used so I deleted that. With-Fix-From: Mateusz Kulikowski <mateusz.kulikowski@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Replace memset with eth_zero_addrVaishali Thakkar2015-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | Use eth_zero_addr to assign the zero address to the given address array instead of memset when second argument is address of zero. Note that the 6 in the third argument of memset appears to represent an ethernet address size (ETH_ALEN). The Coccinelle semantic patch that makes this change is as follows: // <smpl> @eth_zero_addr@ expression e; @@ -memset(e,0x00,6); +eth_zero_addr(e); // </smpl> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers: staging: rtl8192u: Fix "space required after that ','" errorsGreg Donald2015-07-154-5/+5
| | | | | | | Fix checkpatch.pl "space required after that ','" errors Signed-off-by: Greg Donald <gdonald@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: ieee80211: Fix incorrect type in assignmentGaston Gonzalez2015-06-181-1/+1
| | | | | | | | | | | Added le16_to_cpu() conversion fixing the following warning in assignment detected by sparse: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2157:30: warning: invalid assignment: += drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2157:30: left side has type unsigned long drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:2157:30: right side has type restricted __le16 Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Removed redundant bool comparisons in r8192U_dm.cHarisangam Sharvari2015-06-131-6/+6
| | | | | | | | This patch was detected with the help of coccinelle tool. The redundant comparisons of bool variables are removed in r8192U_dm.c. Signed-off-by: Harisangam Sharvari <sharisan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: ieee80211: Fix sparse endianness warnings ieee80211_softmac.cGaston Gonzalez2015-06-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the following endinness warnings detected by sparse: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:669:34: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:669:34: expected restricted __le16 [usertype] duration_id drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:669:34: got int drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:679:33: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:679:33: expected restricted __le16 [usertype] algorithm drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:679:33: got int drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1090:32: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1090:32: expected restricted __le16 [usertype] duration_id drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1090:32: got int drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1109:30: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1109:30: expected restricted __le16 [usertype] listen_interval drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:1109:30: got int drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3130:24: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3130:24: expected restricted __le16 [usertype] reason drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:3130:24: got unsigned char [unsigned] [usertype] asRsn Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Remove two useless lines at ieee80211_wep_nullPedro Marzo Perez2015-06-081-2/+0Star
| | | | | | | | | | | Remove two lines at ieee80211_wep_null which checkpatch.pl reported as errors. The first one because it has a C99 comment style and the second one because it is a void return which is useless. The function ieee80211_wep_null cannot be completely removed because it is exported and used to autoload the module. Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Simplify error check code at prism2_wep_initPedro Marzo Perez2015-06-081-23/+9Star
| | | | | | | | | Simplify prism2_wep_init error check code employing goto when a failure is detected. Removed pr_debug which was given a checkpatch.pl error because of literal string splitted across two lines of code, it was seldom going to be printed anyway. Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: ieee80211: Fix sparse endianness warningsGaston Gonzalez2015-06-081-2/+5
| | | | | | | | | | | | | | Fix the following sparse warnings: drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: warning: incorrect type in assignment (different base types) drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: expected restricted __le16 [usertype] frame_ctl drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:663:32: got int drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: warning: invalid assignment: |= drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: left side has type restricted __le16 drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c:664:50: right side has type int Signed-off-by: Gaston Gonzalez <gascoar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u/ieee80211/ieee80211_softmac.c: auth parse error code byte ↵Tolga Ceylan2015-06-081-1/+1
| | | | | | | | | | | | | order fix auth_parse() return result is in incorrect le16 byte order. Currently this still works since the user code merely checks if error code is equal to 0. However debug statement in ieee80211_check_auth_response() prints the error code in the incorrect le16 byte order. This fix corrects the byte order as cpu order. Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: r819xU_firmware.h: fix line over 80 charactersBuţiu Alexandru Octavian2015-06-081-1/+2
| | | | | | | | Fixed coding style issue line "over 80 characters" detected by checkpatch.pl in r819xU_firmware.h Signed-off-by: Buţiu Alexandru Octavian <predator5047@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: drivers: rtl8192u: r819xU_firmware.h: removed commented macroBuţiu Alexandru Octavian2015-06-081-8/+0Star
| | | | | | | Removed commented macro that was no longer needed Signed-off-by: Buţiu Alexandru Octavian <predator5047@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Fix indentation issueChaitanya Dhere2015-06-081-1/+1
| | | | | | | This change was detected with help of checkpatch.pl script. Signed-off-by: Chaitanya Dhere <cvijaydh@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Patch to modify if, else conditionsChaitanya Dhere2015-06-081-4/+2Star
| | | | | | | | | In this patch, the if, else conditions are modified to remove the unnecessary equality checks. This change was detected with help of coccinelle tool. Signed-off-by: Chaitanya Dhere <cvijaydh@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Correct include indentation and openning braces at new linePedro Marzo Perez2015-05-311-6/+3Star
| | | | | | | | Opening braces should never be in a new line. Correct include indentation. Signed-off-by: Pedro Marzo Perez <marzo.pedro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: don't redefine container_of()Marti Bolivar2015-05-081-16/+1Star
| | | | | | | This file already includes <linux/kernel.h>. Signed-off-by: Marti Bolivar <mbolivarmullen@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8192u: delete another embedded instance of generic reason codesPaul Gortmaker2015-05-081-48/+0Star
| | | | | | | | | | We have global copies of all these reason codes. We don't need local copies. Worse is that these seem totally unused; a grep for some of the fields comes up empty, and it still compiles after its complete removal. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8192u: don't duplicate ieee80211 constants for status/auth/reasonPaul Gortmaker2015-05-081-76/+1Star
| | | | | | | | | | | | | | | | These are all defined as a part of the standard and should not be duplicated on a per-driver basis. Use the global ones and delete the local ones. In switching to <linux/ieee80211.h> we have to delete a local copy of an identical struct that we prepped earlier to have identical field names, and we add explicit include <...> where needed in order to preserve getting a successful compile. This isn't the totality of duplicated data removed, but it is a start. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8192u: align local ieee80211_wmm_ac_param struct fields with globalPaul Gortmaker2015-05-082-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The <linux/ieee80211.h> and this local file both have a struct of the same name. They also have the same field sizes and generally the same fields, as can be seen here: ~/git/linux-head$ git grep -A4 'struct ieee80211_wmm_ac_param {' drivers/staging/rtl8192u/ieee80211/ieee80211.h:struct ieee80211_wmm_ac_param { drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_aci_acm_aifsn; drivers/staging/rtl8192u/ieee80211/ieee80211.h- u8 ac_ecwmin_ecwmax; drivers/staging/rtl8192u/ieee80211/ieee80211.h- u16 ac_txop_limit; drivers/staging/rtl8192u/ieee80211/ieee80211.h-}; -- include/linux/ieee80211.h:struct ieee80211_wmm_ac_param { include/linux/ieee80211.h- u8 aci_aifsn; /* AIFSN, ACM, ACI */ include/linux/ieee80211.h- u8 cw; /* ECWmin, ECWmax (CW = 2^ECW - 1) */ include/linux/ieee80211.h- __le16 txop_limit; include/linux/ieee80211.h-} __packed; ~/git/linux-head$ Here we just align the local field names with the main system one. Then we can add an include of the system one and delete the local copy in one smooth step in a follow-on commit. Not that the replacement: for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_aci_acm_aifsn/aci_aifsn/g' $i ; done for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_ecwmin_ecwmax/cw/g' $i ; done for i in `find . -name '*.[ch]'` ; do sed -i 's/ac_txop_limit/txop_limit/g' $i ; done implicitly shows that only one of the three fields is currently used. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8192u: promote auth_mode to a full 8 bitsPaul Gortmaker2015-05-081-2/+2
| | | | | | | | | | | | | Currently LEAP is defined to two locally but the identically named global constant is 128 in <linux/ieee80211.h>. In order for us to switch over to using the global value, we need to adjust the local storage which is currently not enough to hold the larger value. This is now consistent with the similar struct used in drivers/net/wireless/ipw2x00/libipw.h and other drivers. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* rtl8192u: don't trample on <linux/ieee80211.h> struct namespacePaul Gortmaker2015-05-088-127/+127
| | | | | | | | | | | | | | | | | | | | | | | | In order to start reducing the duplicated code/constants/macros in this driver, we need to include <linux/ieee80211.h> to provide the defacto versions. However this driver has structs with the same name as the ones in the main include, so namespace collision prevents us from doing step #1. Since the structs actually differ in their respective fields, we can't simply delete the local ones without impacting the runtime; a conversion to use the global ones can be considered at a later date if desired. Rename the ones here with a vendor specific prefix so that we won't have the namespace collision, and hence can continue on with the cleanup. Automated conversion done with: for i in `find . -name '*.[ch]'` ; do \ sed -i 's/struct ieee80211_hdr/struct rtl_80211_hdr/g' $i ; \ done Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Make core functions staticNickolaus Woodruff2015-05-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following sparse warnings in r8192U_core.c: CHECK drivers/staging/rtl8192u/r8192U_core.c drivers/staging/rtl8192u/r8192U_core.c:3212:6: warning: symbol 'rtl819x_watchdog_wqcallback' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3276:6: warning: symbol 'watch_dog_timer_callback' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3282:5: warning: symbol '_rtl8192_up' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3333:5: warning: symbol 'rtl8192_close' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:3406:6: warning: symbol 'rtl8192_restart' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:4618:6: warning: symbol 'rtl8192_irq_rx_tasklet' was not declared. Should it be static? drivers/staging/rtl8192u/r8192U_core.c:4736:6: warning: symbol 'rtl8192_cancel_deferred_work' was not declared. Should it be static? Signed-off-by: Nickolaus Woodruff <nickolauswoodruff@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: fixed multiple spelling errors.Carlos E. Garcia2015-05-081-1/+1
| | | | | | | Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: use correct array for debug outputDan Carpenter2015-04-031-1/+1
| | | | | | | | | | | | | This is supposed to be ->rates_ex[] instead of ->rates[]. I found this because static checkers complain than ->rates is too small so we're reading beyond the end of the array. It has 12 elements instead of 15. This bug was apparently copy and pasted from ipw2x00. I fixed it before in that driver 428e3cf5f98c ('ipw2x00: printing the wrong array in debug code') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192 Clean up function definitionEddie Kovsky2015-03-261-1/+1
| | | | | | | | | | | Change function definition to match its prototype declaration. This fixes the following warning generated by sparse: drivers/staging/rtl8192u/r8192U_core.c:1970:6: warning: symbol 'rtl8192_update_ratr_table' was not declared. Should it be static? Signed-off-by: Eddie Kovsky <ewk@edkovsky.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: Fix static decleration sparse warning.Cihangir Akturk2015-03-261-2/+2
| | | | | | | | | | | The function 'ieee80211_check_auth_response' is used only in this file, so make it static. This patch fixes the following sparse warning. 'ieee80211_check_auth_response' was not declared. Should it be static? Signed-off-by: Cihangir Akturk <cakturk@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Fix space issues before '(' and after ')'Haneen Mohammed2015-03-262-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Space is required before the open and after the close parenthesis. This patch adds space after 'if' and before '{'. This was done with the help of the following Coccinelle script: @r@ expression E; position p1,p2,p3; @@ if@p1 (E) @p3{@p2 ... } @script:python@ p1 << r.p1; p2 << r.p2; p3 << r.p3; @@ l1 = int (p1[0].line) l2 = int (p2[0].line) l3 = int (p3[0].line) c1 = int (p1[0].column_end) c2 = int (p2[0].column) c3 = int (p3[0].column) if (l1 != l2): cocci.include_match(False) if (l2 == l3 and c3 + 2 == c2): cocci.include_match(False) @@ position r.p1,r.p2,r.p3; expression r.E; @@ -if@p1 (E) @p3{@p2 +if (E) { ... } Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Add space before open parenthesisHaneen Mohammed2015-03-265-75/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Space is required before the open parenthesis. This patch adds space after if to address that issue. This was done with the help of the following Coccinelle script: @r@ position p1,p2; @@ if@p1 (@p2 ...) { ... } @script:python@ p1 << r.p1; p2 << r.p2; @@ l1 = int (p1[0].line) l2 = int (p2[0].line) c1 = int (p1[0].column) c2 = int (p2[0].column) if (l2 == l1 and c1 + 2 != c2): cocci.include_match(False) @@ position r.p1,r.p2; @@ - if@p1 ( + if ( ...) { ... } Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Remove function prototype from .c fileCristina Opriceana2015-03-231-1/+0Star
| | | | | | | | Remove function prototype from r8192U_core.c since it is declared in the r8192U.h header and this is included in r8192U_core.c Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Make function prototypes staticCristina Opriceana2015-03-231-8/+8
| | | | | | | | Make functions static since they are used locally and no other files refer them. Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Remove unnecessary spacesHatice ERTÜRK2015-03-201-4/+4
| | | | | | | | Fix checkpatch.pl issues with "unnecessary whitespace before a quoted newline" in r819xU_phy.c Signed-off-by: Hatice ERTURK <haticeerturk27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Rename struct to avoid CamelCaseCristina Opriceana2015-03-182-3/+3
| | | | | | | | | | | | | | | | | | | This patch renames struct DRxPathSel to dynamic_rx_path_sel in order to keep the notations consistent and to remove the warning: "CHECK: Avoid CamelCase". Done with coccinelle: @@ @@ struct -DRxPathSel +dynamic_rx_path_sel {...} @@ @@ struct -DRxPathSel +dynamic_rx_path_sel Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Do not add new typedefsCristina Opriceana2015-03-182-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the dig_t and DRxPathSel type definitions in order to avoid the following warning: "WARNING: Do not add new typedefs". Done with coccinelle and this script: @r@ type t; identifier id; @@ typedef struct id {...} t; @script:python get_name@ t << r.t; tdres; @@ coccinelle.tdres = t.replace("_t", ""); @r_match@ type r.t; identifier r.id; identifier get_name.tdres; @@ -typedef struct -id +tdres {...} -t ; @r_replace@ type r.t; identifier get_name.tdres; @@ -t +struct tdres Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Simplify if conditionKsenija Stanojevic2015-03-161-1/+1
| | | | | | | | This patch removes macro true from if condition since variable priv->ieee80211->LinkDetectInfo.bBusyTraffic is already of type bool. Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: remove return from end of void functionSupriya Karanth2015-03-161-5/+0Star
| | | | | | | | | | | | | | | | | | | | This patch removes the return statement at the end of a void function as it is not necessary. found by checkpatch.pl: WARNING: void function return statements are not generally useful changes made using coccinelle script: @@ @@ ... when != if (...) return; when != if (...) { ... return;} -return; Signed-off-by: Supriya Karanth <iskaranth@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Remove parentheses around right side an assignmentHaneen Mohammed2015-03-165-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Parentheses are not needed around the right hand side of an assignment. This patch remove parenthese of such occurenses. Issue was detected and solved using the following coccinelle script: @rule1@ identifier x, y, z; expression E1, E2; @@ ( x = (y == z); | x = (E1 == E2); | x = -( ... -) ; ) Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8192u: Bool tests don't need comparisonsCristina Opriceana2015-03-164-8/+7Star
| | | | | | | | | This patch removes explicit true/false comparations to bool variables. Warning found by coccinelle: "WARNING: Comparison to bool" Signed-off-by: Cristina Opriceana <cristina.opriceana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8192u: remove break after returnSupriya Karanth2015-03-161-1/+0Star
| | | | | | | | | | | Remove "break" statement after a "return" statement as it does not get executed. Found by checkpatch.pl - break is not useful after a goto or return Signed-off-by: Supriya Karanth <iskaranth@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>