Remove useless local variables last_read_point and last_txw_point and
the code related.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/drivers/net/wireless/r
134129 20bf1 drivers/net/wireless/cisco/airo.o
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/net/wireless/cisco/airo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/cisco/airo.c
b/drivers/net/wireless/cisco/airo.c
i
Quoting Kalle Valo <kv...@codeaurora.org>:
"Gustavo A. R. Silva" <garsi...@embeddedor.com> wrote:
Check return value from call to wl18xx_top_reg_write(),
so in case of error jump to goto label out and return.
Also, remove unnecessary value check before goto label out.
Refactor code in order to avoid identical code for different branches.
This issue was detected with the help of Coccinelle.
Addresses-Coverity-ID: 1415177
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
This issue was reported by Coverity and it was tested by compilatio
The name of an array used by itself will always return the array's address.
So this test will always evaluate as true.
Addresses-Coverity-ID: 1364903
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/net/wireless/ath/ath9k/eeprom.c | 2 +-
1 file changed, 1 insertion
The name of an array used by itself will always return the array's address.
So these tests will always evaluate as false and therefore the _return_
will never be executed.
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/net/wireless/ath/ath10k/wmi.c | 9 -
ly appreciate any comment on this.
Thank you!
--
Gustavo A. R. Silva
The array fields in struct wmi_start_scan_arg that are checked here are
fixed size arrays so they can never be NULL.
Addresses-Coverity-ID: 1260031
Cc: Arend Van Spriel <arend.vanspr...@broadcom.com>
Cc: Kalle Valo <kv...@qca.qualcomm.com>
Signed-off-by: Gustavo A. R.
Hi Kalle,
Quoting Kalle Valo <kv...@qca.qualcomm.com>:
"Gustavo A. R. Silva" <garsi...@embeddedor.com> writes:
The name of an array used by itself will always return the array's address.
So these tests will always evaluate as false and therefore the _return_
will neve
Hi Kalle,
Quoting Kalle Valo <kv...@qca.qualcomm.com>:
"Gustavo A. R. Silva" <garsi...@embeddedor.com> writes:
The name of an array used by itself will always return the array's address.
So this test will always evaluate as true.
Addresses-Coverity-ID: 1364903
Signe
Hi Arend,
Quoting Arend Van Spriel <arend.vanspr...@broadcom.com>:
On 9-5-2017 7:33, Kalle Valo wrote:
"Gustavo A. R. Silva" <garsi...@embeddedor.com> writes:
The name of an array used by itself will always return the array's address.
So these tests will al
Quoting Kalle Valo <kv...@qca.qualcomm.com>:
"Gustavo A. R. Silva" <garsi...@embeddedor.com> writes:
Hi Kalle,
Quoting Kalle Valo <kv...@qca.qualcomm.com>:
"Gustavo A. R. Silva" <garsi...@embeddedor.com> writes:
The name of an array used by its
The array field eeprom_data in struct th9k_platform_data
is a fixed size array so it can never be NULL.
Addresses-Coverity-ID: 1364903
Cc: Arend Van Spriel <arend.vanspr...@broadcom.com>
Cc: Kalle Valo <kv...@qca.qualcomm.com>
Signed-off-by: Gustavo A. R. Silva <garsi...
Remove unnecessary variable and refactor the code.
Addresses-Coverity-ID: 1365000
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/net/wireless/ti/wlcore/spi.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ti/wlcore
Hi Guenter,
Please, see my comments below
Quoting Guenter Roeck <li...@roeck-us.net>:
On Mon, Jun 12, 2017 at 05:02:23PM -0500, Gustavo A. R. Silva wrote:
NULL check at line 76: if (conn_info) {, implies that pointer conn_info
might be NULL, but this pointer is being previously derefe
.
Addresses-Coverity-ID: 1362349
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
net/nfc/nci/core.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
index 61fff42..d2198ce 100644
--- a/net/nfc/nci/core.c
+++
Check return value from call to wl18xx_top_reg_write(),
so in case of error jump to goto label out and return.
Also, remove unnecessary value check before goto label out.
Addresses-Coverity-ID: 1226938
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/net/wirel
Value assigned to variable offset at line 551 is overwritten at line 562,
before it can be used. This makes such variable assignment useless.
Addresses-Coverity-ID: 1226941
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/net/wireless/ath/ath9k/mci.c | 2 +-
: 1364857
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/nfc/nfcsim.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/nfc/nfcsim.c b/drivers/nfc/nfcsim.c
index a466e79..6e90b54 100644
--- a/drivers/nfc/nfcsim.c
+++ b/drivers/nfc/nf
ON_STACK().
My question is if there is any chance that pointer tfm_michael might
be NULL when calling macro SHASH_DESC_ON_STACK() ?
I'm trying to figure out if this is a false positive or something that
needs to be fixed somehow.
I'd really appreciate any comment on this.
Thank you!
--
Gustavo A. R. Silva
Remove unused variable rtlhal.
Addresses-Coverity-ID: 1248810
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
b/d
Remove unnecessary NULL check for pointer conn_info.
conn_info is set in list_for_each_entry() using container_of(),
which is never NULL.
Addresses-Coverity-ID: 1362349
Cc: Guenter Roeck <li...@roeck-us.net>
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
net/nfc/nc
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Cc: Jes Sorensen <jes.soren...@gmail.com>
Cc: Kalle Valo <kv...@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Cc: net...@vger.kernel.org
Signed-off-by: Gustavo A. R.
Hi Larry,
On 08/30/2017 11:37 AM, Larry Finger wrote:
On 08/30/2017 08:42 AM, Gustavo A. R. Silva wrote:
Refactor code in order to avoid identical code for different branches.
This issue was detected with the help of Coccinelle.
Addresses-Coverity-ID: 1226788
Signed-off-by: Gustavo A. R
tc_get_wifi_rssi.
Addresses-Coverity-ID: 1226793
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
This code was reported by Coverity and it was tested by compilation only.
Chances are this may be a copy/paste error in function
halbtc_get_wifi_rssi. Please, verify.
Also, not
Refactor code in order to avoid identical code for different branches.
Addresses-Coverity-ID: 1248728
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
This issue was reported by Coverity and it was tested by compilation only.
Please, verify if this is not a copy/paste error
Hi Larry,
On 08/30/2017 11:48 PM, Larry Finger wrote:
On 08/30/2017 08:42 AM, Gustavo A. R. Silva wrote:
Refactor code in order to avoid identical code for different branches.
This issue was detected with the help of Coccinelle.
Addresses-Coverity-ID: 1226788
Signed-off-by: Gustavo A. R
Refactor code in order to avoid identical code for different branches.
This issue was detected with the help of Coccinelle.
Addresses-Coverity-ID: 1226788
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
This issue was reported by Coverity and it was tested by compilatio
Hi Jes,
Quoting Jes Sorensen <jes.soren...@gmail.com>:
On 10/11/2017 04:41 AM, Kalle Valo wrote:
Jes Sorensen <jes.soren...@gmail.com> writes:
On 10/10/2017 03:30 PM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we a
expecting to find.
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
This code was tested by compilation only (GCC 7.2.0 was used).
Please, verify that the actual intention of the code is to fall through.
net/mac80211/cfg.c| 3 +++
net/mac80211/ht.c | 1 +
n
"INVALID_STATE" is already being returned in the default case and this
code cannot be reached.
Addresses-Coverity-ID: 1398384
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/net/wireless/rsi/rsi_91x_ps.c | 1 -
1 file changed, 1 deletion(-)
diff --g
Make use of the swap macro and remove unnecessary variable temp.
This makes the code easier to read and maintain.
This code was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/net/wireless/ath/ath9k/dfs.c | 8 +++-
Hi Dan,
On 04/27/2018 06:44 AM, Dan Carpenter wrote:
On Fri, Apr 27, 2018 at 02:32:20PM +0300, Kalle Valo wrote:
Gustavo submitted an identical patch also for this one :)
https://patchwork.kernel.org/patch/10365997/
Hey Gustavo,
We keep on sending duplicate patches. Most of the static
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/net/wireless/ath/ath9k/ar5008_phy.c | 2 ++
drivers/net/wireless/ath/ath9k/ar9002_phy.c | 1 +
drivers/net/wi
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
Changes in v2:
- Place code comments on a line of their own.
drivers/net/wireless/ath/ath6kl/cfg80211.c | 3 +++
On 05/25/2018 08:30 AM, Kalle Valo wrote:
Sergei Shtylyov <sergei.shtyl...@cogentembedded.com> writes:
On 5/25/2018 2:13 AM, Gustavo A. R. Silva wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustav
On 05/25/2018 01:10 PM, Kalle Valo wrote:
Yeah, I was wondering the same. Was there a particular reason for this?
Sometimes people use this style for a one-line code block.
I can change it to the traditional style. No problem.
I would prefer that. So if you can send v2 that would be
On 05/25/2018 01:27 PM, Steve deRosier wrote:
On Fri, May 25, 2018 at 11:23 AM Gustavo A. R. Silva
<gust...@embeddedor.com>
wrote:
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/net/wireless/marvell/mwifiex/cfg80211.c | 4
drivers/net/wireless/marvell/mwifiex/scan.c | 1 +
2
Remove and refactor some code in order to avoid having identical code
for different branches.
Notice that the logic has been there since 2014.
Addresses-Coverity-ID: 1426199 ("Identical code for different branches")
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
Hi Joe,
On 05/24/2018 02:24 PM, Joe Perches wrote:
On Thu, 2018-05-24 at 13:54 -0500, Gustavo A. R. Silva wrote:
Remove and refactor some code in order to avoid having identical code
for different branches.
True and nice tool and patch submittal thanks.
Notice that the logic has been
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/net/wireless/ath/ath6kl/cfg80211.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Notice that in this particular case, I replaced "pass through" with
a proper "fall through" comment, which is what GCC is expecting
to find.
Signed-off-by: Gusta
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/net/wireless/ath/ath5k/pcu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wireless/ath
wilc1000: refactor scan() to free kmalloc
memory on failure cases")
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
BTW... at first sight it seems to me that variables slot_id
and i should be of type unsigned instead of signed.
drivers/staging/wilc1000/wilc_wfi_cfgoperat
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
This code was tested by compilation only (GCC 7.2.0 was used).
Please, verify if the actual intention of th
Return statements in functions returning bool should use
true/false instead of 1/0.
This issue was detected with the help of Coccinelle.
Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com>
---
drivers/ssb/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
On 03/10/2018 05:12 PM, Kees Cook wrote:
On Sat, Mar 10, 2018 at 3:06 PM, Arend van Spriel
wrote:
On 3/9/2018 1:30 PM, Andreas Christoforou wrote:
The kernel would like to have all stack VLA usage removed.
I think there was a remark made earlier to give
Hi all,
While doing some static analysis I came across the following piece of code at
drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c:1581:
1581 static void btc8821a1ant_act_bt_sco_hid_only_busy(struct btc_coexist
*btcoexist,
1582
Remove and refactor some code in order to avoid having identical code
for different branches.
Notice that this piece of code hasn't been modified since 2011.
Addresses-Coverity-ID: 1226756 ("Identical code for different branches")
Signed-off-by: Gustavo A. R. Silva <gust...@e
In case memory resources for fw were succesfully allocated, release
them before jumping to fw_load_fail.
Addresses-Coverity-ID: 1466092 ("Resource leak")
Fixes: c3b2f7ca4186 ("qtnfmac: implement asynchronous firmware loading")
Signed-off-by: Gustavo A. R. Silva <
ronous firmware loading")
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/net/wireless/quantenna/qtnfmac/pearl/pcie.c | 4
1 file changed, 4 insertions(+)
Thanks for the patch!
Glad to help. :)
Reviewed-by: Sergey Matyukevich <sergey.matyukevic
e all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/net/wireless/ath/ath9k/dfs.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/dfs.c
b/drivers/net/wi
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/net/wireless/mediatek/mt7601u/phy.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/wi
On 03/21/2018 08:48 AM, Johannes Berg wrote:
On Wed, 2018-03-21 at 08:42 -0500, Gustavo A. R. Silva wrote:
In preparation to enabling -Wvla, remove VLAs and replace them
with dynamic memory allocation instead.
The use of stack Variable Length Arrays needs to be avoided, as they
can
On 03/21/2018 08:58 AM, Johannes Berg wrote:
On Wed, 2018-03-21 at 08:57 -0500, Gustavo A. R. Silva wrote:
SHA_DESC_ON_STACK is currently being used in multiple places. But, yeah,
I think we can define multiple macros of the same kind and adjust to the
characteristics of each the component
it is easy to
lose track of how big a VLA can get. Thus, we can end up having runtime
failures that are hard to debug.
Also, fixed as part of the directive to remove all VLAs from
the kernel: https://lkml.org/lkml/2018/3/7/621
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
--
2f37 ("rsi: disable fw watchdog timer during reset")
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/net/wireless/rsi/rsi_91x_usb.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_usb.c
ot;)
Fixes: 4fd6c4762f37 ("rsi: roaming enhancements")
Signed-off-by: Gustavo A. R. Silva <gust...@embeddedor.com>
---
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x
59 matches
Mail list logo