[PATCH] staging: rtl8712: Annotate r8712_sitesurvey_cmd()

2020-07-05 Thread Mauro Dreissig
Add __must_hold() sparse annotation to r8712_sitesurvey_cmd(), replacing the comments on top of the function. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/rtl871x_cmd.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c

[PATCH v2 3/5] staging: rtl8712: Use ETH_ALEN instead of hardcoded value

2020-07-05 Thread Mauro Dreissig
Use macro ETH_ALEN which defines the number of octets in an ethernet address. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/hal_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c index

[PATCH v2 0/5] Code simplifications

2020-07-05 Thread Mauro Dreissig
This series applies some code enhancements to rtl8712 staging driver. Fixed the last commit as reported by kernel test robot . Mauro Dreissig (5): staging: rtl8712: Replace constant 49152 with expression 48 * 1024 staging: rtl8712: Simplify expressions with boolean logic staging: rtl8712

[PATCH v2 4/5] staging: rtl8712: Remove variable 'raw' from rtl871x_open_fw()

2020-07-05 Thread Mauro Dreissig
Remove useless variable 'raw' from function rtl871x_open_fw() making the code a bit easier to understand. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/hal_init.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8712/hal_init.c

[PATCH v2 5/5] staging: rtl8712: Use proper format in call to dev_err()

2020-07-05 Thread Mauro Dreissig
In the call to dev_err(), remove the cast of size_t to int and change the format string accordingly. As reported by the kernel test robot, the correct format string for a size_t argument should be %zu. Reported-by: kernel test robot Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712

[PATCH v2 1/5] staging: rtl8712: Replace constant 49152 with expression 48 * 1024

2020-07-05 Thread Mauro Dreissig
This way we don't need the comment stating that 49152 equals 48k. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/hal_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c index 7293cdc

[PATCH v2 2/5] staging: rtl8712: Simplify expressions with boolean logic

2020-07-05 Thread Mauro Dreissig
Simplify some expressions by using boolean operations. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/hal_init.c | 4 ++-- drivers/staging/rtl8712/osdep_intf.h | 2 +- drivers/staging/rtl8712/rtl8712_recv.c | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git

[PATCH 5/5] staging: rtl8712: Use proper format in call to dev_err()

2020-07-04 Thread Mauro Dreissig
Use %lu in the format string instead of casting the argument to an int. Also fix driver name in the format string. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/hal_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8712/hal_init.c b

[PATCH 0/5] staging: rtl8712: Code simplifications

2020-07-04 Thread Mauro Dreissig
This series applies some code enhancements to rtl8712 staging driver. Mauro Dreissig (5): staging: rtl8712: Replace constant 49152 with expression 48 * 1024 staging: rtl8712: Simplify expressions with boolean logic staging: rtl8712: Use ETH_ALEN instead of hardcoded value staging: rtl8712

[PATCH 1/5] staging: rtl8712: Replace constant 49152 with expression 48 * 1024

2020-07-04 Thread Mauro Dreissig
This way we don't need the comment stating that 49152 equals 48k. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/hal_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c index 7293cdc

[PATCH 4/5] staging: rtl8712: Remove variable 'raw' from rtl871x_open_fw()

2020-07-04 Thread Mauro Dreissig
Remove useless variable 'raw' from function rtl871x_open_fw() making the code a bit easier to understand. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/hal_init.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rtl8712/hal_init.c

[PATCH 2/5] staging: rtl8712: Simplify expressions with boolean logic

2020-07-04 Thread Mauro Dreissig
Simplify some expressions by using boolean operations. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/hal_init.c | 4 ++-- drivers/staging/rtl8712/osdep_intf.h | 2 +- drivers/staging/rtl8712/rtl8712_recv.c | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git

[PATCH 3/5] staging: rtl8712: Use ETH_ALEN instead of hardcoded value

2020-07-04 Thread Mauro Dreissig
Use macro ETH_ALEN which defines the number of octets in an ethernet address. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/hal_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8712/hal_init.c b/drivers/staging/rtl8712/hal_init.c index

[PATCH 0/2] staging: rtl8712: Minor cleanups

2020-07-01 Thread Mauro Dreissig
This series applies minor cleanups for rtl8712 staging driver. Mauro Dreissig (2): staging: rtl8712: Replace FIELD_OFFSET() with offsetof() staging: rtl8712: base_types: Remove unused macros drivers/staging/rtl8712/basic_types.h | 8 drivers/staging/rtl8712/hal_init.c

