aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8188eu (follow)
AgeCommit message (Collapse)AuthorFilesLines
2015-11-15staging: rtl8188eu: goto removedIvan Safonov1-54/+13
malloc error handling moved into one place. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: goto replaced by 'else' branchIvan Safonov1-14/+11
goto is not needed here. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: unused macros removedIvan Safonov2-40/+0
IS_* and GET_CVID_* macros have not been used. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: rarely used macros replaced by their definitionsIvan Safonov2-8/+8
IS_* macros (except one) occur only once. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: for loop instead of while loop usedIvan Safonov1-10/+4
The range of elements to fill with zeros is determined by using a roundup macro Signed-off-by: Ivan Safonov <insafonov@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: offset renamed to write_addressIvan Safonov1-6/+6
This name is better suited for this variable. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: pu4BytePtr renamed to dword_bufferIvan Safonov1-2/+2
This name is better suited for this variable. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: buf_ptr renamed to byte_bufferIvan Safonov1-3/+3
This name is better suited for this variable. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: unnessesary braces for single statement block removedIvan Safonov1-4/+2
checkpatch fix: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: unnecessary initialization removedIvan Safonov1-1/+1
It is superfluous. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: types of local variables conformed with types of function argumentsIvan Safonov1-2/+2
The array should not change in any case. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: buf_ptr variable completely defined in a single lineIvan Safonov1-1/+1
It is simpler. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: offset increment placed into for loop headerIvan Safonov1-4/+3
It makes the code little easier. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: unnecessary branching removedIvan Safonov1-5/+3
If the 'remain' is zero, the loop is not executed at all. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: unnecessary variable override removedIvan Safonov1-3/+1
Variable value calculated in the previous loop. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: offset variable replaced by its valueIvan Safonov1-1/+1
It is now possible to get rid of re-initializing the offset variable. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: initial value placed in the variableIvan Safonov1-3/+2
Line become shorter. After the loop offset variable points to the location following insertion. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: assigning a value to the variable is replaced by the incrementIvan Safonov1-1/+3
It is made to the initial value could be placed in the offset variable. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: *(ptr + i) replaced by ptr[i] in _rtl88e_fw_block_writeIvan Safonov1-2/+2
It is better to read. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15Staging: rtl8188eu: fix space prohibited before that ','Abdul Hussain1-3/+3
This patch fixes the following checkpatch.pl error: fix space prohibited before that ',' Signed-off-by: Abdul Hussain <hussain.abdul@outlook.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: 'infinite' loop removedIvan Safonov1-19/+15
The body of this loop is executed only once, so it can be removed. In this loop no keyword 'continue', only 'break' at the end. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: while loop replaced by for loopIvan Safonov1-8/+1
Here is more suitable for loop. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: do .. while (0) loop replaced by while (...) loopIvan Safonov1-6/+2
It is a simple and clear representation of this loop. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: add missing delay in polling loops.Rémy Oudompheng1-1/+2
Previously the code could exit with failure too early. Signed-off-by: Rémy Oudompheng <remyoudompheng@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: jiffies are unsigned longRémy Oudompheng10-52/+62
Remove rtw_get_passing_time_ms function and adjust type of relevant variables. Signed-off-by: Rémy Oudompheng <remyoudompheng@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: core: Change function parameter to boolAmitoj Kaur Chawla1-1/+1
Change int wait_ack to bool wait_ack as it only takes true or false as its argument. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: core: Remove wrapper functionAmitoj Kaur Chawla1-17/+24
Remove wrapper function issue_probereq() that can be replaced by a single line of code and rename _issue_probereq() to issue_probereq(). This patch also fixes line over 80 characters checkpatch.pl warning. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: Remove unused functionAmitoj Kaur Chawla2-6/+0
Remove function that is declared but not called anywhere. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-11-15staging: rtl8188eu: core: rtw_ap : Remove unnecessary functionsAmitoj Kaur Chawla1-53/+1
Drop unnecessary functions that are declared but not being used. Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: pwrGrpCnt variable removed in store_pwrindex_offset functionIvan Safonov1-2/+1
This variable used only once in the beginning of the function, it can be removed. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: new variable for hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] in store_pwrindex_offset functionIvan Safonov1-16/+18
hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] frequent in this function, so it replaced by the power_level_offset new variable. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: checkpatch fixes: 'Avoid CamelCase' in hal/bb_cfg.cIvan Safonov1-6/+6
This is checkpatch fixes for hal/bb_cfg.c file: Avoid CamelCase. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: checkpatch fixes: line over 80 characters splited into two partsIvan Safonov1-4/+8
This is checkpatch fixes for hal/bb_cfg.c file: line over 80 characters. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: checkpatch fixes: alignment should match open parenthesisIvan Safonov1-1/+1
This is checkpatch fixes for hal/bb_cfg.c file: alignment should match open parenthesis. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: checkpatch fixes: unnecessary parentheses removed in hal/bb_cfg.cIvan Safonov1-4/+4
This is checkpatch fixes for hal/bb_cfg.c file: unnecessary parentheses around <expr>. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: checkpatch fixes: spaces preferred around that '|' in hal/bb_cfg.cIvan Safonov1-1/+1
This is checkpatch fixes for hal/bb_cfg.c file: spaces preferred around that '|'. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: operator = replaced by += in loop incrementIvan Safonov2-4/+4
x = x + a and x += a equivalen, but second preferably. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: occurrence of the 5 GHz code markedIvan Safonov1-0/+3
Channel numbers greater than 14 are used here, which are possible only for the 5 GHz frequency. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: increment placed into for loop headerIvan Safonov1-2/+1
The increment at the end of the cycle, and it can be placed in the loop header. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: while loop replaced by for loop in rtw_restruct_wmm_ieIvan Safonov1-3/+2
This patch replaces while loop with for loop, because the initial condition and the increment clearly and briefly defined for this loop. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: unused MIN macro removedIvan Safonov1-3/+0
This patch removes unused MIN macro from include/rtw_security.h. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: unused MEM_ALIGNMENT_OFFSET and MEM_ALIGNMENT_PADDING macros removedIvan Safonov1-3/+0
This patch removes unused MEM_ALIGNMENT_OFFSET and MEM_ALIGNMENT_PADDING macros from include/basic_types.h. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: unused SUCCESS and FAIL macros removedIvan Safonov1-3/+0
This patch removes unused SUCCESS and FAIL macros in include/basic_types.h. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: abs kernel macro used in simularity_compare functionIvan Safonov1-1/+1
abs macro is useful for determining the difference between the two integers. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macroIvan Safonov3-3/+3
min_t macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macroIvan Safonov8-21/+20
min_t macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: ternary operator (?:) replaced by min/max kernel macroIvan Safonov3-7/+5
min (or max) kernel macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: clamp kernel macro used in proc_get_rx_signalIvan Safonov1-2/+1
To limit the range of integers there is clamp macro. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-29staging: rtl8188eu: sizeof/sizeof replaced by ARRAY_SIZE kernel macroIvan Safonov3-3/+3
ARRAY_SIZE shorter and more difficult to create bugs. Signed-off-by: Ivan Safonov <insafonov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: rtl8188eu: Remove unnecessary variablesAmitoj Kaur Chawla1-4/+1
Remove unnecessary variable that can be replaced with a single line of code. The semantic patch used to find this is: // <smpl> @@ expression ret; @@ - if (ret) return ret; - return 0; + return ret; @@ local idexpression ret; expression e; @@ - ret = e; - return ret; + return e; @@ type T; identifier i; expression E; @@ - T i = E; ... when != i @@ type T; identifier i; @@ - T i; ... when != i // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>