On 04/01/20 18:55:38, Oscar Carter wrote:
> On Tue, Mar 31, 2020 at 01:29:06PM +0300, Dan Carpenter wrote:
> > On Sat, Mar 28, 2020 at 10:54:33AM +0100, Oscar Carter wrote:
> > > Define the necessary bits in the CHANNEL, PAPEDELAY and GPIOCTL0
> > > registers to can use them in the calls to vnt_mac
on.
> >
> > Issue reported by coccinelle (coccicheck).
> >
> > Suggested-by: Quentin Deslandes
> > Suggested-by: Stefano Brivio
> > Reviewed-by: Quentin Deslandes
> ^ This should be dropped unless Quentin agrees to this version as well
>
> &
On 03/29/20 01:43:20, John B. Wyatt IV wrote:
> Add error code handling to unused 'ret' variable that was never used.
> Return an error code from functions called within vnt_radio_power_on.
>
> Issue reported by coccinelle (coccicheck).
>
> Suggested-by: Quent
On 03/30/20 16:49:04, Quentin Deslandes wrote:
> On 03/28/20 15:09:55, Oscar Carter wrote:
> > Use the PREAMBLE_SHORT and PREAMBLE_LONG defines present in the file
> > "baseband.h" to assign values to preamble_type variables. Also, use the
> > same defines t
ble_barker_preamble_mode(priv);
> - priv->preamble_type = true;
> + priv->preamble_type = PREAMBLE_SHORT;
> } else {
> vnt_mac_disable_barker_preamble_mode(priv);
> - priv->preamble_type = fal
> - ed_inx = 5;
> - cr_206 = 0x9c;
> - } else if (priv->bb_pre_ed_rssi <= 63) {
> - ed_inx = 4;
> - cr_206 = 0x80;
> - } else if (priv->bb_pre_ed_rssi <= 64) {
> -
ne EnCFG_BBType_MASK(BIT(0) | BIT(1))
> +#define EnCFG_BBType_MASK(EnCFG_BBType_b | EnCFG_BBType_g)
> #define EnCFG_ProtectMd BIT(5)
>
> /* Bits in the EnhanceCFG_1 register */
> --
> 2.20.1
>
Reviewed-by: Quentin Deslandes
Thanks,
Quentin
_
f->use_short_preamble) {
> vnt_mac_enable_barker_preamble_mode(priv);
> - priv->preamble_type = true;
> + priv->preamble_type = PREAMBLE_SHORT;
> } else {
> vnt_m
PK_TYPE_11A)
> @@ -214,11 +205,7 @@ void vnt_get_phy_field(struct vnt_private *priv, u32
> frame_length,
>
> break;
> case RATE_5M:
> - count = (bit_count * 10) / 55;
> - tmp = (count * 55) / 10;
> -
> - if (tmp != bit_
On 03/24/20 16:18:30, Dan Carpenter wrote:
> That's a bit over engineering something which is pretty trivial.
> Normally, we would just make the size a define instead of a magic number
> 14.
My bad, I meant "define", not "macro".
> If people change the size in the future (unlikely) and it causes
On 03/18/20 18:40:15, Oscar Carter wrote:
> Use ARRAY_SIZE to replace the hardcoded size so we will never have a
> mismatch.
>
> Signed-off-by: Oscar Carter
> ---
> Changelog v1 -> v2
> - Use ARRAY_SIZE(priv->cck_pwr_tbl) everywhere instead of introducing a new
> variable to hold its value.
>
On 03/23/20 23:45:44, John B. Wyatt IV wrote:
> vnt_mac_reg_bits_off(priv, MAC_REG_GPIOCTL1, GPIO3_INTMD);
This function, and all the functions called in vnt_radio_power_on() returns
a value, why don't you catch it and act accordingly (forward error code
for example) instead of silencing it?
On Sat, Mar 07, 2020 at 09:29:06AM +0100, Oscar Carter wrote:
> On Sun, Mar 01, 2020 at 04:09:13PM +0100, Greg Kroah-Hartman wrote:
> > On Sun, Mar 01, 2020 at 02:17:01PM +0100, Oscar Carter wrote:
> > This is a USB driver, performance is always limited to the hardware, not
> > the CPU location of
dr_list_for_each(ha, mc_list) {
> bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26;
> @@ -973,7 +973,7 @@ vt6656_probe(struct usb_interface *intf, const struct
> usb_device_id *id)
> struct vnt_private *priv;
> struct ieee80211_hw *hw;
> s
t; #define TX_DESC_DEF0 64
> -static int vnt_tx_buffers = TX_DESC_DEF0;
> +static int __read_mostly vnt_tx_buffers = TX_DESC_DEF0;
> module_param_named(tx_buffers, vnt_tx_buffers, int, 0644);
> MODULE_PARM_DESC(tx_buffers, "Number of receive usb tx buffers");
>
> --
>
e. As the device was using copy_from_user() and copy_to_user(), we
need to replace spinlocks with mutexes.
Signed-off-by: Quentin Deslandes
---
drivers/staging/axis-fifo/axis-fifo.c | 160 --
1 file changed, 101 insertions(+), 59 deletions(-)
diff --git a/drivers/staging/a
't catch these during review... It's
> the obvious bug right? "You have reversed the return values but not
> updated any of the callers." *Egg on my face*.
>
> regards,
> dan carpenter
>
That one is ugly, my bad.
The fix looks good to me, and
On 12/30/19 10:55:20, Amir Mahdi Ghorbanian wrote:
> Remove unnecessary parenthesis to abide by kernel
> coding-style.
>
> Signed-off-by: Amir Mahdi Ghorbanian
Reviewed-by: Quentin Deslandes
> ---
> drivers/staging/vt6656/baseband.c | 8
> 1 file change
es from usb_control_msg().
>
> if (ret == length)
> ret = 0;
> else if (ret >= 0)
> ret = -EIO;
>
> regards,
> dan carpenter
>
Thanks for CC.
Nice catch. Dan is right, we should forward any error code from
usb_control_msg().
Regards,
Quentin Deslandes
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
the ignored / unsupported properties.
Signed-off-by: Quentin Deslandes
---
drivers/staging/axis-fifo/axis-fifo.c | 247 ++--
drivers/staging/axis-fifo/axis-fifo.txt | 18 +-
2 files changed, 74 insertions(+), 191 deletions(-)
diff --git a/drivers/staging/axis-fifo/axis
Request device's resources (memory, interrupt...) using managed
function.
Signed-off-by: Quentin Deslandes
---
drivers/staging/axis-fifo/axis-fifo.c | 45 ---
1 file changed, 13 insertions(+), 32 deletions(-)
diff --git a/drivers/staging/axis-fifo/axis-fifo.c
b/dr
Remove unused resource pointer from the device's internal structure.
Signed-off-by: Quentin Deslandes
---
drivers/staging/axis-fifo/axis-fifo.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/axis-fifo/axis-fifo.c
b/drivers/staging/axis-fifo
Avoid parsing unused device tree properties and add a note on ignored /
unsupported properties inside the joined documentation instead.
Also use managed functions to claim the device's resources and remove unused
resource pointer from the device's internal structure.
Quentin De
ct vnt_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
priv->rx_antenna_mode = ANT_B;
> + if (priv->tx_rx_ant_inv)
> + priv->rx_antenna_mode = ANT_A;
> + else
> + priv->rx_antenna_mode = ANT_
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 softw
if (rcb->skb)
> - dev_kfree_skb(rcb->skb);
> + dev_kfree_skb(rcb->skb);
>
> kfree(rcb);
> }
> --
> 2.23.0
>
Reviewed-by: Quentin Deslandes
Regards,
Quentin
___
devel mailin
bb_type,
> *tx_rate = 0x8b;
> *rsv_time = 30;
> }
> - break;
> + break;
> case RATE_9M:
> if (bb_type == BB_TYPE_11A) {
> *tx_rate = 0x9f;
&g
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 +--
dr
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(+
xes 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
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 dele
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
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 --
dr
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
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
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 '
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
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 +++-
dri
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
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
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
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 D
43 matches
Mail list logo