[PATCH 1/2] staging: rtl8712: Replace FIELD_OFFSET() with offsetof()

2020-07-01 Thread Mauro Dreissig
Use the existing offsetof() macro instead of duplicating code. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/basic_types.h | 1 - drivers/staging/rtl8712/hal_init.c| 4 ++-- drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 4 ++-- 3 files changed, 4 insertions

[PATCH 2/2] staging: rtl8712: base_types: Remove unused macros

2020-07-01 Thread Mauro Dreissig
Those #define's are not used anywhere, get rid of them. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/basic_types.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/rtl8712/basic_types.h b/drivers/staging/rtl8712/basic_types.h index b8ecd92

[PATCH v2 0/4] Cleanups for rtl871x_ioctl_rtl

2015-11-25 Thread Mauro Dreissig
This applies some janitorial work to rtl8712 driver. Mauro Dreissig (4): staging: rtl8712: Remove casts between void * and type * staging: rtl8712: Rename local variable staging: rtl8712: Make error handling check for failure staging: rtl8712: Rename local variable drivers/staging

[PATCH v2 2/4] staging: rtl8712: Rename local variable

2015-11-25 Thread Mauro Dreissig
Renames all instances of struct _adapter to adapter in rtl871x_ioctl_rtl.c, avoiding camel case. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 86 ++--- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/drivers/staging

[PATCH v2 4/4] staging: rtl8712: Rename local variable

2015-11-25 Thread Mauro Dreissig
Renames all instances of struct oid_par_priv to oid in rtl871x_ioctl_rtl.c and rtl871x_ioctl_rtl.h, making the code cleaner. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 292 +--- drivers/staging/rtl8712/rtl871x_ioctl_rtl.h | 123

[PATCH v2 1/4] staging: rtl8712: Remove casts between void * and type *

2015-11-25 Thread Mauro Dreissig
This removes unnecessary explicit pointer casts in rtl871x_ioctl_rtl.c. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 45 ++--- 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_rtl.c

[PATCH v2 3/4] staging: rtl8712: Make error handling check for failure

2015-11-25 Thread Mauro Dreissig
Make all error handling paths check for failure instead of success in rtl871x_ioctl_rtl.c, reducing indentation and avoiding else statements. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 239 +++- 1 file changed, 124 insertions(+), 115

Re: [PATCH 3/4] staging: rtl8712: Make error handling check for failure

2015-11-25 Thread Mauro Dreissig
On 25-11-2015 12:56, Mauro Dreissig wrote: > On 25-11-2015 09:44, Sudip Mukherjee wrote: >> On Tue, Nov 24, 2015 at 10:19:41AM -0200, Mauro Dreissig wrote: >>> Some error handling paths are checking for success >>> instead of error on rtl871x_ioctl_rtl.c. >>&g

Re: [PATCH 3/4] staging: rtl8712: Make error handling check for failure

2015-11-25 Thread Mauro Dreissig
On 25-11-2015 09:44, Sudip Mukherjee wrote: > On Tue, Nov 24, 2015 at 10:19:41AM -0200, Mauro Dreissig wrote: >> Some error handling paths are checking for success >> instead of error on rtl871x_ioctl_rtl.c. >> >> Signed-off-by: Mauro Dreissig >>

Re: [PATCH 1/4] staging: rtl8712: Remove casts between void * and type *

2015-11-24 Thread Mauro Dreissig
On 24-11-2015 11:07, Dan Carpenter wrote: > On Tue, Nov 24, 2015 at 10:19:39AM -0200, Mauro Dreissig wrote: >> Cleaning rtl871x_ioctl_rtl.c. >> > > It's better if you think about the header and the body as two different > things. Just repeat the title but with m

[PATCH 4/4] staging: rtl8712: Rename local variable

2015-11-24 Thread Mauro Dreissig
Make all instances of struct oid_par_priv be called oid in rtl871x_ioctl_rtl.c and rtl871x_ioctl_rtl.h. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 287 +--- drivers/staging/rtl8712/rtl871x_ioctl_rtl.h | 123 2 files

[PATCH 2/4] staging: rtl8712: Rename local variable

2015-11-24 Thread Mauro Dreissig
Make all instances of struct _adapter be called adapter in rtl871x_ioctl_rtl.c. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 86 ++--- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/drivers/staging/rtl8712

[PATCH 3/4] staging: rtl8712: Make error handling check for failure

