Re: [PATCH] staging: vt6656: remove duplicated blank line

2019-10-07 Thread Quentin Deslandes
t_private *priv) > goto end; > } > > - > ret = vnt_mac_set_led(priv, LEDSTS_TMLEN, 0x38); > if (ret) > goto end; > -- > 2.20.1 > Reviewed-by: Quentin Deslandes Thank you, Quentin

Re: [PATCH] staging: vt6656: clean up an indentation issue

2019-09-27 Thread Quentin Deslandes
t; - else > - priv->rx_antenna_mode = ANT_B; > + if (priv->tx_rx_ant_inv) > + priv->rx_antenna_mode = ANT_A; > + else > + priv->rx_antenna_mode = ANT_B; > } > } > > -- > 2.20.1 > Reviewed-by: Quentin Deslandes Thanks! Quentin

Re: [PATCH] staging: vt6656: Use common error handling code in vnt_alloc_bufs()

2019-08-23 Thread Quentin Deslandes
On Fri, Aug 23, 2019 at 03:30:11PM +0200, Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 23 Aug 2019 15:15:41 +0200 > > Adjust jump targets so that a bit of exception handling can be better > reused at the end of this function. > > This issue was detected by using the Coccinelle

Re: [PATCH] staging: vt6656: Delete an unnecessary check before the macro call “dev_kfree_skb”

2019-08-21 Thread Quentin Deslandes
if (rcb->skb) > - dev_kfree_skb(rcb->skb); > + dev_kfree_skb(rcb->skb); > > kfree(rcb); > } > -- > 2.23.0 > Reviewed-by: Quentin Deslandes Regards, Quentin

Re: [PATCH] staging: vt6656: fix indentation on break statement

