Re: [PATCH 3/6] staging: rtl8723bs: fix indentation

2018-07-11 Thread Michael Straube
On 07/11/18 18:03, Joe Perches wrote: On Wed, 2018-07-11 at 15:57 +0200, Michael Straube wrote: On 07/08/18 19:36, Michael Straube wrote: On 07/08/18 18:46, Joe Perches wrote: On Sun, 2018-07-08 at 12:38 +0200, Michael Straube wrote: uint rtw_is_cckratesonly_included(u8 *rate) { while

[PATCH 3/5] staging: rtl8723bs: refactor rtw_is_cckratesonly_included

2018-07-12 Thread Michael Straube
Refactor rtw_is_cckratesonly_included() to improve readability and slightly reduce object file size. Suggested-by: Joe Perches Signed-off-by: Michael Straube --- drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH 2/5] staging: rtl8723bs: refactor rtw_is_cckrates_included()

2018-07-12 Thread Michael Straube
Refactor rtw_is_cckrates_included() to improve readability and slightly reduce object file size. Suggested-by: Joe Perches Signed-off-by: Michael Straube --- drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH 5/5] staging: rtl8723bs: fix comparsions to true

2018-07-12 Thread Michael Straube
Use if(x) instead of if(x == true). Signed-off-by: Michael Straube --- .../staging/rtl8723bs/core/rtw_ieee80211.c| 6 ++-- .../staging/rtl8723bs/os_dep/ioctl_linux.c| 28 +-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/staging/rtl8723bs/core

[PATCH 4/5] staging: rtl8723bs: change return type to bool

2018-07-12 Thread Michael Straube
Both rtw_is_cckrates_included() and rtw_is_cckratesonly_included() return true or false. Change the return type from uint to bool. Signed-off-by: Michael Straube --- drivers/staging/rtl8723bs/core/rtw_ieee80211.c | 4 ++-- drivers/staging/rtl8723bs/include/ieee80211.h | 4 ++-- 2 files changed

[PATCH 1/5] staging: rtl8723bs: remove unused code

2018-07-12 Thread Michael Straube
Remove commented rtw_is_cckrates_included() and rtw_is_cckratesonly_included() from os_dep/ioctl_linux.c. Both are defined in core/rtw_ieee80211.c. Signed-off-by: Michael Straube --- .../staging/rtl8723bs/os_dep/ioctl_linux.c| 32 --- 1 file changed, 32 deletions(-) diff

[PATCH] staging: rtl8188eu: use strlcpy instead of strncpy

2018-07-12 Thread Michael Straube
Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 80ccd19e776d..0f82a8c330f8 100644 --- a/drive

[PATCH] staging: rtl8188eu: remove is_{multicast,broadcast}_mac_addr

2018-07-13 Thread Michael Straube
. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_recv.c | 3 +-- drivers/staging/rtl8188eu/include/ieee80211.h | 11 --- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core

[PATCH 4/6] staging: rtl8188eu: rename variable

2018-07-14 Thread Michael Straube
Rename variable to avoid CamelCase. tmpV16 -> tmpv16 Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 26 +++--- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl818

[PATCH 6/6] staging: rtl8188eu: remove redundant header file

2018-07-14 Thread Michael Straube
Both functions declared in rtl8188e_led.h are also declared in rtw_led.h which is included from drv_types.h. Remove rtl8188e_led.h and it's includes. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/rtl8188eu_led.c | 1 - drivers/staging/rtl8188eu/hal/usb_halinit.c

[PATCH 5/6] staging: rtl8188eu: add spaces around '+'

2018-07-14 Thread Michael Straube
Add spaces around '+' to follow kernel coding style. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/r

[PATCH 2/6] staging: rtl8188eu: rename Efuse_PowerSwitch

2018-07-14 Thread Michael Straube
Rename function to avoid CamelCase. Efuse_PowerSwitch -> efuse_power_switch Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c| 8 drivers/staging/rtl8188eu/include/rtw_efuse.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/driv

[PATCH 1/6] staging: rtl8188eu: do not line break function definition

2018-07-14 Thread Michael Straube
Do not line break function definition of Efuse_PowerSwitch(). Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core

[PATCH 3/6] staging: rtl8188eu: rename function parameters

