[PATCH 08/21] staging: rtl8188eu: unused MEM_ALIGNMENT_OFFSET and MEM_ALIGNMENT_PADDING macros removed

2015-10-24 Thread Ivan Safonov
This patch removes unused MEM_ALIGNMENT_OFFSET and MEM_ALIGNMENT_PADDING macros from include/basic_types.h. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/basic_types.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl

[PATCH 18/21] staging: rtl8188eu: checkpatch fixes: line over 80 characters splited into two parts

2015-10-24 Thread Ivan Safonov
This is checkpatch fixes for hal/bb_cfg.c file: line over 80 characters. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/bb_cfg.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/d

[PATCH 13/21] staging: rtl8188eu: operator = replaced by += in loop increment

2015-10-24 Thread Ivan Safonov
x = x + a and x += a equivalen, but second preferably. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_recv.c | 6 +++--- drivers/staging/rtl8188eu/hal/mac_cfg.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/s

[PATCH 11/21] staging: rtl8188eu: increment placed into for loop header

2015-10-24 Thread Ivan Safonov
The increment at the end of the cycle, and it can be placed in the loop header. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 3 +-- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 15 --- 2 files changed, 5 insertions(

[PATCH 17/21] staging: rtl8188eu: checkpatch fixes: alignment should match open parenthesis

2015-10-24 Thread Ivan Safonov
This is checkpatch fixes for hal/bb_cfg.c file: alignment should match open parenthesis. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/bb_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/bb_cf

[PATCH 20/21] staging: rtl8188eu: new variable for hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] in store_pwrindex_offset function

2015-10-24 Thread Ivan Safonov
hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] frequent in this function, so it replaced by the power_level_offset new variable. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/bb_cfg.c | 34 ++ 1 file ch

[PATCH 04/21] staging: rtl8188eu: ternary operator (?:) replaced by min/max kernel macro

2015-10-24 Thread Ivan Safonov
min macro better conveys the meaning of the code. Constants types explicitly specified to suppress compiler warnings about incompatible types. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_ap.c| 2 +- drivers/staging/rtl8188e

[PATCH 07/21] staging: rtl8188eu: unused SUCCESS and FAIL macros removed

2015-10-24 Thread Ivan Safonov
This patch removes unused SUCCESS and FAIL macros in include/basic_types.h. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/basic_types.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/basic_types.h b/d

[PATCH 21/21] pwrGrpCnt variable removed in store_pwrindex_offset function

2015-10-24 Thread Ivan Safonov
This variable used only once in the beginning of the function, it can be removed. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/d

[PATCH 09/21] staging: rtl8188eu: unused MIN macro removed

2015-10-24 Thread Ivan Safonov
This patch removes unused MIN macro from include/rtw_security.h. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/rtw_security.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_security.h b/drivers/s

[PATCH 16/21] staging: rtl8188eu: checkpatch fixes: unnecessary parentheses removed in hal/bb_cfg.c

2015-10-24 Thread Ivan Safonov
This is checkpatch fixes for hal/bb_cfg.c file: unnecessary parentheses around . Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/bb_cfg.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/bb_cf

[PATCH 02/21] staging: rtl8188eu: clamp kernel macro used in proc_get_rx_signal

2015-10-24 Thread Ivan Safonov
To limit the range of integers there is clamp macro. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_debug.c b/drivers/staging/rtl8188e

[PATCH 10/21] staging: rtl8188eu: while loop replaced by for loop in rtw_restruct_wmm_ie

2015-10-24 Thread Ivan Safonov
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 <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 5 ++--- 1 file changed, 2 insertions(+), 3 del

[PATCH 15/21] staging: rtl8188eu: BITn macro replaced by BIT(n) in hal/bb_cfg.c

2015-10-24 Thread Ivan Safonov
BIT(n) macro preferable BITn. The BITn definitions saved, because BITn used in other files. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/bb_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/bb_cf

[PATCH 06/21] staging: rtl8188eu: abs kernel macro used in simularity_compare function