2015-11-24 Thread Mauro Dreissig
Some error handling paths are checking for success instead of error on rtl871x_ioctl_rtl.c. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 239 ++-- 1 file changed, 121 insertions(+), 118 deletions(-) diff --git a/drivers/staging/rtl8712

[PATCH 1/4] staging: rtl8712: Remove casts between void * and type *

2015-11-24 Thread Mauro Dreissig
Cleaning rtl871x_ioctl_rtl.c. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/rtl871x_ioctl_rtl.c | 45 ++--- 1 file changed, 15 insertions(+), 30 deletions(-) diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_rtl.c b/drivers/staging/rtl8712

[PATCH 0/4] staging: rtl8712: Cleanups for rtl871x_ioctl_rtl

2015-11-24 Thread Mauro Dreissig
This applies some janitorial work. Mauro Dreissig (4): staging: rtl8712: Remove casts between void * and type * staging: rtl8712: Rename local variable staging: rtl8712: Make error handling check for failure staging: rtl8712: Rename local variable drivers/staging/rtl8712

[PATCH] staging: rtl8712: Cleanup _io_ops wrappers

2015-11-22 Thread Mauro Dreissig
This removes ugly and unnecessary declarations. Signed-off-by: Mauro Dreissig --- drivers/staging/rtl8712/rtl8712_io.c | 77 +++- 1 file changed, 22 insertions(+), 55 deletions(-) diff --git a/drivers/staging/rtl8712/rtl8712_io.c b/drivers/staging/rtl8712

[PATCH 1/2] staging: as102: Declare local variables as static

2013-11-26 Thread Mauro Dreissig
ymbol 'as102_priv_ops' was not declared. Should it be static? Also use the const qualifier on the firmware name strings. Signed-off-by: Mauro Dreissig Acked-by: Greg Kroah-Hartman --- drivers/staging/media/as102/as102_fw.c | 10 +- drivers/staging/media/as102/as102_usb_

[PATCH 2/2] staging: as102: Remove ENTER/LEAVE debugging macros

2013-11-26 Thread Mauro Dreissig
Too much noise, also does not cover every possible code paths. Signed-off-by: Mauro Dreissig Acked-by: Greg Kroah-Hartman --- drivers/staging/media/as102/as102_drv.c| 10 -- drivers/staging/media/as102/as102_drv.h| 8 drivers/staging/media/as102/as102_fe.c

[PATCH 0/2] staging: as102: Cleanups for the as102 driver

2013-11-26 Thread Mauro Dreissig
The first patch cleans sparse warnings and the second one removes useless code. Mauro Dreissig (2): staging: as102: Declare local variables as static staging: as102: Remove ENTER/LEAVE debugging macros drivers/staging/media/as102/as102_drv.c| 10 -- drivers/staging/media

Re: [PATCH 0/2] staging: as102: Cleanups for the as102 driver

2013-11-26 Thread Mauro Dreissig
On 11/25/2013 10:06 PM, Greg Kroah-Hartman wrote: > On Mon, Nov 25, 2013 at 05:10:51PM -0500, Mauro Dreissig wrote: >> The first patch cleans sparse warnings and the second one removes >> useless code. >> >> Mauro Dreissig (2): >> staging: as102: Declare local

[PATCH 0/2] staging: as102: Cleanups for the as102 driver

2013-11-25 Thread Mauro Dreissig
The first patch cleans sparse warnings and the second one removes useless code. Mauro Dreissig (2): staging: as102: Declare local variables as static staging: as102: Remove ENTER/LEAVE debugging macros drivers/staging/media/as102/as102_drv.c| 10 -- drivers/staging/media

[PATCH 2/2] staging: as102: Remove ENTER/LEAVE debugging macros

2013-11-25 Thread Mauro Dreissig
Too much noise, also does not cover every possible code paths. Signed-off-by: Mauro Dreissig --- drivers/staging/media/as102/as102_drv.c| 10 -- drivers/staging/media/as102/as102_drv.h| 8 drivers/staging/media/as102/as102_fe.c | 26

[PATCH 1/2] staging: as102: Declare local variables as static

2013-11-25 Thread Mauro Dreissig
ymbol 'as102_priv_ops' was not declared. Should it be static? Also use the const qualifier on the firmware name strings. Signed-off-by: Mauro Dreissig --- drivers/staging/media/as102/as102_fw.c | 10 +- drivers/staging/media/as102/as102_usb_drv.c | 2 +- 2 files changed, 6 i