In an effort to enable -Wcast-function-type in the top-level Makefile to
support Control Flow Integrity builds, remove all the function callback
casts.
To do this modify the function prototypes accordingly.
Signed-off-by: Oscar Carter
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 24
ow control type, so remove the
OR / AND self operator and set the value directly.
Addresses-Coverity-ID: 1374016 ("Uninitialized scalar variable")
Fixes: e55c25206d5c9 ("greybus: uart: Handle CRTSCTS flag in termios")
Signed-off-by: Oscar Carter
---
drivers/staging/greybus/u
Coverity-ID: 1230228 ("Logically dead code")
Fixes: f53d9f12c51a ("staging: vt6656: rf.c additional power.")
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/rf.c | 17 -
1 file changed, 17 deletions(-)
diff --git a/drivers/staging/vt6656/rf.c b/dri
45 0
.note.GNU-stack 0 0
.note.gnu.property 32 0
Total 2251
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/baseband.c | 14 +-
drivers/staging/vt6656/usbpipe.c | 2 +-
drivers/staging/vt6656/usbpipe.h | 2 +-
3 files changed,
3cb90b802d ("staging: wilc1000: add passive scan support")
Acked-by: Ajay Singh
Signed-off-by: Oscar Carter
---
Changelog v1 -> v2
- Fix the commit for the "Fixes" tag as Ajay Singh suggested.
Changelog v2 -> v3
- Use a #define instead of a hard-coded literal for the a
On Sun, May 03, 2020 at 04:29:53PM -0700, Joe Perches wrote:
> On Sun, 2020-05-03 at 14:52 +, ajay.kat...@microchip.com wrote:
> > On 03/05/20 1:21 pm, Oscar Carter wrote:
> > > EXTERNAL EMAIL: Do not click links or open attachments unless you know
> &g
Increase by one the size of wid_list array as index variable can reach a
value of 5. If this happens, an out-of-bounds access is performed.
Addresses-Coverity-ID: 1451981 ("Out-of-bounds access")
Fixes: f5a3cb90b802d ("staging: wilc1000: add passive scan support")
Signed-
On Fri, May 01, 2020 at 06:26:10PM +, ajay.kat...@microchip.com wrote:
>
> On 01/05/20 10:32 pm, Oscar Carter wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> > content is safe
> >
> > Increase by one the size of wid_li
Increase by one the size of wid_list array as index variable can reach a
value of 5. If this happens, an out-of-bounds access is performed.
Addresses-Coverity-ID: 1451981 ("Out-of-bounds access")
Fixes: c5c77ba18ea66 ("staging: wilc1000: Add SDIO/SPI 802.11 driver")
Signed-
ivers/staging: Gasket driver framework + Apex driver")
Signed-off-by: Oscar Carter
---
drivers/staging/gasket/gasket_core.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/staging/gasket/gasket_core.c
b/drivers/staging/gasket/gasket_core.c
index 8e0575fcb4c8..67325fbaf760 10
ve all the variables that are now unused.
This way reduce the stack footprint, and make the code more clear.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/rf.c | 111 ++--
1 file changed, 69 insertions(+), 42 deletions(-)
diff --git a/drivers/staging/vt6
Check the return value of all the functions that return zero if
successful or a negative error code on failure inside the function
vnt_set_bss_mode.
Also, remove the unnecessary variable initialization as this variable is
set a few lines later.
Signed-off-by: Oscar Carter
---
drivers/staging
tements as all the branches in every "if" are almost the same.
Oscar Carter (2):
staging: vt6656: Check the return values in vnt_set_bss_mode function
staging: vt6656: Refactor the vnt_set_bss_mode function
drivers/staging/vt6656/card.c | 77 ++-
e the
"priv->bb_type" variable is already an u8 tpe.
Signed-off-by: Oscar Carter
---
drivers/staging/vt6656/card.c | 68 ---
1 file changed, 31 insertions(+), 37 deletions(-)
diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c
index
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_
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
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
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
>
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 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
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.
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 +-
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
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
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
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
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
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
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
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
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
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
> &
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 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
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.
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
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
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
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(-)
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
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 ++-
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.
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
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
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/
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
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
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
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
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
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 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 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.
> >
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
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 | 8
1
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
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
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
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
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
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
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
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.
&
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.
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 ++
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
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
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
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:
>
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 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
>
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
.
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
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
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
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
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 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: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
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
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/
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
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
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
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.
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.
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"
> > @
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
1 - 100 of 115 matches
Mail list logo