2015-10-24 Thread Ivan Safonov
abs macro is useful for determining the difference between the two integers. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/s

[PATCH 19/21] staging: rtl8188eu: checkpatch fixes: 'Avoid CamelCase' in hal/bb_cfg.c

2015-10-24 Thread Ivan Safonov
This is checkpatch fixes for hal/bb_cfg.c file: Avoid CamelCase. Additionaly unnecessary space before line removed. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/bb_cfg.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff

[PATCH 21/21] staging: rtl8188eu: pwrGrpCnt variable removed in store_pwrindex_offset function

2015-10-24 Thread Ivan Safonov
This variable used only once in the beginning of the function, it can be removed. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/d

[PATCH v2] staging: rtl8188eu: abs kernel macro used in simularity_compare function

2015-10-27 Thread Ivan Safonov
abs macro is useful for determining the difference between the two integers. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - big patchset splitted into some small independent patches. drivers/staging/rtl8188eu/hal/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH v2] staging: rtl8188eu: ternary operator (?:) replaced by min_t macro in efuse_read_phymap_from_txpktbuf

2015-10-26 Thread Ivan Safonov
min_t macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - big patchset splitted into some small independent patches. - min replaced by min_t. drivers/staging/rtl8188eu/core/rtw_efuse.c | 2 +- 1 file changed, 1 insertion

[PATCH v2 2/2] staging: rtl8188eu: ternary operator (?:) replaced by min kernel macro

2015-10-26 Thread Ivan Safonov
min macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - big patchset splitted into some small independent patches. - before replacing (?:) to macro min variables given to the appropriate type. drivers/staging/rtl8188e

[PATCH v2 07/20] staging: rtl8188eu: unused SUCCESS and FAIL macros removed

2015-10-27 Thread Ivan Safonov
This patch removes unused SUCCESS and FAIL macros in include/basic_types.h. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/include/basic_types.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/i

[PATCH v2 19/20] staging: rtl8188eu: new variable for hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] in store_pwrindex_offset function

2015-10-27 Thread Ivan Safonov
hal_data->MCSTxPowerLevelOriginalOffset[pwrGrpCnt] frequent in this function, so it replaced by the power_level_offset new variable. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/hal/bb_c

[PATCH v2 08/20] staging: rtl8188eu: unused MEM_ALIGNMENT_OFFSET and MEM_ALIGNMENT_PADDING macros removed

2015-10-27 Thread Ivan Safonov
This patch removes unused MEM_ALIGNMENT_OFFSET and MEM_ALIGNMENT_PADDING macros from include/basic_types.h. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/include/basic_types.h | 3 --- 1 file changed, 3 deletions(-) diff

[PATCH v2 17/20] staging: rtl8188eu: checkpatch fixes: line over 80 characters splited into two parts

2015-10-27 Thread Ivan Safonov
This is checkpatch fixes for hal/bb_cfg.c file: line over 80 characters. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/hal/bb_cfg.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/s

[PATCH v2 05/20] staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macro

2015-10-27 Thread Ivan Safonov
min_t macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - min replaced by mit_t. drivers/staging/rtl8188eu/core/rtw_efuse.c | 2 +- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 2 +- drivers/staging/rtl8188eu/

[PATCH v2 12/20] staging: rtl8188eu: occurrence of the 5 GHz code marked

2015-10-27 Thread Ivan Safonov
Channel numbers greater than 14 are used here, which are possible only for the 5 GHz frequency. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/d

[PATCH v2 06/20] staging: rtl8188eu: abs kernel macro used in simularity_compare function

2015-10-27 Thread Ivan Safonov
abs macro is useful for determining the difference between the two integers. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/hal/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188

[PATCH v2 15/20] staging: rtl8188eu: checkpatch fixes: unnecessary parentheses removed in hal/bb_cfg.c

2015-10-27 Thread Ivan Safonov
This is checkpatch fixes for hal/bb_cfg.c file: unnecessary parentheses around . Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/hal/bb_cfg.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/s

[PATCH v2 14/20] staging: rtl8188eu: checkpatch fixes: spaces preferred around that '|' in hal/bb_cfg.c