2018-07-14 Thread Michael Straube
Rename function parameters to avoid CamelCase. bWrite -> write PwrState -> pwrstate Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c| 8 drivers/staging/rtl8188eu/include/rtw_efuse.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff -

[PATCH 1/4] staging: rtl8188eu: simplify function comments - style

2018-09-26 Thread Michael Straube
Simplify function comments. Clears a 'line over 80 characters' checkpatch warning. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 20 +--- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/r

[PATCH 4/4] staging: rtl8188eu: use break to exit while loop

2018-09-26 Thread Michael Straube
The variable bContinual is only used to break out of the while loop. Remove the variable and use break instead. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core

[PATCH 3/4] staging: rtl8188eu: rename variable - style

2018-09-26 Thread Michael Straube
Rename the return value variable in some functions in rtw_efuse.c to avoid CamelCase. bRet -> ret Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/staging/rtl818

[PATCH 2/4] staging: rtl8188eu: do not line break function definition - style

2018-09-26 Thread Michael Straube
Do not line break function definition. Clears a checkpatch issue. CHECK: Lines should not end with a '(' Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/rtl8

[PATCH] staging: rtl8188eu: remove get_right_chnl_for_iqk()

2018-09-27 Thread Michael Straube
exist. Remove get_right_chnl_for_iqk() and the variable chn_index that is used to save the return value. Replace the uses of chn_index with zero. Remove the now unused define ODM_TARGET_CHNL_NUM_2G_5G. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/phy.c

[PATCH 2/9] staging: rtl8188eu: remove unnecessary parentheses in rtw_mlme.c

2018-11-23 Thread Michael Straube
Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 120 -- 1 file changed, 63 insertions(+), 57 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging

[PATCH 7/9] staging: rtl8188eu: remove return from void function

2018-11-23 Thread Michael Straube
Remove return from a void function to clear a checkpatch warning. WARNING: void function return statements are not generally useful Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core

[PATCH 5/9] staging: rtl8188eu: cleanup declarations in rtw_mlme.c

2018-11-23 Thread Michael Straube
Replace tabs with spaces, remove spaces, remove blank lines and break lines appropriatly in declarations. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 130 +++--- 1 file changed, 64 insertions(+), 66 deletions(-) diff --git a/drivers/staging

[PATCH 6/9] staging: rtl8188eu: refactor if else statement

2018-11-23 Thread Michael Straube
Refactor if else statement to clear checkpatch warnings. WARNING: else is not generally useful after a break or return WARNING: line over 80 characters Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions

[PATCH 8/9] staging: rtl8188eu: correct indentation

2018-11-23 Thread Michael Straube
Correct indentation to clear a checkpatch warning. WARNING: suspect code indent for conditional statements (8, 24) Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/core

[PATCH 9/9] staging: rtl8188eu: cleanup lines over 80 characters

2018-11-23 Thread Michael Straube
Cleanup lines over 80 characters by replacing tabs with spaces or adding appropriate line breaks. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/core

[PATCH 4/9] staging: rtl8188eu: remove rtw_android_set_block()

2018-11-23 Thread Michael Straube
The function rtw_android_set_block() just returns zero. The only user is the function rtw_android_priv_cmd(). The variable bytes_written is initialized to zero and not changed before the use of rtw_android_set_block(). Remove rtw_android_set_block() and it's only use. Signed-off-by: Mi

[PATCH 1/9] staging: rtl8188eu: cleanup remaining comparsions to true

2018-11-23 Thread Michael Straube
Cleanup remaining comparsions to true. if (x == true) -> if (x) if (x != true) -> if (!x) if (!x == true) -> if (!x) Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_ap.c | 4 +-- drivers/staging/rtl8188eu/core/rtw_cmd.c | 10 +++--- drivers/staging/

[PATCH 3/9] staging: rtl8188eu: use __func__ in rtw_mlme.c

2018-11-23 Thread Michael Straube
Use __func__ instead of hardcoded function names. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_mlme.c | 48 +-- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b

[PATCH] staging: pi433: fix potential null dereference

2018-11-25 Thread Michael Straube
Add a test for successful call to cdev_alloc() to avoid potential null dereference. Issue reported by smatch. Signed-off-by: Michael Straube --- drivers/staging/pi433/pi433_if.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433

[PATCH] staging: pi433: add missing call to cdev_del()

