[PATCH 2/3] staging: rtl8188eu: if/else replaced by min_t

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

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

2015-11-06 Thread Ivan Safonov
goto is not needed here. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188e

[PATCH 3/3] staging: rtl8188eu: goto removed

2015-11-06 Thread Ivan Safonov
malloc error handling moved into one place. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 67 +++- 1 file changed, 13 insertions(+), 54 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/d

How to mark suspicious code?

2015-11-05 Thread Ivan Safonov
Hi all! How can I mark suspicious code, if I can not fix it? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at

[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 --- 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/staging/rtl8188eu/hal/rtl8188e_dm.c

[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 --- 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_set.c | 7 -- drivers

[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

[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

How to mark suspicious code?

2015-11-05 Thread Ivan Safonov
Hi all! How can I mark suspicious code, if I can not fix it? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at

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 : ARRAY_SIZE shorter and more difficult to create bugs. Signed-off-by: Ivan Safonov You tested ? Albino Not tested. Is this transformation can to break the code? -- To unsubscribe from this list: send

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 1/3] staging: rtl8188eu: 5 GHz channel groups removed from /hal/rtl8188e_hal_init.c

2015-10-13 Thread Ivan Safonov
On 10/13/2015 10:40 PM, Greg Kroah-Hartman wrote: On Tue, Oct 13, 2015 at 10:00:41PM +0700, Ivan Safonov wrote: On 10/13/2015 10:47 AM, Greg Kroah-Hartman wrote: On Sat, Oct 10, 2015 at 01:23:13PM +0700, Ivan Safonov wrote: Unnecessary channel groups for 5 GHz removed from Hal_GetChnlGroup88E

Re: [PATCH 2/3] staging: rtl8188eu: bugfix: correct channels range is set in Hal_ReadTxPowerInfo88E

2015-10-13 Thread Ivan Safonov
On 10/13/2015 10:47 AM, Greg Kroah-Hartman wrote: On Sat, Oct 10, 2015 at 01:27:00PM +0700, Ivan Safonov wrote: Correct channels range is 1..14 (numbering from 1) but not 0..13. Have you tested this? I have not tested it. Why? From condition if (chnl <= 14) { bIn24G = t

Re: [PATCH 1/3] staging: rtl8188eu: 5 GHz channel groups removed from /hal/rtl8188e_hal_init.c

2015-10-13 Thread Ivan Safonov
On 10/13/2015 10:47 AM, Greg Kroah-Hartman wrote: On Sat, Oct 10, 2015 at 01:23:13PM +0700, Ivan Safonov wrote: Unnecessary channel groups for 5 GHz removed from Hal_GetChnlGroup88E and it transformed to pretty get_channel_group(const u8 channel). Also removed code for 5 GHz frequency

Re: [PATCH 2/3] staging: rtl8188eu: bugfix: correct channels range is set in Hal_ReadTxPowerInfo88E

2015-10-13 Thread Ivan Safonov
On 10/13/2015 10:47 AM, Greg Kroah-Hartman wrote: On Sat, Oct 10, 2015 at 01:27:00PM +0700, Ivan Safonov wrote: Correct channels range is 1..14 (numbering from 1) but not 0..13. Have you tested this? I have not tested it. Why? From condition if (chnl <= 14) { bIn24G = t

Re: [PATCH 1/3] staging: rtl8188eu: 5 GHz channel groups removed from /hal/rtl8188e_hal_init.c

2015-10-13 Thread Ivan Safonov
On 10/13/2015 10:47 AM, Greg Kroah-Hartman wrote: On Sat, Oct 10, 2015 at 01:23:13PM +0700, Ivan Safonov wrote: Unnecessary channel groups for 5 GHz removed from Hal_GetChnlGroup88E and it transformed to pretty get_channel_group(const u8 channel). Also removed code for 5 GHz frequency

Re: [PATCH 1/3] staging: rtl8188eu: 5 GHz channel groups removed from /hal/rtl8188e_hal_init.c

2015-10-13 Thread Ivan Safonov
On 10/13/2015 10:40 PM, Greg Kroah-Hartman wrote: On Tue, Oct 13, 2015 at 10:00:41PM +0700, Ivan Safonov wrote: On 10/13/2015 10:47 AM, Greg Kroah-Hartman wrote: On Sat, Oct 10, 2015 at 01:23:13PM +0700, Ivan Safonov wrote: Unnecessary channel groups for 5 GHz removed from Hal_GetChnlGroup88E

[PATCH 3/3] staging: rtl8188eu: BITn macro replaced by BIT(n) in hal/rtl8188e_hal_init.c

2015-10-10 Thread Ivan Safonov
This patch replace BITn macro to BIT(n). Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 26 --- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu

[PATCH 2/3] staging: rtl8188eu: bugfix: correct channels range is set in Hal_ReadTxPowerInfo88E

2015-10-10 Thread Ivan Safonov
Correct channels range is 1..14 (numbering from 1) but not 0..13. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers

[PATCH 1/3] staging: rtl8188eu: 5 GHz channel groups removed from /hal/rtl8188e_hal_init.c

2015-10-10 Thread Ivan Safonov
Unnecessary channel groups for 5 GHz removed from Hal_GetChnlGroup88E and it transformed to pretty get_channel_group(const u8 channel). Also removed code for 5 GHz frequency in Hal_ReadPowerValueFromPROM_8188E. Signed-off-by: Ivan Safonov --- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c

[PATCH 0/3] staging: rtl8188eu: unnecessary 5 GHz code removed

2015-10-10 Thread Ivan Safonov
This patchset removes unnecessary code for 5 GHz channels (> 14), fixes channels range for FOR operator (channels are belong to 1..14 interval), and replace BITn macro to BIT(n). Ivan Safonov (3): staging: rtl8188eu: 5 GHz channel groups removed from /hal/rtl8188e_hal_init.c stag

[PATCH 0/3] staging: rtl8188eu: unnecessary 5 GHz code removed

2015-10-10 Thread Ivan Safonov
This patchset removes unnecessary code for 5 GHz channels (> 14), fixes channels range for FOR operator (channels are belong to 1..14 interval), and replace BITn macro to BIT(n). Ivan Safonov (3): staging: rtl8188eu: 5 GHz channel groups removed from /hal/rtl8188e_hal_init.c stag

[PATCH 3/3] staging: rtl8188eu: BITn macro replaced by BIT(n) in hal/rtl8188e_hal_init.c

2015-10-10 Thread Ivan Safonov
This patch replace BITn macro to BIT(n). Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 26 --- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_ini

[PATCH 2/3] staging: rtl8188eu: bugfix: correct channels range is set in Hal_ReadTxPowerInfo88E

2015-10-10 Thread Ivan Safonov
Correct channels range is 1..14 (numbering from 1) but not 0..13. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188

[PATCH 1/3] staging: rtl8188eu: 5 GHz channel groups removed from /hal/rtl8188e_hal_init.c

2015-10-10 Thread Ivan Safonov
Unnecessary channel groups for 5 GHz removed from Hal_GetChnlGroup88E and it transformed to pretty get_channel_group(const u8 channel). Also removed code for 5 GHz frequency in Hal_ReadPowerValueFromPROM_8188E. Signed-off-by: Ivan Safonov <insafo...@gmail.com> --- drivers/staging/rtl8188

<    3   4   5   6   7   8