2015-10-27 Thread Ivan Safonov
This is checkpatch fixes for hal/bb_cfg.c file: spaces preferred around that '|'. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/hal/bb_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl

[PATCH v2 20/20] staging: rtl8188eu: pwrGrpCnt variable removed in store_pwrindex_offset function

2015-10-27 Thread Ivan Safonov
This variable used only once in the beginning of the function, it can be removed. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - subject corrected. drivers/staging/rtl8188eu/hal/bb_cfg.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/d

[PATCH v2 11/20] staging: rtl8188eu: increment placed into for loop header

2015-10-27 Thread Ivan Safonov
The increment at the end of the cycle, and it can be placed in the loop header. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/s

[PATCH v2 13/20] staging: rtl8188eu: operator = replaced by += in loop increment

2015-10-27 Thread Ivan Safonov
x = x + a and x += a equivalen, but second preferably. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/core/rtw_recv.c | 6 +++--- drivers/staging/rtl8188eu/hal/mac_cfg.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)

[PATCH v2 00/20] staging: rtl8188eu: code cleanups

2015-10-27 Thread Ivan Safonov
by mit_t in 4 and 5 patch. Ivan Safonov (20): staging: rtl8188eu: sizeof/sizeof replaced by ARRAY_SIZE kernel macro staging: rtl8188eu: clamp kernel macro used in proc_get_rx_signal staging: rtl8188eu: ternary operator (?:) replaced by min/max kernel macro staging: rtl8188eu: ternary operator

[PATCH v2 01/20] staging: rtl8188eu: sizeof/sizeof replaced by ARRAY_SIZE kernel macro

2015-10-27 Thread Ivan Safonov
ARRAY_SIZE shorter and more difficult to create bugs. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/hal/mac_cfg.c| 2 +- drivers/staging/rtl8188eu/hal/rf_cfg.c | 2 +- drivers/staging/rtl8188eu/os_dep/ioctl_linux

[PATCH v2 02/20] staging: rtl8188eu: clamp kernel macro used in proc_get_rx_signal

2015-10-27 Thread Ivan Safonov
To limit the range of integers there is clamp macro. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_debu

[PATCH v2 09/20] staging: rtl8188eu: unused MIN macro removed

2015-10-27 Thread Ivan Safonov
This patch removes unused MIN macro from include/rtw_security.h. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/include/rtw_security.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/i

[PATCH v2 10/20] staging: rtl8188eu: while loop replaced by for loop in rtw_restruct_wmm_ie

2015-10-27 Thread Ivan Safonov
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 <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/core/rtw_mlme.c | 5 ++--- 1 file chan

[PATCH v2 04/20] staging: rtl8188eu: ternary operator (?:) replaced by min_t kernel macro

2015-10-27 Thread Ivan Safonov
min_t macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - min replaced by mit_t. drivers/staging/rtl8188eu/core/rtw_ap.c| 2 +- drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 2 +- drivers/staging/rtl8188e

[PATCH v2 03/20] staging: rtl8188eu: ternary operator (?:) replaced by min/max kernel macro

2015-10-27 Thread Ivan Safonov
min (or max) kernel macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/hal/odm_RTL8188E.c | 6 ++ drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 4 ++-- drivers/staging/rtl8188eu/

[PATCH v2 18/20] staging: rtl8188eu: checkpatch fixes: 'Avoid CamelCase' in hal/bb_cfg.c

2015-10-27 Thread Ivan Safonov
This is checkpatch fixes for hal/bb_cfg.c file: Avoid CamelCase. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/hal/bb_cfg.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188

[PATCH v2 16/20] staging: rtl8188eu: checkpatch fixes: alignment should match open parenthesis

2015-10-27 Thread Ivan Safonov
This is checkpatch fixes for hal/bb_cfg.c file: alignment should match open parenthesis. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: no changes. drivers/staging/rtl8188eu/hal/bb_cfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s

Re: [PATCH v2 01/20] staging: rtl8188eu: sizeof/sizeof replaced by ARRAY_SIZE kernel macro