2018-11-26 Thread Michael Straube
If cdev_add() fails, cdev_del() should be called. Add the missing cdev_del() call as pointed out by Dan Carpenter. Signed-off-by: Michael Straube --- drivers/staging/pi433/pi433_if.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433

Re: [PATCH] staging: pi433: add missing call to cdev_del()

2018-11-26 Thread Michael Straube
On 11/26/18 7:01 PM, Dan Carpenter wrote: On Mon, Nov 26, 2018 at 06:53:55PM +0100, Michael Straube wrote: retval = cdev_add(device->cdev, device->devt, 1); if (retval) { dev_dbg(device->dev, "register of cdev failed"); + cd

[PATCH v2] staging: pi433: add missing call to cdev_del()

2018-11-26 Thread Michael Straube
If cdev_add() fails, cdev_del() should be called. Add the missing cdev_del() call as pointed out by Dan Carpenter. Signed-off-by: Michael Straube --- v1 -> v2 Use goto and label. drivers/staging/pi433/pi433_if.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/driv

[PATCH 07/10] staging: rtl8188eu: rename BlinkHandler to avoid CamelCase

2018-11-21 Thread Michael Straube
Rename the function BlinkHandler to avoid CamelCase. BlinkHandler -> blink_handler Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_led.c| 4 ++-- drivers/staging/rtl8188eu/include/rtw_led.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/driv

[PATCH 05/10] staging: rtl8188eu: rename SwLedOn to avoid CamelCase

2018-11-21 Thread Michael Straube
Rename the function SwLedOn to avoid CamelCase. SwLedOn -> sw_led_on Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_led.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188eu_led.c | 2 +- drivers/staging/rtl8188eu/include/rtw_led.h | 2 +- 3 files changed, 3 inserti

[PATCH 03/10] staging: rtl8188eu: add spaces around '&' in rtl8188eu_led.c

2018-11-21 Thread Michael Straube
Add spaces around '&' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/rtl8188eu_led.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_led.c b/d

[PATCH 01/10] staging: rtl8188eu: remove unnecessary parentheses in rtl8188eu_led.c

2018-11-21 Thread Michael Straube
Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/rtl8188eu_led.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_led.c b/drivers/staging/rtl8188eu/hal

[PATCH 10/10] staging: rtl8188eu: rename SwLed0 to avoid CamelCase

2018-11-21 Thread Michael Straube
Rename struct field SwLed0 to avoid CamelCase. SwLed0 -> sw_led Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_led.c | 2 +- drivers/staging/rtl8188eu/hal/rtl8188eu_led.c | 4 ++-- drivers/staging/rtl8188eu/include/rtw_led.h | 4 +--- 3 files changed, 4 inserti

[PATCH 09/10] staging: rtl8188eu: rename LedControl8188eu to avoid CamelCase

2018-11-21 Thread Michael Straube
Rename the function LedControl8188eu to avoid CamelCase. LedControl8188eu -> led_control_8188eu Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 6 +++--- drivers/staging/rtl8188eu/core/rtw_led.c | 2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c

[PATCH 08/10] staging: rtl8188eu: cleanup a function comment

2018-11-21 Thread Michael Straube
The comment for blink_handler() adds no extra information in addition to the function name, so remove it. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_led.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_led.c b/drivers

[PATCH 04/10] staging: rtl8188eu: rename LedCfg to avoid CamelCase

2018-11-21 Thread Michael Straube
Rename the variable LedCfg to avoid CamleCase. LedCfg -> led_cfg Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/rtl8188eu_led.c | 20 +-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_led.c b/driv

[PATCH 06/10] staging: rtl8188eu: rename SwLedOff to avoid CamelCase

2018-11-21 Thread Michael Straube
Rename the function SwLedOff to avoid CamelCase. SwLedOff -> sw_led_off Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_led.c | 6 +++--- drivers/staging/rtl8188eu/hal/rtl8188eu_led.c | 2 +- drivers/staging/rtl8188eu/include/rtw_led.h | 2 +- 3 files changed

[PATCH 02/10] staging: rtl8188eu: cleanup comments in rtl8188eu_led.c

2018-11-21 Thread Michael Straube
Remove comments in rtl8188eu_led.c. The function names are well descriptive. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/rtl8188eu_led.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_led.c b

[PATCH 7/8] staging: rtl8188eu: cleanup declarations in usb_ops_linux.c

2018-11-22 Thread Michael Straube
Replace tabs with spaces and/or remove spaces in declarations to cleanup whitespace. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/os_dep/usb_ops_linux.c | 40 +-- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep

[PATCH 4/8] staging: rtl8188eu: correct spelling mistake in a comment

2018-11-22 Thread Michael Straube
Correct spelling mistake in a comment reported by checkpatch. checksumed -> checksummed Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c

[PATCH 5/8] staging: rtl8188eu: remove unnecessary parentheses

2018-11-22 Thread Michael Straube
Remove unnecessary parentheses in usb_ops_linux.c. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers

[PATCH 1/8] staging: rtl8188eu: use __func__ in usb_ops_linux.c

2018-11-22 Thread Michael Straube
Use __func__ instead of hardcoded function names. Reported by checkpatch. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/os_dep/usb_ops_linux.c | 84 --- 1 file changed, 53 insertions(+), 31 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c

linux-kernel@vger.kernel.org

2018-11-22 Thread Michael Straube
Add spaces around '>>' and '&' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dr

[PATCH 8/8] staging: rtl8188eu: remove variable from rtl8188eu_xmit_tasklet()

2018-11-22 Thread Michael Straube
The local variable ret is only used to test the return value of the call to rtl8188eu_xmitframe_complete(). Use the function directly in the if test and remove the variable ret. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 5 + 1 file changed, 1

[PATCH 2/8] staging: rtl8188eu: cleanup line ending with a '('

2018-11-22 Thread Michael Straube
Cleanup line ending with a '(' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl818

[PATCH 3/8] staging: rtl8188eu: remove braces from single if else statement

2018-11-22 Thread Michael Straube
Remove braces from single line if else statement. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers

[PATCH 6/6] staging: rtl8188eu: cleanup comment in hal8188e_rate_adaptive.c

2018-11-28 Thread Michael Straube
Cleanup comment in hal8188e_rate_adaptive.c. Clears checkpatch warnings. WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Michael Straube --- .../rtl8188eu/hal/hal8188e_rate_adaptive.c | 17 +++-- 1

[PATCH 3/6] staging: rtl8188eu: add spaces around operators in hal8188e_rate_adaptive.c

2018-11-28 Thread Michael Straube
Add spaces around operators to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube --- .../rtl8188eu/hal/hal8188e_rate_adaptive.c| 54 ++- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal

[PATCH 5/6] staging: rtl8188eu: cleanup alignment issues in hal8188e_rate_adaptive.c

2018-11-28 Thread Michael Straube
Cleanup alignment issues reported by checkpatch. CHECK: Alignment should match open parenthesis Signed-off-by: Michael Straube --- .../rtl8188eu/hal/hal8188e_rate_adaptive.c| 37 +-- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/drivers/staging/rtl8188eu

[PATCH 4/6] staging: rtl8188eu: cleanup lines ending with '('

2018-11-28 Thread Michael Straube
Cleanup lines ending with '(' in hal8188e_rate_adaptive.c. Reported by checkpatch. Signed-off-by: Michael Straube --- .../rtl8188eu/hal/hal8188e_rate_adaptive.c| 20 ++- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl

[PATCH 1/6] staging: rtl8188eu: use __func__ in hal8188e_rate_adaptive.c

2018-11-28 Thread Michael Straube
Use __func__ instead of hardcoded function names. Reported by checkpatch. Signed-off-by: Michael Straube --- .../rtl8188eu/hal/hal8188e_rate_adaptive.c| 36 ++- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal

[PATCH 2/6] staging: rtl8188eu: remove parentheses in hal8188e_rate_adaptive.c

2018-11-28 Thread Michael Straube
Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/hal8188e_rate_adaptive.c b/drivers/staging

[PATCH] staging: wilc1000: correct inconsistent indenting

2018-11-28 Thread Michael Straube
Correct inconsistent indenting reported by smatch. Signed-off-by: Michael Straube --- drivers/staging/wilc1000/wilc_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c index 35ff432587fe

Re: [PATCH] staging: wilc1000: correct inconsistent indenting

2018-11-29 Thread Michael Straube
On 11/29/18 7:24 AM, Joe Perches wrote: On Wed, 2018-11-28 at 19:17 +0100, Michael Straube wrote: Correct inconsistent indenting reported by smatch. [] diff --git a/drivers/staging/wilc1000/wilc_spi.c b/drivers/staging/wilc1000/wilc_spi.c [] @@ -963,7 +963,7 @@ static int wilc_spi_read_int

[PATCH v2] staging: wilc1000: correct inconsistent indenting

2018-11-29 Thread Michael Straube
Correct inconsistent indenting reported by smatch. Instead of simply remove indentation, refactor the loop to also improve readabilitiy. Suggested-by: Joe Perches Signed-off-by: Michael Straube --- v1 -> v2 Refactor loop instead of simply remove indentation as suggested by Joe Perc

[PATCH] staging: pi433: remove GPL boiler plate text

2018-11-13 Thread Michael Straube
The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. All source and header files have SPDX identifiers. Remove the GPL boiler plate text to reduce file size. Signed-off-by: Michael Straube --- drivers/staging/pi433/pi433_if.c | 10

[PATCH 02/12] staging: rtl8188eu: refactor cckratesonly_included()

2018-12-05 Thread Michael Straube
Refactor cckratesonly_included() to improve readability and slightly reduce object file size. Also change the return type to bool. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 10 +- drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 2 +- 2

[PATCH 09/12] staging: rtl8188eu: write out multiplying in wifirate2_ratetbl_inx()

2018-12-05 Thread Michael Straube
Write out multiplying in wifirate2_ratetbl_inx() to improve readabilitiy and clear checkpatch issues with missing spaces around '*' operator. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_wlan_util.c| 22 +-- 1 file changed, 11 insertions(+), 11

[PATCH 10/12] staging: rtl8188eu: correct indentation in update_wireless_mode()

2018-12-05 Thread Michael Straube
Correct indentation in update_wireless_mode() to clear a checkpatch warning. WARNING: Statements should start on a tabstop Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging

[PATCH 08/12] staging: rtl8188eu: add spaces around operators in rtw_wlan_util.c

2018-12-05 Thread Michael Straube
Add spaces around '+', '-', '&' and '>>' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_wlan_util.c| 21 +++ 1 file changed, 12 insertions(+), 9 de

[PATCH 12/12] staging: rtl8188eu: remove unused code in rtw_cmd.c

2018-12-05 Thread Michael Straube
Remove unused/commented code in rtw_cmd.c. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index e3e46f7ac834

[PATCH 03/12] staging: rtl8188eu: simplify array initializations

2018-12-05 Thread Michael Straube
Simplfy initialization of arrays with zero only values to improve readability and save a line. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/core

[PATCH 04/12] staging: rtl8188eu: remove unnecessary parentheses in rtw_wlan_util.c

2018-12-05 Thread Michael Straube
Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_wlan_util.c| 64 +-- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging

[PATCH 11/12] staging: rtl8188eu: rename struct field Wifi_Error_Status

2018-12-05 Thread Michael Straube
Rename struct field Wifi_Error_Status to avoid CamelCase. Wifi_Error_Status -> wifi_error_status Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_sreset.c | 4 ++-- drivers/staging/rtl8188eu/include/rtw_sreset.h | 2 +- drivers/staging/rtl8188eu/os_

[PATCH 07/12] staging: rtl8188eu: cleanup long lines in rtw_wlan_util.c

2018-12-05 Thread Michael Straube
Cleanup some lines over 80 characters by adding appropriate line breaks and removing commented code. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core

[PATCH 05/12] staging: rtl8188eu: cleanup declarations in rtw_wlan_util.c

2018-12-05 Thread Michael Straube
Replace tabs with spaces and/or remove spaces in declarations to cleanup whitespace. Remove unused/commented declarations. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_wlan_util.c| 175 +- 1 file changed, 86 insertions(+), 89 deletions(-) diff --git a

[PATCH 01/12] staging: rtl8188eu: refactor cckrates_included()

2018-12-05 Thread Michael Straube
Refactor cckrates_included() to improve readability and slightly reduce object file size. Also change the return type to bool. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 9 + drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 2 +- 2 files

[PATCH 06/12] staging: rtl8188eu: cleanup block comment in rtw_wlan_util.c

2018-12-05 Thread Michael Straube
Cleanup a block comment to clear a checkpatch warning. WARNING: Block comments use * on subsequent lines Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu

[PATCH v2 03/12] staging: rtl8188eu: simplify array initializations

2018-12-05 Thread Michael Straube
Simplfy initialization of arrays with zero only values to improve readability and save a line. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/core

[PATCH v2 11/12] staging: rtl8188eu: rename struct field Wifi_Error_Status

2018-12-05 Thread Michael Straube
Rename struct field Wifi_Error_Status to avoid CamelCase. Wifi_Error_Status -> wifi_error_status Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_sreset.c | 4 ++-- drivers/staging/rtl8188eu/include/rtw_sreset.h | 2 +- drivers/staging/rtl8188eu/os_

[PATCH v2 12/12] staging: rtl8188eu: remove unused code in rtw_cmd.c

2018-12-05 Thread Michael Straube
Remove unused/commented code in rtw_cmd.c. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 12 1 file changed, 12 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index e3e46f7ac834

[PATCH v2 02/12] staging: rtl8188eu: refactor cckratesonly_included()

2018-12-05 Thread Michael Straube
Refactor cckratesonly_included() to improve readability and slightly reduce object file size. Also change the return type to bool. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 10 +- drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 2 +- 2

[PATCH v2 07/12] staging: rtl8188eu: cleanup long lines in rtw_wlan_util.c

2018-12-05 Thread Michael Straube
Cleanup some lines over 80 characters by adding appropriate line breaks and removing commented code. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core

[PATCH v2 10/12] staging: rtl8188eu: replace if else with ternary operator

2018-12-05 Thread Michael Straube
Replace if else with a single call and ternary operator to slightly reduce object file size. Also clears a checkpatch warning: WARNING: Statements should start on a tabstop Suggested-by: Joe Perches Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 7

[PATCH v2 08/12] staging: rtl8188eu: add spaces around operators in rtw_wlan_util.c

2018-12-05 Thread Michael Straube
Add spaces around '+', '-', '&' and '>>' to follow kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_wlan_util.c| 21 +++ 1 file changed, 12 insertions(+), 9 de

[PATCH v2 05/12] staging: rtl8188eu: cleanup declarations in rtw_wlan_util.c

2018-12-05 Thread Michael Straube
Replace tabs with spaces and/or remove spaces in declarations to cleanup whitespace. Remove unused/commented declarations. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_wlan_util.c| 175 +- 1 file changed, 86 insertions(+), 89 deletions(-) diff --git a

[PATCH v2 09/12] staging: rtl8188eu: write out multiplying in wifirate2_ratetbl_inx()

2018-12-05 Thread Michael Straube
Write out multiplying in wifirate2_ratetbl_inx() to improve readabilitiy and clear checkpatch issues with missing spaces around '*' operator. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_wlan_util.c| 22 +-- 1 file changed, 11 insertions(+), 11

[PATCH v2 06/12] staging: rtl8188eu: cleanup block comment in rtw_wlan_util.c

2018-12-05 Thread Michael Straube
Cleanup a block comment to clear a checkpatch warning. WARNING: Block comments use * on subsequent lines Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu

[PATCH v2 04/12] staging: rtl8188eu: remove unnecessary parentheses in rtw_wlan_util.c

2018-12-05 Thread Michael Straube
Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/core/rtw_wlan_util.c| 64 +-- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging

[PATCH v2 01/12] staging: rtl8188eu: refactor cckrates_included()

2018-12-05 Thread Michael Straube
Refactor cckrates_included() to improve readability and slightly reduce object file size. Also change the return type to bool. Signed-off-by: Michael Straube --- v1 -> v2 Changed patch 10/12 in the series. v1: staging: rtl8188eu: correct indentation in update_wireless_mode() v2: stag

Re: [PATCH 10/12] staging: rtl8188eu: correct indentation in update_wireless_mode()

2018-12-05 Thread Michael Straube
On 12/5/18 6:37 PM, Joe Perches wrote: On Wed, 2018-12-05 at 18:02 +0100, Michael Straube wrote: Correct indentation in update_wireless_mode() to clear a checkpatch warning. WARNING: Statements should start on a tabstop [] diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers

[PATCH 1/2] staging: rtl8188eu: simplify loop in rtl88eu_phy_iq_calibrate()

2018-12-07 Thread Michael Straube
Zeroing the array result[m][n] and setting only the values at even 'n's simplifies the code and slightly reduces object file size. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/phy.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git

[PATCH 2/2] staging: rtl8188eu: reuse Hal_GetChnlGroup88E()

2018-12-07 Thread Michael Straube
Use Hal_GetChnlGroup88E() instead of duplicating it's code in get_rx_power_val_by_reg(). Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/rf.c | 17 +++-- .../staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 +- .../staging/rtl8188eu/in

[PATCH 1/3] staging: rtl8188eu: use __func__ in recv_linux.c

2018-11-10 Thread Michael Straube
Use __func__ instead of hardcoded function name. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging

[PATCH 3/3] staging: rtl8188eu: remove unnecessary parentheses in recv_linux.c

2018-11-10 Thread Michael Straube
Remove unnecessary parentheses reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c b/drivers/staging/rtl8188eu/os_dep

[PATCH 2/3] staging: rtl8188eu: add spaces around '*' in recv_linux.c

2018-11-10 Thread Michael Straube
Add spaces around '*' to conform with kernel coding style. Reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/os_dep/recv_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/os_dep/recv_linux.c

[PATCH] staging: rtl8188eu: remove unnecessary parentheses

2018-06-29 Thread Michael Straube
Remove unnecessary parentheses as reported by checkpatch. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 22 ++-- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging

[PATCH] staging: rtl8723bs: fix line over 80 characters

2018-06-30 Thread Michael Straube
Fix line over 80 characters by replacing tab with space. Signed-off-by: Michael Straube --- drivers/staging/rtl8723bs/core/rtw_xmit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c index

[PATCH] staging: rtl8723bs: fix comparsion to true/false and brace issues

2018-06-30 Thread Michael Straube
Use if(x) and if(!x) instead of comparsion to true/false. Reported by checkpatch. Remove unrequired braces from single if else statements. Add missing space after else: else{ -> else { Signed-off-by: Michael Straube --- drivers/staging/rtl8723bs/core/rtw_btcoex.c | 13 ++--- driv

Re: [PATCH] staging: rtl8723bs: fix comparsion to true/false and brace issues

2018-06-30 Thread Michael Straube
On 06/30/18 12:08, Andreas Schwab wrote: On Jun 30 2018, Michael Straube wrote: @@ -115,11 +115,10 @@ s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter *padapter) void rtw_btcoex_SetManualControl(struct adapter *padapter, u8 manual) { - if (true == manual) { + if

[PATCH v2 1/2] staging: rtl8723bs: fix comparsion to true/false and brace issues

2018-06-30 Thread Michael Straube
Use if(x) and if(!x) instead of comparsion to true/false. Reported by checkpatch. Remove unrequired braces from single if else statement. Add missing space after else: else{ -> else { Signed-off-by: Michael Straube --- drivers/staging/rtl8723bs/core/rtw_btcoex.c | 8 drivers/stag

[PATCH v2 2/2] staging: rtl8723bs: simplify if else statement

2018-06-30 Thread Michael Straube
Simplify if else statement to a single function call by passing the variable. Suggested-by: Andreas Schwab Signed-off-by: Michael Straube --- drivers/staging/rtl8723bs/core/rtw_btcoex.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/staging/rtl8723bs/core

[PATCH] staging: rtl8188eu: remove rtw_ioctl_rtl.h

2018-06-30 Thread Michael Straube
The header rtw_ioctl_rtl.h is not used anywhere. Running 'grep -r rtw_ioctl_rtl *' from kernel root directory returns nothing, remove the file. Signed-off-by: Michael Straube --- .../staging/rtl8188eu/include/rtw_ioctl_rtl.h | 66 --- 1 file changed, 66 deletions(-) d

[PATCH 1/3] staging: rtl8188eu: reorder switch cases and remove default break

2018-06-30 Thread Michael Straube
Reorder the cases of a switch statement to be in ascending order. Remove unrequired break from default case. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/hal_com.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal

[PATCH 3/3] staging: rtl8188eu: fix block comments - coding style

2018-06-30 Thread Michael Straube
Write multiple single line comments as block comments to follow kernel coding style and improve readability. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/hal_com.c | 50 ++--- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/drivers/staging

[PATCH 2/3] staging: rtl8188eu: move return type to functions definition line

2018-06-30 Thread Michael Straube
The return type of a function should be on the same line as the definition. Signed-off-by: Michael Straube --- drivers/staging/rtl8188eu/hal/hal_com.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/hal_com.c b/drivers/staging/rtl8188eu

<    1   2   3   4   5   6   >