These include module parameters.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/main_usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/vt6656/main_usb.c
b/drivers/staging/vt6656/main_usb.c
index 5e48b3ddb94c..701300202b21 100644
--- a/drivers
On Sun, Mar 01, 2020 at 01:25:14PM +0100, Greg Kroah-Hartman wrote:
> On Sun, Mar 01, 2020 at 12:26:20PM +0100, Oscar Carter wrote:
> > These include module parameters.
> >
> > Signed-off-by: Oscar Carter
> > ---
> > drivers/staging/vt6656/main_usb.c | 4 ++--
Don't initialize variables that are then set a few lines later.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/main_usb.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/vt6656/main_usb.c
b/drivers/staging/vt6656/main_usb.c
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:
> > On Sun, Mar 01, 2020 at 01:25:14PM +0100, Greg Kroah-Hartman wrote:
> > > On Sun, Mar 01, 2020 at 12:26:20PM +0100, Oscar Carter wrote:
>
Replace the bit left shift operation with the BIT_ULL() macro and remove
the unnecessary "and" operation against the bit_nr variable.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/main_usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/stag
On Sun, Mar 08, 2020 at 07:55:38AM +0100, Greg Kroah-Hartman wrote:
> On Sat, Mar 07, 2020 at 11:49:29AM +0100, Oscar Carter wrote:
> > Replace the bit left shift operation with the BIT_ULL() macro and remove
> > the unnecessary "and" operation against the bit_nr variab
On Tue, Mar 10, 2020 at 10:50:11AM +0100, Greg Kroah-Hartman wrote:
> On Sun, Mar 08, 2020 at 07:22:07PM +, Malcolm Priestley wrote:
> > >>> */
> > >>> #undef __NO_VERSION__
> > >>>
> > >>> +#include
> > >>> #include
> > >>> #include
> > >>> #include "device.h"
> > >>> @@ -802,8 +803,7
is now unnecessary.
Signed-off-by: Oscar Carter
---
Changelog v1 -> v2
- Add more information to clarify the patch.
- Add notes about the legacy provide by Malcolm Priestley.
drivers/staging/vt6656/main_usb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/stagi
Use ARRAY_SIZE to replace the hardcoded size so we will never have a
mismatch.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/main_usb.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/vt6656/main_usb.c
b/drivers/staging/vt6656/main_usb.c
On Tue, Mar 17, 2020 at 01:45:06PM +0300, Dan Carpenter wrote:
> On Sat, Mar 14, 2020 at 05:47:54PM +0100, Oscar Carter wrote:
> > Use ARRAY_SIZE to replace the hardcoded size so we will never have a
> > mismatch.
> >
> > Signed-off-by: Oscar Carter
> > ---
>
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.
drivers/staging/vt6656/main_usb.c | 7 ---
Use the BIT() macro instead of the hexadecimal value to define the
different bits in registers.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/desc.h | 35 ++---
drivers/staging/vt6656/device.h | 9 +-
drivers/staging/vt6656/mac.h| 263
3 files
The last parameter in the functions vnt_mac_reg_bits_on and
vnt_mac_reg_bits_off defines the bits to set or unset. So, it's more
clear to use the BIT() macro instead of an hexadecimal value.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 5 +++--
drivers/staging/v
Use DIV_ROUND_UP macro instead of specific code with the same purpose.
Also, remove the unused variables.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 21 -
1 file changed, 4 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/vt6656
On Mon, Mar 23, 2020 at 11:42:00AM +0100, Greg Kroah-Hartman wrote:
> On Sun, Mar 22, 2020 at 12:23:42PM +0100, Oscar Carter wrote:
> > Use DIV_ROUND_UP macro instead of specific code with the same purpose.
> > Also, remove the unused variables.
> >
> >
On Mon, Mar 23, 2020 at 10:35:18AM +0300, Dan Carpenter wrote:
> On Fri, Mar 20, 2020 at 06:10:56PM +0100, Oscar Carter wrote:
> > -#define RSR_ADDRBROAD 0x80
> > -#define RSR_ADDRMULTI 0x40
> > +#define RSR_ADDRBROAD BIT(7)
> > +#define RSR_ADDRMULT
On Mon, Mar 23, 2020 at 10:32:14AM +0300, Dan Carpenter wrote:
> On Fri, Mar 20, 2020 at 07:13:26PM +0100, Oscar Carter wrote:
> > +#include
> > #include "mac.h"
> > #include "baseband.h"
> > #include "rf.h"
> > @
ts in a
> > buffer overflow then static checkers would complain. If they changed it
> > and it resulted in uninitialized data being used then it would be zero
> > so that's okay.
>
> I wasn't sure where I should stand on this, that's clearer now.
Use DIV_ROUND_UP macro instead of specific code with the same purpose.
Also, remove the unused variables.
Signed-off-by: Oscar Carter
---
Changelog v1 -> v2
- Rebase the original patch [1] against the staging-next branch of the greg's
staging.git tree.
[1] https://lore.kernel.
Define the EnCFG_BBType_MASK bit as an OR operation between two previous
defines instead of using the OR between two new BIT macros. Thus, the
code is more clear.
Fixes: a74081b44291 ("staging: vt6656: Use BIT() macro instead of hex value")
Signed-off-by: Oscar Carter
Reviewed-by: Dan
ro in vnt_mac_reg_bits_*
functions")
Suggested-by: Dan Carpenter
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 6 --
drivers/staging/vt6656/card.c | 3 +--
drivers/staging/vt6656/mac.h | 12
drivers/staging/vt6656/main_usb.c | 2 +-
4 files c
more clear.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 8
drivers/staging/vt6656/main_usb.c | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/vt6656/baseband.c
b/drivers/staging/vt6656/baseband.c
index a19a563d8bcc..9bbafa7ff
more clear.
Signed-off-by: Oscar Carter
---
Changelog v1 -> v2
- Spell checking correction in the changelog.
drivers/staging/vt6656/baseband.c | 8
drivers/staging/vt6656/main_usb.c | 6 +++---
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/vt6656/
ease the
footprint and makes the code more clear.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 335 +-
1 file changed, 100 insertions(+), 235 deletions(-)
diff --git a/drivers/staging/vt6656/baseband.c
b/drivers/staging/vt6656/baseband
On Tue, Mar 31, 2020 at 01:41:30PM +0300, Dan Carpenter wrote:
> On Thu, Mar 26, 2020 at 06:10:43PM +0100, Oscar Carter wrote:
> > I will make these changes and i will send and incremental patch with the
> > "Fixes:" tag due to the this patch has already been added
On Mon, Mar 30, 2020 at 02:27:14PM +0200, Greg Kroah-Hartman wrote:
> On Fri, Mar 27, 2020 at 05:58:02PM +0100, Oscar Carter wrote:
> > Define the EnCFG_BBType_MASK bit as an OR operation between two previous
> > defines instead of using the OR between two new BIT macros. Thus,
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_reg_bits_on and
> >
On Thu, Apr 02, 2020 at 11:58:07AM +0100, Malcolm Priestley wrote:
>
>
> On 02/04/2020 10:19, Quentin Deslandes wrote:
> > 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, 20
Define the EnCFG_BBType_MASK bit as an OR operation between two previous
defines instead of using the OR between two new BIT macros. Thus, the
code is more clear.
Signed-off-by: Oscar Carter
Reviewed-by: Dan Carpenter
Reviewed-by: Quentin Deslandes
---
Changelog v1 -> v2
- Remove the &qu
Use the define RATE_11M present in the file "device.h" instead of the
magic number 3. So the code is more clear.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/baseband.c
Use ARRAY_SIZE to replace the define RATE_54M so we will never have a
mismatch. In this way, avoid the possibility of a buffer overflow if
this define is changed in the future to a greater value.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 2 +-
1 file changed, 1
.
The second patch makes use of the define RATE_11M instead of a magic
number.
The third patch remove unnecessary local variable initialization.
Oscar Carter (3):
staging: vt6656: Use ARRAY_SIZE instead of define RATE_54M
staging: vt6656: Use define instead of magic number for tx_rate
Don't initialize the rate variable as it is set a few lines later.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/baseband.c
b/drivers/staging/vt6656/baseband.c
index a785f91
On Mon, Apr 06, 2020 at 02:13:23PM +0300, Dan Carpenter wrote:
> On Sat, Apr 04, 2020 at 04:13:58PM +0200, Oscar Carter wrote:
> > Use ARRAY_SIZE to replace the define RATE_54M so we will never have a
> > mismatch. In this way, avoid the possibility of a buffer overflow if
>
On Mon, Apr 06, 2020 at 04:22:12PM +0200, Greg Kroah-Hartman wrote:
> On Sat, Apr 04, 2020 at 04:13:59PM +0200, Oscar Carter wrote:
> > Use the define RATE_11M present in the file "device.h" instead of the
> > magic number 3. So the code is more clear.
> >
On Mon, Apr 06, 2020 at 07:58:08PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Apr 06, 2020 at 06:38:36PM +0200, Oscar Carter wrote:
> > On Mon, Apr 06, 2020 at 04:22:12PM +0200, Greg Kroah-Hartman wrote:
> > > On Sat, Apr 04, 2020 at 04:13:59PM +0200, Oscar Carter wrote:
>
Use the define RATE_11M present in the file "device.h" instead of the
magic number 3. So the code is more clear.
Reviewed-by: Dan Carpenter
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drive
Don't initialize the rate variable as it is set a few lines later.
Reviewed-by: Dan Carpenter
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/baseband.c
b/drivers/staging/v
ate variable.
Oscar Carter (2):
staging: vt6656: Use define instead of magic number for tx_rate
staging: vt6656: Remove unnecessary local variable initialization
drivers/staging/vt6656/baseband.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--
2.2
ate variable.
Changelog v2 -> v3
- Use the version number in the subject line of patch 1/2 and 2/2.
Oscar Carter (2):
staging: vt6656: Use define instead of magic number for tx_rate
staging: vt6656: Remove unnecessary local variable initialization
drivers/staging/vt6656/baseband.c | 5 ++
Use the define RATE_11M present in the file "device.h" instead of the
magic number 3. So the code is more clear.
Reviewed-by: Dan Carpenter
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drive
Don't initialize the rate variable as it is set a few lines later.
Reviewed-by: Dan Carpenter
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/baseband.c
b/drivers/staging/v
On Tue, Apr 07, 2020 at 06:29:57PM +0200, Oscar Carter wrote:
> This patch series makes a cleanup of the vnt_get_frame_time function.
>
> The first patch makes use of the define RATE_11M instead of a magic
> number. The second patch remove unnecessary local variable initialization.
&
Take out the "phy->service" assignment from the if-else statement due to
it's the same for the two branches.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/vt6656/bas
t of the
"phy->service" variable by putting it outside the if-else statement due
to it's the same for the two branches.
Oscar Carter (2):
staging: vt6656: Refactor the assignment of the phy->signal variable
staging: vt6656: Remove duplicate code for the phy->servic
Create a constant array with the values of the "phy->signal" for every
rate. Remove all "phy->signal" assignments inside the switch statement
and replace these with a single reading from the new vnt_phy_signal
array.
Signed-off-by: Oscar Carter
---
drivers/stagi
On Fri, Apr 10, 2020 at 04:37:59PM +0100, Malcolm Priestley wrote:
>
>
> On 10/04/2020 12:28, Oscar Carter wrote:
> > Create a constant array with the values of the "phy->signal" for every
> > rate. Remove all "phy->signal" assignments inside th
On Fri, Apr 10, 2020 at 05:40:52PM +0100, Malcolm Priestley wrote:
>
>
> On 10/04/2020 16:59, Oscar Carter wrote:
> > On Fri, Apr 10, 2020 at 04:37:59PM +0100, Malcolm Priestley wrote:
> > >
> > >
> > > On 10/04/2020 12:28, Oscar Carter wrote:
> > &g
the OR mask with
BIT(3) or BIT(4) allow obtain a second value according to the rate,
the preamble_type and the pkt_type.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 105 --
1 file changed, 26 insertions(+), 79 deletions(-)
diff --git a/drivers/st
dimension as
Malcolm Priestley has suggested.
Oscar Carter (2):
staging: vt6656: Refactor the assignment of the phy->signal variable
staging: vt6656: Remove duplicate code for the phy->service assignment
drivers/staging/vt6656/baseband.c | 108 --
1 file
Take out the "phy->service" assignment from the if-else statement due to
it's the same for the two branches.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/vt6656/bas
This patch series makes a refactor of the vnt_vt3184_init function through
two patches.
The first one removes duplicate code in the if statements because
different branches are almost the same.
The second patch remove unnecessary local variable initialization.
Oscar Carter (2):
staging
Don't initialize the ret variable as it is set a few lines later.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/baseband.c
b/drivers/staging/vt6656/baseband.c
index 276210a
Remove duplicate code in "if" statements because different branches are
almost the same.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 52 +++
1 file changed, 12 insertions(+), 40 deletions(-)
diff --git a/drivers/staging/vt6656/bas
Use the BIT() macro instead of the bit left shift operator. So the code
is more clear.
It's safe to remove the casting to u16 type because the value obtained
never exceeds 16 bits. So the casting is unnecessary.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/card.c | 8
1
ls to this function
(vnt_rf_set_txpower) not use the returned values, so they not need to be
fixed.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/rf.c | 99 -
1 file changed, 64 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/vt6656/rf.c
Use a formula to calculate the return value of the vnt_rf_addpower
function instead of the "if" statement with literal values for every
case.
Signed-off-by: Oscar Carter
---
What is the better approach for this function ? Leave it as is or use
a formula although it is less clear.
I
On Mon, Apr 13, 2020 at 02:56:33PM +0200, Greg Kroah-Hartman wrote:
> On Tue, Apr 07, 2020 at 06:39:14PM +0200, Oscar Carter wrote:
> > Use the define RATE_11M present in the file "device.h" instead of the
> > magic number 3. So the code is more clear.
> >
On Mon, Apr 13, 2020 at 02:56:16PM +0200, Greg Kroah-Hartman wrote:
> On Sat, Apr 11, 2020 at 02:26:09PM +0200, Oscar Carter wrote:
> > Create a constant array with the values of the "phy->signal" for every
> > rate. Remove all "phy->signal" assignments in
On Mon, Apr 13, 2020 at 04:29:07PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Apr 13, 2020 at 04:13:15PM +0200, Oscar Carter wrote:
> > On Mon, Apr 13, 2020 at 02:56:33PM +0200, Greg Kroah-Hartman wrote:
> > > On Tue, Apr 07, 2020 at 06:39:14PM +0200, Oscar Carter wrote:
>
On Mon, Apr 13, 2020 at 04:32:58PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Apr 13, 2020 at 04:25:17PM +0200, Oscar Carter wrote:
> > On Mon, Apr 13, 2020 at 02:56:16PM +0200, Greg Kroah-Hartman wrote:
> > > On Sat, Apr 11, 2020 at 02:26:09PM +0200, Oscar Carter wrote:
> &g
Take out the "phy->service" assignment from the if-else statement due to
it's the same for the two branches.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/vt6656/bas
ls to this function
(vnt_rf_set_txpower) not use the returned values, so they not need to be
fixed.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/rf.c | 99 -
1 file changed, 64 insertions(+), 35 deletions(-)
diff --git a/drivers/staging/vt6656/rf.c
Use the BIT() macro instead of the bit left shift operator. So the code
is more clear.
It's safe to remove the casting to u16 type because the value obtained
never exceeds 16 bits. So the casting is unnecessary.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/card.c | 4 ++--
1
Use the define RATE_11M present in the file "device.h" instead of the
magic number 3. So the code is more clear.
Reviewed-by: Dan Carpenter
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drive
the OR mask with
BIT(3) or BIT(4) allow obtain a second value according to the rate,
the preamble_type and the pkt_type.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 105 --
1 file changed, 26 insertions(+), 79 deletions(-)
diff --git a/drivers/st
urth patch creates a constant array with the values of the
"phy->signal" variable for every rate and makes a refactor of the
assignment of this variable.
The fifth path takes out the "phy->service" assignment from the if-else
statement due to it's the same for the two bra
On Tue, Apr 14, 2020 at 04:12:14PM +0300, Dan Carpenter wrote:
> On Mon, Apr 13, 2020 at 04:02:09PM +0200, Oscar Carter wrote:
> > diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
> > index 4f9aba0f21b0..3b200d7290a5 100644
> > --- a/drivers/staging/
has changed by the kernel-doc style, fixing the parameters and
return value.
Oscar Carter (2):
staging: vt6656: Check the return value of vnt_control_out_* calls
staging: vt6656: Fix functions' documentation
drivers/staging/vt6656/baseband.c | 35 +++---
drivers/staging/vt6656/baseb
Replace the functions' documentation by the kernel-doc style fixing the
parameters and return value.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/card.c | 101 +++--
drivers/staging/vt6656/mac.c | 67 --
drivers/staging/v
efore
the call didn't check the return value, now neither.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 35 ++-
drivers/staging/vt6656/baseband.h | 4 +-
drivers/staging/vt6656/card.c | 97 ---
drivers/staging/vt6656/card.
achieved using only one single mask which
comprises all the commented bits.
This way avoid the iteration over an unnecessary for loop.
Also change the return type to bool because it's the type that this
function returns.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/card.c | 11 ++-
eds to be removed the bss callers to baseband.c, the tbtt's to
> power.c
> and the rest to mac.c
>
> Regards
>
> Malcolm
Thanks,
Oscar Carter
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
iteration over unnecessary for loops.
The header "linux/bits.h" can be remove as it is included in the header
"linux/bitops.h".
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/card.c | 28 ++--
1 file changed, 6 insertions(+), 22 deletions(-)
On Sun, Apr 19, 2020 at 10:22:50AM +0100, Malcolm Priestley wrote:
>
>
> On 19/04/2020 08:47, Oscar Carter wrote:
> > On Sat, Apr 18, 2020 at 07:05:53PM +0100, Malcolm Priestley wrote:
> >> Actually I don't really think the function descriptions are needed at al
Remove the functions' documentation as the names of the functions are
clear enought. Also, the actual documentation it's not correct in all
cases.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/card.c | 79 --
drivers/staging/vt6656/ma
has changed as the function names are clear enought. Also,
the actual documentation is not correct in all cases.
Changelog v1 -> v2
- Remove the function's documentation instead of fix them as suggested
Malcolm Priestley.
Oscar Carter (2):
staging: vt6656: Check the return
efore
the call didn't check the return value, now neither.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 35 ++-
drivers/staging/vt6656/baseband.h | 4 +-
drivers/staging/vt6656/card.c | 97 ---
drivers/staging/vt6656/card.
On Mon, Apr 20, 2020 at 03:10:59PM +0300, Dan Carpenter wrote:
> On Sun, Apr 19, 2020 at 12:09:21PM +0200, Oscar Carter wrote:
> > - for (i = RATE_11M;; i--) {
> > - if (priv->basic_rates & (u16)(1 << i)) {
> > - top_cck
iteration over unnecessary for loops.
The header "linux/bits.h" can be remove as it is included in the header
"linux/bitops.h".
Signed-off-by: Oscar Carter
---
Changelog v1 -> v2
- Replace the expression pos-- with the expresion (pos - 1) as Dan
Carpenter suggested.
On Wed, Apr 15, 2020 at 06:25:41PM +0200, Oscar Carter wrote:
> On Tue, Apr 14, 2020 at 04:12:14PM +0300, Dan Carpenter wrote:
> > On Mon, Apr 13, 2020 at 04:02:09PM +0200, Oscar Carter wrote:
> > > diff --git a/drivers/staging/vt6656/rf.c b/drivers/staging/vt6656/rf.c
> &
On Thu, Apr 23, 2020 at 01:40:32PM +0200, Greg Kroah-Hartman wrote:
> On Sun, Apr 19, 2020 at 12:48:20PM +0200, Oscar Carter wrote:
> > Check the return value of vnt_control_out_* function calls. When
> > necessary modify the function prototype to be able to return the new
> &g
h of Greg's staging tree.
Oscar Carter (2):
staging: vt6656: Check the return value of vnt_control_out_* calls
staging: vt6656: Remove functions' documentation
drivers/staging/vt6656/baseband.c | 35 +++---
drivers/staging/vt6656/baseband.h | 4 +-
drivers/staging/vt
efore
the call didn't check the return value, now neither.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 35 ++-
drivers/staging/vt6656/baseband.h | 4 +-
drivers/staging/vt6656/card.c | 97 ---
drivers/staging/vt6656/card.
Remove the functions' documentation as the names of the functions are
clear enought. Also, the actual documentation it's not correct in all
cases.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/card.c | 79 --
drivers/staging/vt6656/ma
Use a formula to calculate the return value of the vnt_rf_addpower
function instead of the "if" statement with literal values for every
case.
Signed-off-by: Oscar Carter
---
Changelog v1 -> v2
- Change the type of "base" variable from s32 to int as Dan Carpenter
the "goto" statements with a direct "return ret"
as the jump label only returns the ret variable.
The third patch replaces three while loops with three calls to the
vnt_control_out_blocks function. This way avoid repeat a functionality
that already exists.
Oscar Carter (3):
sta
Replace the "goto" statements with a direct "return ret" as the jump
label only returns the ret variable.
Also, remove the unnecessary variable initialization because the ret
variable is set a few lines later.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/rf.c | 1
Replace three while loops with three calls to the vnt_control_out_blocks
function. This way avoid repeat a functionality that already exists.
Also remove the variables that now are not used.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/rf.c | 65
Remove the local variable "array" and all the memcpy function calls
because this copy operation from different arrays to this variable is
unnecessary.
The same result can be achieved using the arrays directly.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656
On Sat, Apr 25, 2020 at 12:56:26PM +0200, Greg Kroah-Hartman wrote:
> On Thu, Apr 23, 2020 at 05:38:34PM +0200, Oscar Carter wrote:
> > This patch series checks the return value of vnt_control_out_* function
> > calls.
> >
> > The first patch checks the return value an
h of Greg's staging tree.
Changelog v3 -> v4
- Rebase again.
Oscar Carter (2):
staging: vt6656: Check the return value of vnt_control_out_* calls
staging: vt6656: Remove functions' documentation
drivers/staging/vt6656/baseband.c | 35 +++---
drivers/staging/vt6656/baseband.h | 4 +-
Remove the functions' documentation as the names of the functions are
clear enought. Also, the actual documentation it's not correct in all
cases.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/card.c | 79 --
drivers/staging/vt6656/ma
efore
the call didn't check the return value, now neither.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 35 ++-
drivers/staging/vt6656/baseband.h | 4 +-
drivers/staging/vt6656/card.c | 97 ---
drivers/staging/vt6656/card.
On Sat, Apr 25, 2020 at 12:57:14PM +0200, Greg Kroah-Hartman wrote:
> On Thu, Apr 23, 2020 at 07:05:57PM +0200, Oscar Carter wrote:
> > Use a formula to calculate the return value of the vnt_rf_addpower
> > function instead of the "if" statement with literal
Use a formula to calculate the return value of the vnt_rf_addpower
function instead of the "if" statement with literal values for every
case.
Signed-off-by: Oscar Carter
---
Changelog v1 -> v2
- Change the type of "base" variable from s32 to int as Dan Carpenter
On Sat, Apr 25, 2020 at 05:50:39AM -0700, Joe Perches wrote:
> On Sat, 2020-04-25 at 14:38 +0200, Oscar Carter wrote:
> > Remove the local variable "array" and all the memcpy function calls
> > because this copy operation from different arrays to this variable is
>
Replace the "goto" statements with a direct "return ret" as the jump
label only returns the ret variable.
Also, remove the unnecessary variable initialization because the ret
variable is set a few lines later.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/rf.c | 1
to fail.
Since there is a wide range of buffer sizes use kmemdup to create
allocated buffer.
So, the same result can be achieved using the arrays directly.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/rf.c | 21 +
1 file changed, 5 insertions(+), 16 deleti
odify the commit changelog of the first patch to clarify the change as
Joe Perches suggested.
Oscar Carter (3):
staging: vt6656: Remove the local variable "array"
staging: vt6656: Use return instead of goto
staging: vt6656: Remove duplicate code in vnt_rf_table_
1 - 100 of 115 matches
Mail list logo