2015-10-27 Thread Ivan Safonov
On 10/28/2015 12:05 AM, Albino B Neto wrote: 2015-10-27 13:13 GMT-02:00 Ivan Safonov <insafo...@gmail.com>: ARRAY_SIZE shorter and more difficult to create bugs. Signed-off-by: Ivan Safonov <insafo...@gmail.com> You tested ? Albino Not tested. Is this transformation

Re: [PATCH v2 01/20] staging: rtl8188eu: sizeof/sizeof replaced by ARRAY_SIZE kernel macro

2015-10-27 Thread Ivan Safonov
On 10/28/2015 12:05 AM, Albino B Neto wrote: 2015-10-27 13:13 GMT-02:00 Ivan Safonov <insafo...@gmail.com>: ARRAY_SIZE shorter and more difficult to create bugs. Signed-off-by: Ivan Safonov <insafo...@gmail.com> You tested ? Albino Not tested. Is this transformation

Re: [PATCH 05/21] staging: rtl8188eu: ternary operator (?:) replaced by min/max kernel macro

2015-10-26 Thread Ivan Safonov
On 10/26/2015 04:06 PM, Dan Carpenter wrote: On Sat, Oct 24, 2015 at 08:42:29PM +0700, Ivan Safonov wrote: diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 98bdc95..735e24b 100644 --- a/drivers/staging/rtl8188eu/os_dep

[PATCH v2] staging: rtl8188eu: sizeof/sizeof replaced by ARRAY_SIZE kernel macro

2015-10-26 Thread Ivan Safonov
ARRAY_SIZE shorter and more difficult to create bugs. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - big patchset splitted into some small independent patches drivers/staging/rtl8188eu/hal/mac_cfg.c| 2 +- drivers/staging/rtl8188eu/hal/rf_cfg.c

[PATCH v2] staging: rtl8188eu: clamp kernel macro used in proc_get_rx_signal

2015-10-26 Thread Ivan Safonov
To limit the range of integers there is clamp macro. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - big patchset splitted into some small independent patches. drivers/staging/rtl8188eu/core/rtw_debug.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH v2] staging: rtl8188eu: ternary operator (?:) replaced by min/max kernel macro

2015-10-26 Thread Ivan Safonov
min (or max) kernel macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - big patchset splitted into some small independent patches. drivers/staging/rtl8188eu/hal/odm_RTL8188E.c | 6 ++ drivers/staging/rtl8188eu/

[PATCH] staging: rtl8188eu: fixed width data types replaced by int

2015-10-26 Thread Ivan Safonov
There is no need to use fixed width data types. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_debug.c b/drivers/staging/rtl8188e

[PATCH v2] staging: rtl8188eu: ternary operator (?:) replaced by min_t/max_t kernel macro

2015-10-26 Thread Ivan Safonov
min_t macro better conveys the meaning of the code. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - big patchset splitted into some small independent patches. - min replaced by min_t. drivers/staging/rtl8188eu/core/rtw_ap.c| 2 +- drivers/staging/rtl

Re: [PATCH v2 05/12] staging: rtl8188eu: kzalloc replaced by kmalloc

2015-11-11 Thread Ivan Safonov
On 11/11/2015 04:43 PM, Dan Carpenter wrote: On Sun, Nov 08, 2015 at 02:11:08PM +0700, Ivan Safonov wrote: _rtl88e_fill_dummy fills the array elemets with zeros if necessary. _rtl88e_fill_dummy() fills the last sizeof(u32) or whatever so the code is aligned but it doesn't fill up to the end

Re: [PATCH 02/12] staging: rtl8188eu: return value and argument types changed in _rtl88e_write_fw function

2015-11-08 Thread Ivan Safonov
On 11/08/2015 05:11 PM, Andy Shevchenko wrote: On Sun, Nov 8, 2015 at 8:37 AM, Ivan Safonov <insafo...@gmail.com> wrote: Ideally the function should not change the variables outside of its body. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/