2019-06-20 Thread Quentin Deslandes
bb_type, > *tx_rate = 0x8b; > *rsv_time = 30; > } > - break; > + break; > case RATE_9M: > if (bb_type == BB_TYPE_11A) { > *tx_rate = 0x9f; > -- > 2.20.1 > Reviewed-by: Quentin Deslandes Regards, Quentin

[PATCH 2/7] staging: vt6656: clean function's error path in usbpipe.c

2019-05-20 Thread Quentin Deslandes
Avoid discarding called function's returned value. Store it instead in order to act accordingly. Update error path to return 0 on success and a negative errno value on error. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/usbpipe.c | 115 +-- drivers

[PATCH 0/7] staging: vt6656: clean-up error path on init

2019-05-20 Thread Quentin Deslandes
a potential NULL pointer dereferencing. All the other patches update function's error management workflow and prototype when needed. More functions would need to be updated, but focusing on initialization process force to change only a reasonable amount of code. Thank you, Quentin Quentin Deslandes

[PATCH 4/7] staging: vt6656: clean error path for firmware management

2019-05-20 Thread Quentin Deslandes
Avoid discarding return value of functions called during firmware management process. Handle such return value and return 0 on success or a negative errno value on error. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/firmware.c | 91 ++- 1 file changed

[PATCH 6/7] staging: vt6656: clean-up registers initialization error path

2019-05-20 Thread Quentin Deslandes
Avoid discarding function's return code during register initialization. Handle it instead and return 0 on success or a negative errno value on error. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/main_usb.c | 163 ++ 1 file changed, 96 insertions(+), 67

[PATCH 5/7] staging: vt6656: use meaningful error code during buffer allocation

2019-05-20 Thread Quentin Deslandes
Check on called function's returned value for error and return 0 on success or a negative errno value on error instead of a boolean value. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/main_usb.c | 42 --- 1 file changed, 28 insertions(+), 14 deletions

[PATCH 7/7] staging: vt6656: manage error path during device initialization

2019-05-20 Thread Quentin Deslandes
Check for error during device initialization callback and return a meaningful error code or zero on success. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/main_usb.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/staging/vt6656

[PATCH 3/7] staging: vt6656: avoid discarding called function's return code

2019-05-20 Thread Quentin Deslandes
Change some of the driver's functions in order to handle error codes instead of discarding them. These function now returns 0 on success and a negative errno value on error. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/baseband.c | 130 -- drivers

[PATCH 1/7] staging: vt6656: fix potential NULL pointer dereference

2019-05-20 Thread Quentin Deslandes
vnt_free_tx_bufs() relies on priv->tx_context elements to be NULL if they are not initialized (as vnt_free_rx_bufs() does). Add a check to these elements in order to avoid NULL pointer dereference. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/main_usb.c | 3 +++ 1 file changed

Re: [PATCH v3] staging: vt6656: returns error code on vnt_int_start_interrupt fail

2019-05-17 Thread Quentin Deslandes
On Fri, May 17, 2019 at 11:17:23AM +0200, Greg Kroah-Hartman wrote: > On Fri, May 17, 2019 at 07:53:49AM +0000, Quentin Deslandes wrote: > > Returns error code from 'vnt_int_start_interrupt()' so the device's private > > buffers will be correctly freed and 'struct ieee80211_hw'

[PATCH v3] staging: vt6656: returns error code on vnt_int_start_interrupt fail

2019-05-17 Thread Quentin Deslandes
Returns error code from 'vnt_int_start_interrupt()' so the device's private buffers will be correctly freed and 'struct ieee80211_hw' start function will return an error code. Signed-off-by: Quentin Deslandes --- v2: returns 'status' value to caller instead of removing it. v3: add patch version

[PATCH v2] staging: vt6656: returns error code on vnt_int_start_interrupt fail

2019-05-16 Thread Quentin Deslandes
Returns error code from 'vnt_int_start_interrupt()' so the device's private buffers will be correctly freed and 'struct ieee80211_hw' start function will return an error code. Signed-off-by: Quentin Deslandes --- drivers/staging/vt6656/int.c | 4 +++- drivers/staging/vt6656/int.h

[PATCH] staging: vt6656: returns error code on vnt_int_start_interrupt fail

2019-05-16 Thread Quentin Deslandes
Returns error code from 'vnt_int_start_interrupt()' so the device's private buffers will be correctly freed and 'struct ieee80211_hw' start function will return an error code. Signed-off-by: Quentin Deslandes --- v2: instead of removing status variable, returns its value to caller and handle

Re: [PATCH] staging: vt6656: remove unused variable

2019-05-16 Thread Quentin Deslandes
On Thu, May 16, 2019 at 12:19:53PM +0200, Greg Kroah-Hartman wrote: > On Thu, May 16, 2019 at 09:50:38AM +0000, Quentin Deslandes wrote: > > On Thu, May 16, 2019 at 11:39:51AM +0200, Greg Kroah-Hartman wrote: > > > On Thu, May 16, 2019 at 09:31:05AM +, Quentin Deslandes wr

Re: [PATCH] staging: vt6656: remove unused variable

2019-05-16 Thread Quentin Deslandes
On Thu, May 16, 2019 at 11:39:51AM +0200, Greg Kroah-Hartman wrote: > On Thu, May 16, 2019 at 09:31:05AM +0000, Quentin Deslandes wrote: > > Fixed 'set but not used' warning message on a status variable. The > > called function returning the status code 'vnt_start_interrupt_urb(

[PATCH] staging: vt6656: remove unused variable

2019-05-16 Thread Quentin Deslandes
Fixed 'set but not used' warning message on a status variable. The called function returning the status code 'vnt_start_interrupt_urb()' clean up after itself and the caller function 'vnt_int_start_interrupt()' does not returns any value. Signed-off-by: Quentin Deslandes --- drivers/staging

[PATCH] scsi: aic7xxx: Remove NULL check before kfree()

2019-05-14 Thread Quentin Deslandes
Fix the following coccinelle warning by removing NULL check before calling kfree(): NULL check before some freeing functions in not needed. Signed-off-by: Quentin Deslandes --- drivers/scsi/aic7xxx/aic7xxx_core.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff

Re: [PATCH] staging: e1000: e1000_main.c: remove extern declarations in .c file.

2019-03-10 Thread Quentin Deslandes
On Sun, Mar 10, 2019 at 11:03:09AM -0700, David Miller wrote: > > "staging"? "staging" was an error, someone explained me after I sent the patch, sorry for the inconvenience.

[PATCH] staging: e1000: e1000_main.c: remove extern declarations in .c file.

2019-03-10 Thread Quentin Deslandes
This patch fixes the checkpatch.pl warning: WARNING: externs should be avoided in .c files Some of the driver's function declared in e1000.h were declared a second time in e1000_main.c, triggering checkpatch.pl warnings. Signed-off-by: Quentin Deslandes --- drivers/net/ethernet/intel/e1000