summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8712
Commit message (Collapse)AuthorAgeFilesLines
* staging: rtl8712: remove unnecessary else after returnMike Krinkin2014-12-021-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>
* staging: rtl8712: remove unused variablesSudip Mukherjee2014-10-2919-137/+30
| | | | | | | | | | | | | | | | | | 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>
* staging: rtl8712: Remove redundant castRasmus Villemoes2014-10-291-1/+1
| | | | | | | | struct firmware::data has type const u8*, as does *ppmappedfw, so the cast to u8* is unnecessary and slightly confusing. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Fix unnecessary parentheses style warning in rtl871x_xmit.cEsra Altintas2014-10-201-1/+1
| | | | | | | | | This fixes the following checkpatch.pl warning: WARNING: Unnecessary parentheses - maybe == should be = ? Signed-off-by: Esra Altintas <es.altintas@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fix unnecessary elses after return/break in rtl8712_efuse.cSerguey Parkhomovsky2014-10-201-20/+20
| | | | | | | This patch fixes two unnecessary else conditions that were found by checkpatch.pl. Signed-off-by: Serguey Parkhomovsky <sergueyparkhomovsky@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712:ieee80211 remove unnecessary elseNitin Kuppelur2014-10-201-8/+6
| | | | | | | | Removed unnecessary else after return/break to solve checkpatch.pl warning Signed-off-by: Nitin Kuppelur <nitinkuppelur@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove unnecessary cast for argument of kfreeTapasweni Pathak2014-10-204-33/+33
| | | | | | | | | | | | This patch removes all occurrences of unnecessary cast on the argument to kfree, all over in rtl8712. There is no need of the cast on the argument to kfree. Greped to find occurrences. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Delete explicit comparison with false and NULLTapasweni Pathak2014-10-206-23/+21
| | | | | | | | This patch delete explicit comparison to false and NULL in files of rtl8712. Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Fixed else not required after returnSarah Khan2014-10-201-6/+2
| | | | | | | | WARNING: else is generally not required after return checkpatch.pl warning in osdep_service.h Signed-off-by: Sarah Khan <sarahjmi07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Replace "the the " with "the"Tapasweni Pathak2014-10-201-1/+1
| | | | | | | | | | 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: Tapasweni Pathak <tapaswenipathak@gmail.com> Acked-by: Daniel Baluta <daniel.baluta@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Fixed else not required after returnSarah Khan2014-10-021-4/+2
| | | | | | | | | WARNING: Else generally not required after return checkpatch.pl warning in hal_init.c Fixed by removing else Signed-off-by: Sarah Khan <sarahjmi07@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Fix missing blank line warningMelike Yurtoglu2014-10-021-0/+1
| | | | | | | | Fixes "Missing a blank line after declarations" checkpatch.pl warning in usb_ops_linux.c Signed-off-by: Melike Yurtoglu <aysemelikeyurtoglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Fix unnecessary parentheses style warningYeliz Taneroglu2014-10-021-1/+1
| | | | | | | | | This fixes the following checkpatch.pl warning: drivers/staging/rtl8712/rtl871x_recv.c:634 warning: Unnecessary parentheses - maybe == should be = ? Signed-off-by: Yeliz Taneroglu <yeliztaneroglu@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: add new line after declarationsTapasweni Pathak2014-09-287-1/+20
| | | | | | | | This patch fixes checkpatch.pl warning in hal_init.c file WARNING : Missing a blank line after declarations Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: fixed missing blank lineSarah Khan2014-09-231-0/+1
| | | | | | | | | WARNING : Missing a blank line after declaration checkpatch.pl warning in hal_init.c Signed-off-by: Sarah Khan <sarahjmi07@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: merge lines and remove unused variable for immediate returnTapasweni Pathak2014-09-232-16/+5
| | | | | | | | | | | | | | | | | | | | | This patch merge two lines in a single line if immediate return is found. Unused variables in each case were removed manually as they are no longer needed. This is done using Coccinelle. Semantic patch used for this is as follows : @@ expression ret; identifier f; @@ -ret = +return f(...); -return ret; Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Add space after return typeTapasweni Pathak2014-09-231-1/+1
| | | | | | | | This patch fixes checkpatch.pl warning in file rtl871x_ioctl.h WARNING : Missing space after return type Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Remove unnecessary parenthesesTapasweni Pathak2014-09-232-2/+2
| | | | | | | | 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>
* Staging: rtl8712 : Fix line over 80 charactersTapasweni Pathak2014-09-237-13/+18
| | | | | | | | This patch fixes checkpatch.pl warning in files of rtl8712 WARNING : line over 80 characters Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: use kmalloc_array over kmallocTapasweni Pathak2014-09-231-2/+2
| | | | | | | | This patch fixes checkpatch.pl warning in file rtl871x_xmit.c WARNING : prefer kmalloc_array over kmalloc with multiply Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: remove unnecessary 'out of memory' messageTapasweni Pathak2014-09-231-4/+1
| | | | | | | | This patch fixes checkpatch.pl warning in file usb_ops_linux.c WARNING : possible unecessary 'out of memory' message Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: fixed space prohibitionTapasweni Pathak2014-09-231-1/+1
| | | | | | | | This patch fixes checkpatch.pl warning in file rtl871x_io.h WARNING : space prohibited before semicolon Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: remove void function return; statementTapasweni Pathak2014-09-232-2/+0
| | | | | | | | This patch fixes checkpatch.pl warning in files of rtl8712 WARNING : void function return statement are not generally useful Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: remove semicolon after macroTapasweni Pathak2014-09-231-1/+1
| | | | | | | | This patch fixes checkpatch.pl warning in rtl871x_mp.h file WARNING : Macro should not use a trailing semicolon Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Missing a blank line after declarationsAybuke Ozdemir2014-09-231-1/+3
| | | | | | | | This patch fixes these warning messages found by checkpatch.pl: WARNING : Missing a blank line after declarations. Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: Remove unnecessary parentheses.Aybuke Ozdemir2014-09-231-1/+1
| | | | | | | | This patch fixes checkpatch.pl warning Unnecessary parentheses in rtl871x_xmit.c Signed-off-by: Aybuke Ozdemir <aybuke.147@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: rtl8712: remove break after return statementTapasweni Pathak2014-09-231-1/+0
| | | | | | | | This patch fixes checkpatch.pl warning in rtl871x_ioctl_linux.c file WARNING : break is not useful after goto or return Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging:rtl8712:mlme_linux.c: Adds blank lines to pass checkpatch.plSantiago Torres2014-07-301-0/+3
| | | | | | | | Added three newlines after variable declarations to pass checkpatch.pl. Signed-off by: Santiago Torres-Arias <torresariass@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove wrapper function thread_enter()James A Shackleford2014-07-092-6/+1
| | | | | | | | The inline function thread_enter() accepts a single ignored parameter and is just a wrapper for allow_signal(SIGTERM). Removed. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove #define _workitem struct work_structJames A Shackleford2014-07-095-8/+7
| | | | | | | | _workitem is just a #define for work_struct. Remove the #define and use struct work_struct directly instead. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove wrapper function _set_workitem()James A Shackleford2014-07-093-8/+3
| | | | | | | The inline function _set_workitem() simply wraps schedule_work(). Removed. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove wrapper function _init_workitem()James A Shackleford2014-07-094-11/+4
| | | | | | | | | The inline function _init_workitem() is just a wrapper around INIT_WORK(). Oddly, this wrapper accepts 3 parameters while INIT_WORK() only accepts 2. The third parameter is unused. Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove inapplicable commentJames A Shackleford2014-06-261-5/+0
| | | | | Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove wrapper function _queue_emptyJames A Shackleford2014-06-269-15/+10
| | | | | | | | _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>
* staging: rtl8712: remove function get_list_headJames A Shackleford2014-06-269-41/+32
| | | | | | | | 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>
* staging: rtl8712: remove wrapper function get_nextJames A Shackleford2014-06-2610-51/+48
| | | | | | | | | 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>
* staging: rtl8712: remove wrapper function list_deleteJames A Shackleford2014-06-268-26/+21
| | | | | | | | 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>
* staging: rtl8712: remove wrapper function list_insert_tailJames A Shackleford2014-06-269-30/+24
| | | | | | | | 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>
* staging: rtl8712: remove wrapper function is_list_emptyJames A Shackleford2014-06-264-13/+5
| | | | | | | | 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>
* staging: rtl8712: remove wrapper function _init_listheadJames A Shackleford2014-06-2610-35/+30
| | | | | | | | _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>
* staging: rtl8712: remove unused inline _RND512()James A Shackleford2014-06-261-5/+0
| | | | | Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove unused inline _RND256()James A Shackleford2014-06-261-5/+0
| | | | | Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove inline _RND128() and use round_up()James A Shackleford2014-06-262-6/+1
| | | | | Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: remove inline _RND8() and use round_up()James A Shackleford2014-06-262-6/+1
| | | | | Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: replace kmalloc(..., sizeof(T))Vitaly Osipov2014-06-194-57/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As suggested by Andy Shevchenko on driverdev-devel, replace v = ... sizeof(struct type_of_v) -> sizeof(*v) Based on a cocci patch along the lines of @@ type T; expression E; identifier V; @@ T *V; ... - V = kmalloc(sizeof(T), E); + V = kmalloc(sizeof(*V), E); @@ type T; expression E; identifier V; @@ T *V; ... - V = kzalloc(sizeof(T), E); + V = kzalloc(sizeof(*V), E); Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: rtl871x_ioctl_linux.c: Cleaning up useless if statementRickard Strandqvist2014-06-191-6/+1
| | | | | | | | The same code regardless of the outcome of the if statement. And clean up another duplicate line of code. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712, rtl8712: avoid lots of build warningsArnd Bergmann2014-06-191-2/+2
| | | | | | | | | | | | | | | | The rtl8712 driver has an 'extern inline' function that contains an 'if', which causes lots of warnings with CONFIG_PROFILE_ALL_BRANCHES overriding the definition of 'if': drivers/staging/rtl8712/ieee80211.h:759:229: warning: '______f' is static but declared in inline function 'ieee80211_get_hdrlen' which is not static [enabled by default] This changes the driver to use 'static inline' instead, which happens to be the correct annotation anyway. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Florian Schilhabel <florian.c.schilhabel@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Remove useless variable 'fw_found'Thomas Vegas2014-06-194-9/+3
| | | | | | | | | The net device only exists when firmware is loaded successfully. Firmware presence variable is only used through r871xu_dev_remove() and this function already checks for net device existence. Signed-off-by: Thomas Vegas <thomas@grouk.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: Fix oops on dongle removal if firmware is not availableThomas Vegas2014-06-191-22/+22
| | | | | | | | | When firmware is not available, net device is not created. Upon disconnect, we must check for net device existence before trying to release net device private data. Signed-off-by: Thomas Vegas <thomas@grouk.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: rtl8712: return -ENOMEM instead of -1Vitaly Osipov2014-05-271-1/+1
| | | | | | | | | | After the commit 91d435f replaced _malloc with kmalloc, smatch picked up a couple of new warnings. This fixes the warning: warn: returning -1 instead of -ENOMEM is sloppy Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>