Re: [PATCH 02/12] staging: rtl8188eu: return value and argument types changed in _rtl88e_write_fw function

2015-11-10 Thread Ivan Safonov
On 11/09/2015 03:24 AM, Andy Shevchenko wrote: On Sun, Nov 8, 2015 at 1:26 PM, Ivan Safonov <insafo...@gmail.com> wrote: On 11/08/2015 05:11 PM, Andy Shevchenko wrote: On Sun, Nov 8, 2015 at 8:37 AM, Ivan Safonov <insafo...@gmail.com> wrote: Ideally the function shoul

Re: [PATCH v2 01/12] staging: rtl8188eu: if/else replaced by min_t

2015-11-10 Thread Ivan Safonov
On 11/09/2015 12:10 AM, Greg Kroah-Hartman wrote: On Sun, Nov 08, 2015 at 02:07:11PM +0700, Ivan Safonov wrote: Duplicated code removed. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 6 ++ 1 file changed, 2 insertions(+), 4 del

[PATCH 07/14] staging: rtl8188eu: offset increment placed into for loop header

2015-11-03 Thread Ivan Safonov
It makes the code little easier. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 44e8078..3

[PATCH 09/14] staging: rtl8188eu: types of local variables conformed with types of function arguments

2015-11-03 Thread Ivan Safonov
The array should not change in any case. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 4

[PATCH 00/14] _rtl88e_fw_block_write refactoring

2015-11-03 Thread Ivan Safonov
This patchset includes a set of small changes in the function _rtl88e_fw_block_write. Ivan Safonov (14): staging: rtl8188eu: *(ptr + i) replaced by ptr[i] in _rtl88e_fw_block_write staging: rtl8188eu: assigning a value to the variable is replaced by the increment staging: rtl8188eu

[PATCH 06/14] staging: rtl8188eu: unnecessary branching removed

2015-11-03 Thread Ivan Safonov
If the 'remain' is zero, the loop is not executed at all. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/ha

[PATCH 14/14] staging: rtl8188eu: offset renamed to write_address

2015-11-03 Thread Ivan Safonov
This name is better suited for this variable. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c

[PATCH 03/14] staging: rtl8188eu: initial value placed in the variable

2015-11-03 Thread Ivan Safonov
Line become shorter. After the loop offset variable points to the location following insertion. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/f

[PATCH 11/14] staging: rtl8188eu: unnessesary braces for single statement block removed

2015-11-03 Thread Ivan Safonov
checkpatch fix: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/d

[PATCH 04/14] staging: rtl8188eu: offset variable replaced by its value

2015-11-03 Thread Ivan Safonov
It is now possible to get rid of re-initializing the offset variable. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188

[PATCH 10/14] staging: rtl8188eu: unnecessary initialization removed

2015-11-03 Thread Ivan Safonov
It is superfluous. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 8eafd7e..b48f444 100644 --- a/d

[PATCH 05/14] staging: rtl8188eu: unnecessary variable override removed

2015-11-03 Thread Ivan Safonov
Variable value calculated in the previous loop. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 9

[PATCH 01/14] staging: rtl8188eu: *(ptr + i) replaced by ptr[i] in _rtl88e_fw_block_write

2015-11-03 Thread Ivan Safonov
It is better to read. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 23aa6d3..af93697

[PATCH 08/14] staging: rtl8188eu: buf_ptr variable completely defined in a single line

2015-11-03 Thread Ivan Safonov
It is simpler. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 3cfd2b2..4f1c3a2 100644 --- a/drivers/s

[PATCH 12/14] staging: rtl8188eu: buf_ptr renamed to byte_buffer

2015-11-03 Thread Ivan Safonov
This name is better suited for this variable. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 0

[PATCH v2 2/2] staging: rtl8188eu: unused macros removed

2015-11-05 Thread Ivan Safonov
IS_* and GET_CVID_* macros have not been used. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - All e-mail addresses of get_mainterner.pl script for this patch placed to the cc header. - Patch description corrected. drivers/staging/rtl8188eu/core/rtw_ioctl

[PATCH v2 1/2] staging: rtl8188eu: rarely used macros replaced by their definitions

2015-11-05 Thread Ivan Safonov
IS_* macros (except one) occur only once. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - All e-mail addresses of get_mainterner.pl script for this patch placed to the cc header. drivers/staging/rtl8188eu/hal/hal_com.c | 14 +++--- drivers/s

Re: [PATCH 1/3] staging: rtl8188eu: goto replaced by 'else' branch

2015-11-06 Thread Ivan Safonov
On 11/07/2015 10:14 AM, Greg Kroah-Hartman wrote: On Fri, Nov 06, 2015 at 10:17:29PM +0700, Ivan Safonov wrote: goto is not needed here. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 25 +++-- 1 file chang

[PATCH 04/12] staging: rtl8188eu: remove unused hal_data_8188e members

2015-11-07 Thread Ivan Safonov
u8 *pfirmware and u32 fwsize of hal_data_8188e structure not used. The pfwdata variable used to store a pointer to the buffer in rtl88eu_download_fw and the pfwbody variable points to the body of the firmware (without header). Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- d

[PATCH 12/12] staging: rtl8188eu: remove unused RTW_STATUS_CODE function

2015-11-07 Thread Ivan Safonov
This driver is only for the Linux kernel. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/osdep_service.h | 2 -- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 11 --- 2 files changed, 13 deletions(-) diff --git a/drivers/staging/rtl

[PATCH 05/12] staging: rtl8188eu: kzalloc replaced by kmalloc

2015-11-07 Thread Ivan Safonov
_rtl88e_fill_dummy fills the array elemets with zeros if necessary. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188

[PATCH 08/12] staging: rtl8188eu: if (a) ; else {...} replaced by if (!a) {...}

2015-11-07 Thread Ivan Safonov
It is looks bit better. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/

[PATCH 02/12] staging: rtl8188eu: return value and argument types changed in _rtl88e_write_fw function

2015-11-07 Thread Ivan Safonov
Ideally the function should not change the variables outside of its body. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/s

[PATCH 01/12] staging: rtl8188eu: if/else replaced by min_t

2015-11-07 Thread Ivan Safonov
Duplicated code removed. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 4

[PATCH 03/12] staging: rtl8188eu: change error code from -1 to -EFBIG

2015-11-07 Thread Ivan Safonov
-EFBIG more sutiable then -1 Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 5b569ef..3e354eb

[PATCH 03/13] staging: rtl8188eu: change error code from -1 to -EFBIG

2015-11-07 Thread Ivan Safonov
-EFBIG more sutiable then -1 Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 5b569ef..3e354eb

[PATCH 11/12] staging: rtl8188eu: reg_bssid variable removed in hw_var_set_bssid

2015-11-07 Thread Ivan Safonov
The reg_bssid variable used only once. Also idx renamed to i and Adapter to adapter. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8188

[PATCH 01/13] staging: rtl8188eu: if/else replaced by min_t

2015-11-07 Thread Ivan Safonov
Duplicated code removed. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 4

[PATCH 06/12] staging: rtl8188eu: use memset instead of for loop

2015-11-07 Thread Ivan Safonov
memset clearer than the for loop. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 7f1df4d..2

[PATCH 10/12] staging: rtl8188eu: reg_macid variable removed in hw_var_set_macaddr

2015-11-07 Thread Ivan Safonov
The reg_macid variable used only once. Also idx renamed to i and Adapter to adapter. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8188

[PATCH 02/13] staging: rtl8188eu: return value and argument types changed in _rtl88e_write_fw function

2015-11-07 Thread Ivan Safonov
Ideally the function should not change the variables outside of its body. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/s

[PATCH 09/12] staging: rtl8188eu: remove redundant spases

2015-11-07 Thread Ivan Safonov
They are not needed. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c

[PATCH 07/12] staging: rtl8188eu: sets the error code in wpa_set_encryption

2015-11-07 Thread Ivan Safonov
Most likely it is missed here. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index a

[PATCH 04/13] staging: rtl8188eu: remove unused hal_data_8188e members

2015-11-07 Thread Ivan Safonov
u8 *pfirmware and u32 fwsize of hal_data_8188e structure not used. The pfwdata variable used to store a pointer to the buffer and the pfwbody variable points to the firmware body (firmware without header). Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/ha

[PATCH v2 01/12] staging: rtl8188eu: if/else replaced by min_t

2015-11-07 Thread Ivan Safonov
Duplicated code removed. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 4

[PATCH v2 03/12] staging: rtl8188eu: change error code from -1 to -EFBIG

2015-11-07 Thread Ivan Safonov
-EFBIG more sutiable then -1 Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 5b569ef..3e354eb

[PATCH v2 04/12] staging: rtl8188eu: remove unused hal_data_8188e members

2015-11-07 Thread Ivan Safonov
u8 *pfirmware and u32 fwsize of hal_data_8188e structure not used. The pfwdata variable used to store a pointer to the buffer in rtl88eu_download_fw and the pfwbody variable points to the body of the firmware (without header). Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- d

[PATCH v2 02/12] staging: rtl8188eu: return value and argument types changed in _rtl88e_write_fw function

2015-11-07 Thread Ivan Safonov
Ideally the function should not change the variables outside of its body. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/s

[PATCH v2 07/12] staging: rtl8188eu: sets the error code in wpa_set_encryption

2015-11-07 Thread Ivan Safonov
Most likely it is missed here. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index a

[PATCH v2 08/12] staging: rtl8188eu: if (a) ; else {...} replaced by if (!a) {...}

2015-11-07 Thread Ivan Safonov
It is looks bit better. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/

[PATCH v2 05/12] staging: rtl8188eu: kzalloc replaced by kmalloc

2015-11-07 Thread Ivan Safonov
_rtl88e_fill_dummy fills the array elemets with zeros if necessary. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188

[PATCH v2 09/12] staging: rtl8188eu: remove redundant spases

2015-11-07 Thread Ivan Safonov
They are not needed. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c

[PATCH v2 06/12] staging: rtl8188eu: use memset instead of for loop

2015-11-07 Thread Ivan Safonov
memset clearer than the for loop. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/fw.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/fw.c b/drivers/staging/rtl8188eu/hal/fw.c index 7f1df4d..2

[PATCH v2 12/12] staging: rtl8188eu: remove unused RTW_STATUS_CODE function

2015-11-07 Thread Ivan Safonov
This driver is only for the Linux kernel. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/include/osdep_service.h | 2 -- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 11 --- 2 files changed, 13 deletions(-) diff --git a/drivers/staging/rtl

[PATCH v2 11/12] staging: rtl8188eu: reg_bssid variable removed in hw_var_set_bssid

2015-11-07 Thread Ivan Safonov
The reg_bssid variable used only once. Also idx renamed to i and Adapter to adapter. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8188

[PATCH v2 10/12] staging: rtl8188eu: reg_macid variable removed in hw_var_set_macaddr

2015-11-07 Thread Ivan Safonov
The reg_macid variable used only once. Also idx renamed to i and Adapter to adapter. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/usb_halinit.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8188

[PATCH 2/2] staging: rtl8188eu: unused macros removed

2015-11-04 Thread Ivan Safonov
These macros does not used. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 7 -- drivers/staging/rtl8188eu/include/HalVerDef.h | 33 -- 2 files changed, 40 deletions(-) diff --git a/drivers/staging/rtl

[PATCH 1/2] staging: rtl8188eu: rarely used macros replaced by their definitions

2015-11-04 Thread Ivan Safonov
IS_* macros (except one) occur only once. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/hal_com.c | 14 +++--- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/s

[PATCH v2 1/2] staging: rtl8188eu: for loop instead of while loop used

2015-11-04 Thread Ivan Safonov
The range of elements to fill with zeros is determined by using a roundup macro Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- Changes in v2: - Many small patches have been merged into one. drivers/staging/rtl8188eu/hal/fw.c | 14 -- 1 file changed, 4 insertions(

  1   2   3   4   5   >